0ad/binaries/data/mods/mod/gui/modmod/modmod.xml
elexis 8f1b37b216 Major ordered list GUI cleanup. Patch by Imarok, fixes #3905.
Remove m_SelectedDef, m_SelectedColumnOrder and m_HeadingHeight. Use
GetSetting and SetSetting instead. Thus
implement selecting a column / column order sprite from JS correctly.
Since the actual list sorting is done in JS, only the column header
sprites were inaccurate.

Remove "selected_def" since that is redundant with "selected_column".
Merge "selected_column" with "default_column" (and
"selected_column_order" with "default_column_order") since
all properties provided in XML pages are defaults and to remove the
copying on init.

Rename "def" to "column" and "ObjectDef" to "COListColumn".
Replace 30px header height hardcoded in the C++ with an option set by
the style.
Remove the unneeded requirement to specify a "list_name".
Thus rename "list_name" to "list_month" in the replay menu.
Remove unneeded "list_" prefix and substr(5) in column checks.
Use ranged loops.
Fix typo "Avalible".
Add an error message if the GUI style doesn't specify the selected
column order.

This was SVN commit r18652.
2016-08-31 19:29:48 +00:00

203 lines
7.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/modmod/modmod.js"/>
<object name="modmod" type="image" style="ModernWindow" size="0 0 100% 100%">
<!-- Page Title -->
<object style="ModernLabelText" type="text" size="50%-128 4 50%+128 36">
<translatableAttribute id="caption">Modifications</translatableAttribute>
</object>
<!-- Message -->
<object name="message" type="text" size="15 40 100%-15 88" text_align="left" textcolor="white"/>
<!-- reset filters -->
<object name="resetFilters" size="15 72 184 100" type="button" style="ModernButtonRed">
<translatableAttribute id="caption">Reset Filters</translatableAttribute>
<action on="Press">resetFilters();</action>
</object>
<!-- Filter Panel -->
<object name="filterPanel" size="184 64 50% 98">
<object name="modGenericFilter"
type="input"
style="ModernInput"
size="10 100%-24 170 100%"
>
<action on="Press">applyFilters();</action>
</object>
<object name="modTypeFilter"
type="dropdown"
style="ModernDropDown"
size="180 100%-24 350 100%"
font="sans-bold-13"
>
<action on="SelectionChange">applyFilters();</action>
</object>
<!-- Checkboxes -->
<object name="negateFilter"
type="checkbox"
checked="false"
style="ModernTickBox"
size="355 100%-24 375 100%"
font="serif-bold-13"
>
<action on="Press">applyFilters();</action>
</object>
<object type="text" size="377 100%-24 460 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Negate</translatableAttribute>
</object>
</object>
<!-- Sort by -->
<object name="sortingWrapper" size="100%-400 74 100% 98">
<object type="text" size="0 0 75 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Sorting:</translatableAttribute>
</object>
<object name="sortBy"
type="dropdown"
style="ModernDropDown"
size="75 100%-24 75%-25 100%"
font="sans-bold-13"
>
<action on="SelectionChange">applyFilters();</action>
</object>
<!-- Checkboxes -->
<object type="text" size="75% 100%-24 100% 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Descending.</translatableAttribute>
</object>
<object name="isOrderDescending"
type="checkbox"
checked="false"
style="ModernTickBox"
size="75%-20 100%-24 75% 100%"
font="serif-bold-13"
>
<action on="Press">applyFilters();</action>
</object>
</object>
<!-- Available Mods Wrapper -->
<object name="modsAvailable" size="16 100 100%-15 75%-4" style="ModmodScrollbar">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Available Mods</translatableAttribute>
</object>
<object name="modsAvailableList"
style="ModernList"
type="olist"
size="0 25 100%-2 100%"
font="sans-stroke-13"
>
<action on="SelectionChange">showModDescription(this.name);</action>
<!-- List headers -->
<column id="name" color="100 100 200" width="10%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="modVersion" color="128 128 128" width="7%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="modFolderName" color="100 100 200" width="13%">
<translatableAttribute id="heading">(Folder)</translatableAttribute>
</column>
<column id="modLabel" color="0 60 0" width="18%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="modType" color="0 128 128" width="12%">
<translatableAttribute id="heading">Mod Type</translatableAttribute>
</column>
<column id="modDependencies" color="128 128 128" width="20%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
<column id="modURL" color="128 128 128" width="24%">
<translatableAttribute id="heading">Website</translatableAttribute>
</column>
</object>
<object name="globalModDescription" type="text" style="ModmodScrollbar" size="0 100%-28 100%-16 100%">
<attribute id="caption"><keep>[color="100 100 100"]</keep><translate>Description</translate><keep>[/color]</keep></attribute>
</object>
<object type="button" style="ModernButtonRed" size="100%-184 100%-28 100% 100%">
<translatableAttribute id="caption">Enable</translatableAttribute>
<action on="Press">enableMod();</action>
</object>
</object>
<!-- Enabled Mods Wrapper -->
<object name="modsEnabled" size="16 75% 100%-15 100%-50">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Enabled Mods</translatableAttribute>
</object>
<object name="modsEnabledList"
style="ModernList"
type="olist"
size="0 25 96%-5 100%"
font="sans-stroke-13"
tooltip_style="pgToolTip"
>
<action on="SelectionChange">showModDescription(this.name);</action>
<!-- List headers -->
<column id="name" color="100 100 200" width="10%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="modVersion" color="128 128 128" width="7%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="modFolderName" color="100 100 200" width="13%">
<translatableAttribute id="heading">(Folder)</translatableAttribute>
</column>
<column id="modLabel" color="0 60 0" width="18%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="modType" color="0 128 128" width="12%">
<translatableAttribute id="heading">Mod Type</translatableAttribute>
</column>
<column id="modDependencies" color="128 128 128" width="20%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
<column id="modURL" color="128 128 128" width="20%">
<translatableAttribute id="heading">Website</translatableAttribute>
</column>
</object>
<object type="button" style="ModernButtonRed" size="96% 23 100% 40%+12">
<translatableAttribute id="caption">Up</translatableAttribute>
<action on="Press">moveCurrItem(this.parent.name + "List", true);</action>
</object>
<object type="button" style="ModernButtonRed" size="96% 40%+12 100% 60%+10">
<translatableAttribute id="caption">X</translatableAttribute>
<action on="Press">disableMod();</action>
</object>
<object type="button" style="ModernButtonRed" size="96% 60%+10 100% 100%">
<translatableAttribute id="caption">Down</translatableAttribute>
<action on="Press">moveCurrItem(this.parent.name + "List", false);</action>
</object>
</object>
<!-- BUTTONS -->
<object type="button" style="ModernButtonRed" size="16 100%-44 200 100%-16">
<translatableAttribute id="caption">Quit</translatableAttribute>
<action on="Press">Engine.Exit();</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-576 100%-44 100%-392 100%-16" hotkey="cancel">
<translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">closePage();</action>
</object>
<object name="saveConfigurationButton" type="button" style="ModernButtonRed" size="100%-388 100%-44 100%-204 100%-16">
<translatableAttribute id="caption">Save Configuration</translatableAttribute>
<action on="Press">saveMods();</action>
</object>
<object name="startModsButton" type="button" style="ModernButtonRed" size="100%-200 100%-44 100%-16 100%-16">
<translatableAttribute id="caption">Start Mods</translatableAttribute>
<action on="Press">startMods();</action>
</object>
</object>
</objects>