0ad/binaries/data/mods/public/gui/options/options.xml
Yves 4b1297b328 Removes g_ScriptingHost and implements global to compartment 1 to 1 relation.
Each GUI Page gets its own compartment and all ScriptInterfaces in the
same thread should now use the same JS Runtime.
This is required for the SpiderMonkey upgrade.
Check the ticket for details.

Closes #2241
Refs #1886
Refs #1966

This was SVN commit r14496.
2014-01-04 10:14:53 +00:00

105 lines
6.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
==========================================
- Options Window -
==========================================
-->
<objects>
<script file="gui/common/functions_civinfo.js"/>
<script file="gui/options/options.js"/>
<!-- Add a translucent black background to fade out the menu page -->
<object type="image" z="0" style="TranslucentPanel"/>
<!-- Settings Window -->
<object name="options" type="image" style="StoneDialog" size="50%-466 50%-316 50%+466 50%+316">
<object style="TitleText" type="text" size="50%-128 0%-16 50%+128 16">Game Options</object>
<object name="SystemSettings" type="image" sprite="BackgroundIndentFillDark" size="16 16 316 100%-16">
<object style="TitleText" type="text" size="0 5 100% 25">System Settings</object>
<object size="0 25 65% 50" type="text" style="RightLabelText" ghost="true">Windowed Mode</object>
<object name="WindowedCFGLate" size="70% 30 70%+25 55" type="checkbox" style="StoneCrossBox">
<action on="Load">Engine.ConfigDB_GetValue("user", "windowed") === "true" ? this.checked = true : this.checked = false;</action>
<action on="Press">Engine.ConfigDB_CreateValue("user", "windowed", String(this.checked));</action>
</object>
<object size="0 50 65% 75" type="text" style="RightLabelText" ghost="true">Background Pause</object>
<object name="PauseCFGNow" size="70% 55 70%+25 80" type="checkbox" style="StoneCrossBox">
<action on="Load">Engine.ConfigDB_GetValue("user", "pauseonfocusloss") === "true" ? this.checked = true : this.checked = false;</action>
<action on="Press">Engine.ConfigDB_CreateValue("user", "pauseonfocusloss", String(this.checked));</action>
</object>
</object>
<object name="GraphicsSettings" type="image" sprite="BackgroundIndentFillDark" size="316 16 616 100%-16">
<object style="TitleText" type="text" size="0 5 100% 25">Graphics Settings</object>
<object size="0 25 65% 50" type="text" style="RightLabelText" ghost="true">Enable Shadows</object>
<object name="ShadowsCFG" size="70% 30 70%+25 55" type="checkbox" style="StoneCrossBox">
<action on="Load">this.checked = Engine.Renderer_GetShadowsEnabled();</action>
<action on="Press">Engine.Renderer_SetShadowsEnabled(this.checked);</action>
</object>
<object size="0 50 65% 75" type="text" style="RightLabelText" ghost="true">Enable Shadow Filtering</object>
<object name="ShadowPCFCFGNow" size="70% 55 70%+25 80" type="checkbox" style="StoneCrossBox">
<action on="Load">this.checked = Engine.Renderer_GetShadowPCFEnabled();</action>
<action on="Press">Engine.Renderer_SetShadowPCFEnabled(this.checked);</action>
</object>
</object>
<object name="SoundSettings" type="image" sprite="BackgroundIndentFillDark" size="616 16 916 100%-16">
<object style="TitleText" type="text" size="0 5 100% 25">Sound Settings</object>
<object size="0 25 65% 50" type="text" style="RightLabelText" ghost="true">Master Gain</object>
<object name="SMasterCFG" size="70% 25 70%+35 50" type="input" style="StoneInput">
<action on="Load">this.caption = Engine.ConfigDB_GetValue("user", "sound.mastergain");</action>
</object>
<object size="70%+35 25 70%+75 50" type="button" style="StoneButton">Save
<action on="Press">Engine.ConfigDB_CreateValue("user", "sound.mastergain", String(Engine.GetGUIObjectByName("SMasterCFG").caption));</action>
</object>
<object size="0 50 65% 75" type="text" style="RightLabelText" ghost="true">Music Gain</object>
<object name="SMusicCFG" size="70% 50 70%+35 75" type="input" style="StoneInput">
<action on="Load">this.caption = Engine.ConfigDB_GetValue("user", "sound.musicgain");</action>
</object>
<object size="70%+35 50 70%+75 75" type="button" style="StoneButton">Save
<action on="Press">Engine.ConfigDB_CreateValue("user", "sound.musicgain", String(Engine.GetGUIObjectByName("SMusicCFG").caption));</action>
</object>
</object>
<!--
Settings / shadows
<object size="0 10 100%-80 35" type="text" style="RightLabelText" ghost="true">Enable Shadows</object>
<object name="shadowsCheckbox" size="100%-56 15 100%-30 40" type="checkbox" style="StoneCrossBox" checked="true">
<action on="Load">this.checked = Engine.Renderer_GetShadowsEnabled();</action>
<action on="Press">Engine.Renderer_SetShadowsEnabled(this.checked);</action>
</object>
Settings / Shadow PCF
<object size="0 35 100%-80 60" type="text" style="RightLabelText" ghost="true">Enable Shadow Filtering</object>
<object name="shadowPCFCheckbox" size="100%-56 40 100%-30 65" type="checkbox" style="StoneCrossBox" checked="true">
<action on="Load">this.checked = Engine.Renderer_GetShadowPCFEnabled();</action>
<action on="Press">Engine.Renderer_SetShadowPCFEnabled(this.checked);</action>
</object>
Settings / Water
<object size="0 60 100%-80 85" type="text" style="RightLabelText" ghost="true">Enable Water Reflections</object>
<object name="fancyWaterCheckbox" size="100%-56 65 100%-30 90" type="checkbox" style="StoneCrossBox" checked="true">
<action on="Load">this.checked = Engine.Renderer_GetWaterNormalEnabled();</action>
<action on="Press">Engine.Renderer_SetWaterNormalEnabled(this.checked);</action>
</object>
Settings / Music
<object size="0 60 100%-80 85" type="text" style="RightLabelText" ghost="true">Enable Music</object>
<object size="100%-56 65 100%-30 90" type="checkbox" style="StoneCrossBox" checked="true">
<action on="Press">if (this.checked) startMusic(); else stopMusic();</action>
</object>
Settings / Dev Overlay
<object size="0 110 100%-80 135" type="text" style="RightLabelText" ghost="true">Developer Overlay</object>
<object size="100%-56 115 100%-30 140" type="checkbox" style="StoneCrossBox" checked="false">
<action on="Press">toggleDeveloperOverlay();</action>
</object>
-->
<object type="button" style="StoneButton" size="50%+16 100%-64 50%+144 100%-32">
Cancel
<action on="Press">Engine.PopGuiPage();</action>
</object>
<object type="button" style="StoneButton" size="50%-144 100%-64 50%-16 100%-32">
Save
<action on="Press">Engine.ConfigDB_WriteFile("user", "config/user.cfg");Engine.PopGuiPage();</action>
</object>
</object>
</objects>