Ticket #3805: resetcivsbutton_v2.patch
File resetcivsbutton_v2.patch, 3.1 KB (added by , 8 years ago) |
---|
-
art/textures/ui/global/icon/reset.png
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
-
gui/common/sprite1.xml
Property changes on: art/textures/ui/global/icon/reset.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property
195 195 size="0 3 100% 100%+3" 196 196 /> 197 197 </sprite> 198 199 <sprite name="iconResetGold"> 200 <effect add_color="237 227 167" /> 201 <image texture="global/icon/reset.png" 202 size="0 3 100% 100%+3" 203 /> 204 </sprite> 198 205 206 <sprite name="iconResetWhite"> 207 <effect add_color="255 255 255" /> 208 <image texture="global/icon/reset.png" 209 size="0 3 100% 100%+3" 210 /> 211 </sprite> 199 212 213 200 214 <!-- 201 215 ========================================== 202 216 SKIN - WHEAT -
gui/gamesetup/gamesetup.js
1378 1378 g_GameAttributes.settings.GameType != "wonder"; 1379 1379 1380 1380 Engine.GetGUIObjectByName("cheatWarningText").hidden = !g_IsNetworked || !mapSettings.CheatsEnabled; 1381 1381 Engine.GetGUIObjectByName("civResetButton").hidden = g_GameAttributes.mapType == "scenario" || !g_IsController; 1382 1382 Engine.GetGUIObjectByName("enableCheats").enabled = !mapSettings.RatingEnabled; 1383 1383 Engine.GetGUIObjectByName("lockTeams").enabled = !mapSettings.RatingEnabled; 1384 1384 … … 1816 1816 Engine.GetGUIObjectByName("moreOptions").hidden = !show; 1817 1817 } 1818 1818 1819 function resetCivilizations() 1820 { 1821 for (let i in g_GameAttributes.settings.PlayerData) 1822 g_GameAttributes.settings.PlayerData[i].Civ = "random"; 1823 updateGameAttributes() 1824 } 1825 1819 1826 function toggleReady() 1820 1827 { 1821 1828 g_IsReady = !g_IsReady; -
gui/gamesetup/gamesetup.xml
65 65 Engine.PushGuiPage("page_civinfo.xml"); 66 66 ]]></action> 67 67 </object> 68 <object name="civResetButton" 69 type="button" 70 sprite="iconResetGold" 71 sprite_over="iconResetWhite" 72 size="67.5%+93 0 67.5%+109 16" 73 tooltip_style="onscreenToolTip" 74 > 75 <translatableAttribute id="tooltip">Reset any civilizations that have been selected to the default (random)</translatableAttribute> 76 <action on="Press">resetCivilizations()</action> 77 </object> 68 78 <object name="playerTeamHeading" type="text" style="ModernLabelText" size="85%+5 0 100%-5 100%"> 69 79 <translatableAttribute id="caption">Team</translatableAttribute> 70 80 </object>