Divergent/mods/Zone Customization Project/gamedata/scripts/ui_pda_glitched_tab.script

37 lines
935 B
Plaintext

local SINGLETON = nil
function get_ui()
SINGLETON = SINGLETON or pda_glitched_tab()
SINGLETON:Reset()
return SINGLETON
end
class "pda_glitched_tab" (CUIScriptWnd)
function pda_glitched_tab:__init() super()
self:InitControls()
end
function pda_glitched_tab:__finalize()
end
function pda_glitched_tab:InitControls()
self:SetWndRect(Frect():set(0,0,1024,768))
local xml = CScriptXmlInit()
xml:ParseFile("pda_glitched.xml")
self.form = xml:InitStatic("glitched_pda",self)
self.form_text = xml:InitTextWnd("glitched_pda:state", self.form)
end
function pda_glitched_tab:Update()
CUIScriptWnd.Update(self)
end
function pda_glitched_tab:Reset()
self.form_text:SetText(game.translate_string("st_smr_glitched_pda_text"))
self.form_text:SetTextColor(GetARGB(255, 255, 255, 1))
self.form_text:Show(true)
local pda_menu = ActorMenu.get_pda_menu()
pda_menu:GetTabControl():Show(false)
end