Divergent/mods/[DEV] INC - 13 Enhanced GUI.../gamedata/scripts/modxml_credit_button_patche...

25 lines
695 B
Plaintext
Raw Normal View History

2024-03-17 20:18:03 -04:00
local patched = false
function on_xml_read()
if not patched then
patched = true
RegisterScriptCallback("main_menu_on_init", function(self)
self:AddCallback("btn_credits", ui_events.BUTTON_CLICKED, self.OnButton_credits_clicked, self)
end)
end
end
function on_mcm_load()
if not patched then
patched = true
RegisterScriptCallback("main_menu_on_init", function(self)
self:AddCallback("btn_credits", ui_events.BUTTON_CLICKED, self.OnButton_credits_clicked, self)
end)
end
end
function ui_main_menu.main_menu:OnButton_credits_clicked()
-- local console = get_console()
-- console:execute("main_menu off")
game.start_tutorial("credits_seq")
end