Ticket #3101: structTreeSession.patch
File structTreeSession.patch, 1.9 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/gui/session/civ_icon.js
1 function openTreeInSession() 2 { 3 Engine.PushGuiPage("page_structree.xml", {"defaultSelectedCiv": g_Players[Engine.GetPlayerID()].civ}); 4 } 5 No newline at end of file -
binaries/data/mods/public/gui/session/top_panel/civ_icon.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 <object size="50%-48 -26 50%+48 70" name="civIcon" type="image" tooltip_style="sessionToolTipBold"/> 2 3 <object type="button" 4 size="50%-48 -26 50%+48 70" 5 name="civIcon" 6 tooltip_style="sessionToolTipBold" 7 > 8 <action on="Press">openTreeInSession();</action> 9 </object> -
binaries/data/mods/public/gui/structree/structree.js
12 12 /** 13 13 * Initialize the dropdown containing all the available civs 14 14 */ 15 function init( )15 function init(data) 16 16 { 17 17 g_CivData = loadCivData(true); 18 18 … … 32 32 civSelection.list = civListNames; 33 33 civSelection.list_data = civListCodes; 34 34 civSelection.selected = 0; 35 36 if(data !== undefined && data.defaultSelectedCiv !== undefined && data.defaultSelectedCiv !== "") 37 { 38 civSelection.selected = civListCodes.indexOf(data.defaultSelectedCiv); 39 selectCiv(data.defaultSelectedCiv); 40 } 35 41 } 36 42 37 43 function selectCiv(civCode)