SnakeRavenCat
Chieftain
- Joined
- Jul 6, 2017
- Messages
- 22
I'm working on a little mod to allow use of advanced setup in hotseat games. I've copied the seemingly appropriate bits of code from GameSetupScreen.(XML/LUA both) which got the button showing up, and it seems clickable, but does nothing. I've tried the logs, and they contain nothing useful. The only "error" that shows is in XML logs, and it says it expected 'row' or 'delete' but got 'label'.
Here are the lines I added into StagingRoom.lua:
function OnAdvanced()
UIManager:QueuePopup( Controls.AdvancedSetup, PopupPriority.AdvancedSetup );
end
Controls.AdvancedButton:RegisterCallback( Mouse.eLClick, OnAdvanced );
And the lines added to StagingRoom.xml
<!-- Advanced Button -->
<GridButton Anchor="L,C" Style="SmallButton" Size="150,32" Offset="0,0" StateOffsetIncrement="0,0" ID="AdvancedButton" >
<Label Anchor="C,C" Offset="0,0" String="TXT_KEY_GAME_ADVANCED_SETUP" Font="TwCenMT18" ColorSet="Beige_Black_Alpha" FontStyle="Shadow" />
</GridButton>
<LuaContext FileName="Assets/UI/FrontEnd/GameSetup/AdvancedSetup" ID="AdvancedSetup" Hidden="1" DeferLoad="1" />
Here are the lines I added into StagingRoom.lua:
function OnAdvanced()
UIManager:QueuePopup( Controls.AdvancedSetup, PopupPriority.AdvancedSetup );
end
Controls.AdvancedButton:RegisterCallback( Mouse.eLClick, OnAdvanced );
And the lines added to StagingRoom.xml
<!-- Advanced Button -->
<GridButton Anchor="L,C" Style="SmallButton" Size="150,32" Offset="0,0" StateOffsetIncrement="0,0" ID="AdvancedButton" >
<Label Anchor="C,C" Offset="0,0" String="TXT_KEY_GAME_ADVANCED_SETUP" Font="TwCenMT18" ColorSet="Beige_Black_Alpha" FontStyle="Shadow" />
</GridButton>
<LuaContext FileName="Assets/UI/FrontEnd/GameSetup/AdvancedSetup" ID="AdvancedSetup" Hidden="1" DeferLoad="1" />