Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIRelations = nil
- class "pda_relations_tab" (CUIScriptWnd)
- function pda_relations_tab:__init() super()
- self.list = {
- "stalker",
- "dolg",
- "freedom",
- "csky",
- "ecolog",
- "killer",
- "army",
- "bandit",
- "monolith"
- }
- self.color_codes = {
- GetARGB(255,255,255,255),
- GetARGB(255,255,128,0),
- GetARGB(255,0,255,255),
- GetARGB(255,0,255,128),
- GetARGB(255,0,128,255),
- GetARGB(255,255,0,128),
- GetARGB(255,128,255,0),
- GetARGB(255,255,0,0),
- GetARGB(255,0,255,0),
- GetARGB(255,0,0,255),
- GetARGB(255,128,0,255),
- }
- self.companion_info = {}
- self.to_text = true
- self._tmr = time_global()
- self:InitControls()
- self:Reset()
- end
- function pda_relations_tab:__finalize() end
- function pda_relations_tab:InitControls()
- self:SetWndRect(Frect():set(0, 0, 1024, 768))
- local xml = CScriptXmlInit()
- xml:ParseFile("pda_relations.xml")
- xml:InitFrame("frame",self)
- xml:InitStatic("center_background", self)
- self.tab = xml:InitStatic("tab", self)
- xml:InitStatic("tab:caption", self.tab)
- self.btn = xml:Init3tButton("btn_to_text", self)
- self:Register(self.btn, "btn")
- self:AddCallback("btn", ui_events.BUTTON_CLICKED, self.btn_to_text, self)
- -- Relation Matrix
- self.relations = {}
- local is_widescreen = utils.is_widescreen()
- local x = is_widescreen and 40 or 55
- local c_width = is_widescreen and 75 or 90
- local c_height = 35
- for i=1, #self.list do
- x = x + c_width
- local iobj = xml:InitTextWnd("tab:faction", self.tab)
- iobj:SetWndPos(vector2():set(x,65))
- iobj:SetText(game.translate_string(self.list[i]))
- self.relations[i] = {}
- local y = 60
- for k=0, #self.list do
- y = y + c_height
- if (i == 1) then
- local kobj = xml:InitTextWnd("tab:faction", self.tab)
- kobj:SetWndPos(vector2():set(x - c_width, y))
- if k > 0 then
- kobj:SetText(game.translate_string(self.list[k]))
- else
- kobj:SetText(game.translate_string("st_actor_generic_name"))
- end
- end
- self.relations[i][k] = xml:InitTextWnd("tab:cell",self.tab)
- self.relations[i][k]:SetWndPos(vector2():set(x,y))
- end
- end
- -- Companion ListView
- xml:InitFrame("companion_frame",self)
- xml:InitStatic("companion_background",self)
- self.companion_listbox = xml:InitListBox("companion_wnd",self)
- self.companion_listbox:SetItemHeight(140)
- self:Register(self.companion_listbox, "list_companion")
- self:AddCallback("list_companion",ui_events.LIST_ITEM_CLICKED,self.OnSelectCompanionList,self)
- self.auto_chk = xml:InitCheck("auto_check",self)
- self.auto_chk:SetCheck(false)
- for row=1,4 do
- local row_form = ui_companion_row(self,row,xml)
- row_form:SetWndSize(vector2():set(740,140))
- self.companion_listbox:AddExistingItem(row_form)
- end
- -- Hint Window
- self.hint_wnd = xml:InitFrame("hint_wnd:background",self)
- self.hint_wnd_text = xml:InitTextWnd("hint_wnd:text",self.hint_wnd)
- self.hint_wnd:SetWndPos(vector2():set(-2048,-2048))
- -- Message Window
- self.msg_wnd = xml:InitFrame("hint_wnd:background",self)
- self.msg_wnd_text = xml:InitTextWnd("hint_wnd:text",self.msg_wnd)
- self.msg_wnd_text:SetTextAlignment(2)
- self.msg_wnd:SetWndPos(vector2():set(-2048,-2048))
- self.msg_wnd:SetColor(GetARGB(255,0,0,0))
- end
- function pda_relations_tab:Update()
- CUIScriptWnd.Update(self)
- -- option to auto update values
- if self.auto_chk:GetCheck() then
- local tg = time_global()
- if self._tmr < tg then
- self._tmr = tg + 2000
- self:autoupdate()
- end
- end
- -- Warning messages timer
- if (self.msg_wnd_timer and time_global() > self.msg_wnd_timer) then
- self.msg_wnd_timer = nil
- self.msg_wnd:SetWndPos(vector2():set(-2048,-2048))
- end
- if not (self.disabled) then
- for i=1, 24 do -- should be row*col from ui_companion_row
- if (self.companion_info[i].icon_wnd:IsShown()) then
- local pos = GetCursorPosition()
- local rect = Frect():set(0,0,0,0)
- self.companion_info[i].icon_wnd:GetAbsoluteRect(rect)
- if (utils.pos_in_rect(pos,rect)) then
- self:SetHint(self.companion_info[i].hint,pos)
- --FitInRect(self.background,self.rect,0,0)
- self.mouse_over_id = i
- return
- end
- end
- end
- end
- self.mouse_over_id = nil
- self.hint_wnd:SetWndPos(vector2():set(-2048,-2048))
- end
- function pda_relations_tab:autoupdate()
- local id_to_code = {}
- local clist = axr_companions.list_actor_squad_by_id()
- for i=1,24 do -- should be row*col from ui_companion_row
- local se_obj = clist[i] and alife_object(clist[i])
- if (se_obj and IsStalker(nil,se_obj:clsid()) and se_obj:alive()) then
- local full_name = se_obj:character_name()
- local name = string.gsub(full_name,"Junior","Jr.")
- name = string.gsub(name,"Senior","Sr.")
- name = string.gsub(name,"Master ","M")
- name = string.gsub(name,"Private","PVT")
- name = string.gsub(name,"Sergeant","SGT")
- name = string.gsub(name,"Lieutenant","LT")
- name = string.gsub(name,"Captain","CPT")
- local name = string.len(name) <= 22 and name or string.sub(name, 0, 19) .. "..."
- self.companion_info[i].id = se_obj.id
- local st = db.storage[se_obj.id]
- local npc = st and st.object
- local icon_name = npc and npc:character_icon() or se_obj:character_icon()
- icon_name = icon_name and icon_name ~= "" and icon_name or "ui\\ui_noise"
- self.companion_info[i].icon_wnd:InitTexture(icon_name)
- self.companion_info[i].icon_wnd:Show(true)
- self.companion_info[i].name_wnd:SetText(name)
- self.companion_info[i].comm_wnd:SetText(game.translate_string(se_obj:community()))
- self.companion_info[i].rank_wnd:SetText(game.translate_string("st_rank_"..ranks.get_se_obj_rank_name(se_obj)).." ("..se_obj:rank()..")")
- self.companion_info[i].dist_wnd:SetText(string.format("Distance to: %.2f", se_obj.position:distance_to(db.actor:position())))
- -- leader and relation status
- local squad = se_obj.group_id and se_obj.group_id ~= 65535 and alife_object(se_obj.group_id)
- if (squad and squad:commander_id() == se_obj.id) then
- self.companion_info[i].leader_wnd:Show(true)
- self.companion_info[i].leader_wnd:InitTexture("ui_minimap_squad_leader")
- else
- self.companion_info[i].leader_wnd:Show(true)
- self.companion_info[i].leader_wnd:InitTexture("ui_minimap_point")
- end
- -- Set color code
- if not (id_to_code[se_obj.group_id]) then
- local n = 1
- for k,v in pairs(id_to_code) do
- n = n + 1
- end
- id_to_code[se_obj.group_id] = self.color_codes[n] or self.color_codes[1]
- end
- self.companion_info[i].leader_wnd:SetTextureColor(id_to_code[se_obj.group_id])
- -- health status
- if (npc) then
- local hp = math.floor(npc.health*100)
- self.companion_info[i].health_wnd:SetText(hp.."%")
- if (hp > 70) then
- self.companion_info[i].health_wnd:SetTextColor(GetARGB(200, 0, 255, 0))
- elseif (hp < 30) then
- self.companion_info[i].health_wnd:SetTextColor(GetARGB(200, 255, 0, 0))
- else
- self.companion_info[i].health_wnd:SetTextColor(GetARGB(200, 255, 255, 255))
- end
- end
- -- Hint
- local s_move,s_combat,s_gather,s_loot,s_dist,s_stealth,s_arte,s_stalker,s_mutant,s_dismiss,s_tele
- local state_str = [[
- %c[255,255,215,255]%c[default] %s \n\n
- %c[255,215,215,215]States:%c[default] \n
- %c[255,160,160,160]Movement:%c[default] %s \n
- %c[255,160,160,160]Combat:%c[default] %s \n
- %c[255,160,160,160]Pickup items:%c[default] %s \n
- %c[255,160,160,160]Loot corpses:%c[default] %s \n
- %c[255,160,160,160]Keep distance:%c[default] %s \n
- %c[255,160,160,160]Stealth:%c[default] %s \n
- %c[255,160,160,160]Dismissable:%c[default] %s \n
- %c[255,160,160,160]Level travel:%c[default] %s \n
- \n%c[255,215,215,215]Statistics:%c[default] \n
- %c[255,160,160,160]Stalkers killed:%c[default] %s \n
- %c[255,160,160,160]Mutants killed:%c[default] %s \n
- %c[255,160,160,160]Artefacts found:%c[default] %s \n
- ]]
- if (alife():has_info(se_obj.id,"npcx_beh_wait")) then
- s_move = game.translate_string("st_set_companion_to_wait_state")
- elseif (alife():has_info(se_obj.id,"npcx_beh_patrol_mode")) then
- s_move = game.translate_string("st_set_companion_to_patrol_state")
- else
- s_move = game.translate_string("st_set_companion_to_follow_state")
- end
- if (alife():has_info(se_obj.id,"npcx_beh_ignore_actor_enemies") and alife():has_info(se_obj.id,"npcx_beh_ignore_combat")) then
- s_combat = game.translate_string("st_set_companion_to_ignore_combat_state")
- elseif (alife():has_info(se_obj.id,"npcx_beh_ignore_combat")) then
- s_combat = game.translate_string("st_set_companion_to_attack_only_actor_combat_enemy_state")
- else
- s_combat = game.translate_string("st_set_companion_to_attack_state")
- end
- local can_gather = alife():has_info(se_obj.id,"npcx_beh_gather_items")
- local can_loot = alife():has_info(se_obj.id,"npcx_beh_loot_corpses")
- s_gather = can_gather and game.translate_string("st_pda_mode_on") or game.translate_string("st_pda_mode_off")
- s_loot = can_loot and game.translate_string("st_pda_mode_on") or game.translate_string("st_pda_mode_off")
- if (npc) then
- -- If looting is set false in logic
- if (can_gather and st.gather_items and st.gather_items.gather_items_enabled and xr_logic.pick_section_from_condlist(db.actor, npc, st.gather_items.gather_items_enabled) == "false") then
- s_gather = game.translate_string("st_pda_mode_disabled")
- end
- if (can_loot and st.corpse_detection and st.corpse_detection.corpse_detection_enabled and xr_logic.pick_section_from_condlist(db.actor, npc, st.corpse_detection.corpse_detection_enabled) == "false") then
- s_loot = game.translate_string("st_pda_mode_disabled")
- end
- end
- s_dist = alife():has_info(se_obj.id,"npcx_beh_distance_far") and game.translate_string("st_pda_mode_dist_far") or game.translate_string("st_pda_mode_dist_near")
- s_stealth = alife():has_info(se_obj.id,"npcx_beh_substate_stealth") and game.translate_string("st_pda_mode_on") or game.translate_string("st_pda_mode_off")
- local m_data = alife_storage_manager.get_se_obj_state(se_obj)
- if (m_data) then
- s_stalker = m_data.stalkers_killed or 0
- s_mutant = m_data.mutants_killed or 0
- s_arte = m_data.artefacts_found or 0
- end
- s_dismiss = utils.se_obj_load_var(se_obj.id,se_obj:name(),"companion_cannot_dismiss") and game.translate_string("st_pda_mode_false") or game.translate_string("st_pda_mode_true")
- s_tele = utils.se_obj_load_var(se_obj.id,se_obj:name(),"companion_cannot_teleport") and game.translate_string("st_pda_mode_disabled") or game.translate_string("st_pda_mode_enabled")
- state_str = strformat(state_str,full_name,s_move,s_combat,s_gather,s_loot,s_dist,s_stealth,s_dismiss,s_tele,s_stalker,s_mutant,s_arte)
- self.companion_info[i].hint = state_str
- else
- self.companion_info[i].id = nil
- self.companion_info[i].icon_wnd:Show(false)
- self.companion_info[i].leader_wnd:Show(false)
- self.companion_info[i].health_wnd:SetText("")
- self.companion_info[i].name_wnd:SetText("")
- self.companion_info[i].comm_wnd:SetText("")
- self.companion_info[i].rank_wnd:SetText("")
- self.companion_info[i].dist_wnd:SetText("")
- end
- end
- end
- function pda_relations_tab:Reset()
- for i=1, #self.list do
- for k=0, #self.list do
- local comm = self.list[k] or db.actor:character_community()
- local r_val = relation_registry.community_relation(comm, self.list[i])
- if r_val >= game_relations.FRIENDS then
- self.relations[i][k]:SetTextColor(GetARGB(255, 1, 255, 1))
- self.relations[i][k]:SetText(game.translate_string("st_goodwill_friendly"))
- elseif r_val <= game_relations.ENEMIES then
- self.relations[i][k]:SetTextColor(GetARGB(255, 255, 1, 1))
- self.relations[i][k]:SetText(game.translate_string("st_goodwill_enemy"))
- else
- self.relations[i][k]:SetTextColor(GetARGB(255, 255, 255, 1))
- self.relations[i][k]:SetText(game.translate_string("st_goodwill_indifferent"))
- end
- if not (self.to_text) then self.relations[i][k]:SetText(tostring(r_val)) end
- end
- end
- self:autoupdate()
- end
- function pda_relations_tab:OnSelectCompanionList()
- if not (self.mouse_over_id) then
- return
- end
- local id = self.companion_info[self.mouse_over_id].id
- local npc = id and db.storage[id] and db.storage[id].object
- if not (npc) then
- return
- end
- self:CreateContextMenu(npc,id)
- end
- function pda_relations_tab:btn_to_text()
- self.to_text = not self.to_text
- if self.to_text then
- self.btn:TextControl():SetText(game.translate_string("pda_table_value_off"))
- else
- self.btn:TextControl():SetText(game.translate_string("pda_table_value_on"))
- end
- self:Reset()
- end
- function pda_relations_tab:SetMsg(text,tmr)
- self.msg_wnd_text:SetText(text)
- self.msg_wnd_text:AdjustHeightToText()
- self.msg_wnd_text:SetWndSize(vector2():set(820,self.msg_wnd_text:GetHeight()))
- self.msg_wnd_text:SetWndPos(vector2():set(0,20))
- self.msg_wnd:SetWndSize(vector2():set(820,self.msg_wnd_text:GetHeight()+44))
- self.msg_wnd:SetWndPos(vector2():set(0,80))
- self.msg_wnd_timer = time_global() + 1000*tmr
- end
- function pda_relations_tab:SetHint(text,pos)
- self.hint_wnd_text:SetText(text)
- self.hint_wnd_text:AdjustHeightToText()
- self.hint_wnd:SetWndSize(vector2():set(self.hint_wnd:GetWidth(),self.hint_wnd_text:GetHeight()+44))
- pos.y = pos.y - self.hint_wnd:GetHeight()
- pos.x = pos.x - self.hint_wnd:GetWidth()
- self.hint_wnd:SetWndPos(pos)
- end
- function pda_relations_tab:CreateContextMenu(npc,id)
- local pos = GetCursorPosition()
- local se_obj = alife_object(id)
- if not (se_obj) then
- return
- end
- local squad = se_obj.group_id and se_obj.group_id ~= 65535 and alife_object(se_obj.group_id)
- -- Actions
- local action_1 = nil -- Main
- local action_1__1 = nil -- Trade
- local action_1__2 = nil -- Commands
- local action_1__2_1 = nil -- Back
- local action_1__2_2 = nil -- Movement
- local action_1__2_2_1 = nil -- Back
- local action_1__2_2_2 = nil -- Follow/Wait
- local action_1__2_2_3 = nil -- Far/Near Distance
- local action_1__2_3 = nil -- Combat
- local action_1__2_3_1 = nil -- Back
- local action_1__2_3_2 = nil -- Passive
- local action_1__2_3_3 = nil -- Defensive
- local action_1__2_3_4 = nil -- Aggressive
- local action_1__2_4 = nil -- Looting
- local action_1__2_4_1 = nil -- Back
- local action_1__2_4_2 = nil -- Gather Items (toggle)
- local action_1__2_4_3 = nil -- Loot Corpses (toggle)
- local action_1__2_5 = nil -- Stealth
- -- Action Trees
- local action_list_1 = nil
- local action_list_1__2 = nil
- local action_list_1__2_2 = nil
- local action_list_1__2_3 = nil
- local action_list_1__2_4 = nil
- -- Action definitions
- action_1 = function()
- ui_dyn_msg_box.context_menu(self,pos,action_list_1,"st_pda_action_1__1","st_pda_action_1__2")
- end
- action_1__1 = function()
- if not (utils.se_obj_load_var(se_obj.id,se_obj:name(),"companion_cannot_dismiss")) then
- npc:use(db.actor)
- --npc:start_trade(db.actor)
- else
- self:SetMsg(game.translate_string("st_pda_cant_trade"),3)
- end
- end
- action_1__2 = function()
- local st_stealth = npc:has_info("npcx_beh_substate_stealth") and "st_pda_action_1__2_5_on" or "st_pda_action_1__2_5_off"
- ui_dyn_msg_box.context_menu(self,pos,action_list_1__2,"st_pda_action_back","st_pda_action_1__2_2","st_pda_action_1__2_3","st_pda_action_1__2_4",st_stealth)
- end
- action_1__2_1 = function()
- action_1()
- end
- action_1__2_2 = function()
- local st_movement_state = npc:has_info("npcx_beh_wait") and "st_pda_action_1__2_2_2_on" or "st_pda_action_1__2_2_2_off"
- local st_distance_state = npc:has_info("npcx_beh_distance_far") and "st_pda_action_1__2_2_3_on" or "st_pda_action_1__2_2_3_off"
- ui_dyn_msg_box.context_menu(self,pos,action_list_1__2_2,"st_pda_action_back",st_movement_state,st_distance_state)
- end
- action_1__2_3 = function()
- ui_dyn_msg_box.context_menu(self,pos,action_list_1__2_3,"st_pda_action_back","st_pda_action_1__2_3_2","st_pda_action_1__2_3_3","st_pda_action_1__2_3_4")
- end
- action_1__2_4 = function()
- local st_gather = npc:has_info("npcx_beh_gather_items") and "st_pda_action_1__2_4_2_on" or "st_pda_action_1__2_4_2_off"
- local st_loot = npc:has_info("npcx_beh_loot_corpses") and "st_pda_action_1__2_4_3_on" or "st_pda_action_1__2_4_3_off"
- ui_dyn_msg_box.context_menu(self,pos,action_list_1__2_4,"st_pda_action_back",st_gather,st_loot)
- end
- action_1__2_5 = function()
- local mode = npc:has_info("npcx_beh_substate_stealth") and 0 or 1
- axr_companions.set_companion_squad_stealth_mode(mode,npc,squad)
- self:Reset()
- end
- action_1__2_2_1 = function()
- action_1__2()
- end
- action_1__2_2_2 = function()
- local mode = npc:has_info("npcx_beh_wait") and 2 or 1
- axr_companions.set_companion_squad_move_mode(mode,npc,squad)
- self:Reset()
- end
- action_1__2_2_3 = function()
- local mode = npc:has_info("npcx_beh_distance_far") and 0 or 1
- axr_companions.set_companion_squad_distance_mode(mode,npc,squad)
- self:Reset()
- end
- action_1__2_3_1 = function()
- action_1__2()
- end
- action_1__2_3_2 = function()
- axr_companions.set_companion_squad_combat_mode(2,npc,squad)
- self:Reset()
- end
- action_1__2_3_3 = function()
- axr_companions.set_companion_squad_combat_mode(3,npc,squad)
- self:Reset()
- end
- action_1__2_3_4 = function()
- axr_companions.set_companion_squad_combat_mode(1,npc,squad)
- self:Reset()
- end
- action_1__2_4_1 = function()
- action_1__2()
- end
- action_1__2_4_2 = function()
- local mode = npc:has_info("npcx_beh_gather_items") and 0 or 1
- axr_companions.set_companion_squad_gather_mode(mode,npc,squad)
- self:Reset()
- end
- action_1__2_4_3 = function()
- local mode = npc:has_info("npcx_beh_loot_corpses") and 0 or 1
- axr_companions.set_companion_squad_loot_mode(mode,npc,squad)
- self:Reset()
- end
- action_1__2_5 = function()
- local mode = npc:has_info("npcx_beh_substate_stealth") and 0 or 1
- axr_companions.set_companion_squad_stealth_mode(mode,npc,squad)
- self:Reset()
- end
- -- Action List definitions
- action_list_1 = {action_1__1,action_1__2}
- action_list_1__2 = {action_1__2_1,action_1__2_2,action_1__2_3,action_1__2_4,action_1__2_5}
- action_list_1__2_2 = {action_1__2_2_1,action_1__2_2_2,action_1__2_2_3}
- action_list_1__2_3 = {action_1__2_3_1,action_1__2_3_2,action_1__2_3_3,action_1__2_3_4}
- action_list_1__2_4 = {action_1__2_4_1,action_1__2_4_2,action_1__2_4_3}
- -- Create Main Context Menu
- ui_dyn_msg_box.context_menu(self,pos,action_list_1,"st_pda_action_1__1","st_pda_action_1__2")
- end
- ---------------------------------------------------------------------------------------------------
- --
- ---------------------------------------------------------------------------------------------------
- class "ui_companion_row" (CUIListBoxItem)
- function ui_companion_row:__init(owner,row,xml) super(owner,row,xml)
- self:GetTextItem():SetText("")
- local is_widescreen = utils.is_widescreen()
- local x = is_widescreen and 20 or 35
- local y = 0
- --[[
- local wind = {
- ["icon_wnd"] = {64,64,0,0,"ui\\ui_noise"},
- ["leader_wnd"] = {is_widescreen and 8 or 10,10,0,0,"ui_minimap_squad_leader"},
- ["name_wnd"] = {120,22,0,65,GetFontLetterica18Russian()},
- ["comm_wnd"] = {120,20,0,90,GetFontLetterica16Russian()},
- ["rank_wnd"] = {120,20,0,105,GetFontLetterica16Russian()},
- ["health_wnd"] = {50,10,50,55,GetFontSmall()},
- ["dist_wnd"] = {120,20,0,120,GetFontLetterica16Russian()},
- }
- local function add_wnd(element)
- for wnd, v in pairs(wind) do
- owner.companion_info[element][wnd]:SetWndSize(vector2():set(v[1],v[2]))
- owner.companion_info[element][wnd]:SetWndPos(vector2():set(x+v[3],y+v[4]))
- if type(v[5]) == "string" then
- owner.companion_info[element][wnd]:InitTexture(v[5])
- owner.companion_info[element][wnd]:SetStretchTexture(true)
- else
- owner.companion_info[element][wnd]:SetFont(v[5])
- end
- end
- end
- --]]
- for i=1,6 do
- local n = i+(6*(row-1))
- owner.companion_info[n] = {
- ["id"] = nil,
- ["icon_wnd"] = self:AddIconField(1),
- ["leader_wnd"] = self:AddIconField(1),
- ["name_wnd"] = self:AddTextField("",1),
- ["comm_wnd"] = self:AddTextField("",1),
- ["rank_wnd"] = self:AddTextField("",1),
- ["health_wnd"] = self:AddTextField("",1),
- ["dist_wnd"] = self:AddTextField("",1),
- ["hint"] = ""
- }
- -- add_wnd(n)
- --
- owner.companion_info[n].icon_wnd:InitTexture("ui\\ui_noise")
- owner.companion_info[n].icon_wnd:SetStretchTexture(true)
- owner.companion_info[n].icon_wnd:SetWndSize(vector2():set(64,64))
- owner.companion_info[n].icon_wnd:SetWndPos(vector2():set(x,y))
- owner.companion_info[n].leader_wnd:InitTexture("ui_minimap_squad_leader")
- owner.companion_info[n].leader_wnd:SetStretchTexture(true)
- owner.companion_info[n].leader_wnd:SetWndSize(vector2():set(is_widescreen and 8 or 10,10))
- owner.companion_info[n].leader_wnd:SetWndPos(vector2():set(x,y))
- owner.companion_info[n].name_wnd:SetFont(GetFontLetterica18Russian())
- owner.companion_info[n].name_wnd:SetWndSize(vector2():set(120,22))
- owner.companion_info[n].name_wnd:SetWndPos(vector2():set(x,y+65))
- owner.companion_info[n].comm_wnd:SetFont(GetFontLetterica16Russian())
- owner.companion_info[n].comm_wnd:SetWndSize(vector2():set(120,20))
- owner.companion_info[n].comm_wnd:SetWndPos(vector2():set(x,y+90))
- owner.companion_info[n].rank_wnd:SetFont(GetFontLetterica16Russian())
- owner.companion_info[n].rank_wnd:SetWndSize(vector2():set(120,20))
- owner.companion_info[n].rank_wnd:SetWndPos(vector2():set(x,y+105))
- owner.companion_info[n].health_wnd:SetFont(GetFontSmall())
- owner.companion_info[n].health_wnd:SetWndSize(vector2():set(50,10))
- owner.companion_info[n].health_wnd:SetWndPos(vector2():set(x+50,y+55))
- owner.companion_info[n].dist_wnd:SetFont(GetFontLetterica16Russian())
- owner.companion_info[n].dist_wnd:SetWndSize(vector2():set(120,20))
- owner.companion_info[n].dist_wnd:SetWndPos(vector2():set(x,y+120))
- --
- x = x + (is_widescreen and 125 or 180)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement