mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-20 15:23:56 -07:00
This helps to see compatible mods in the list, which can get a bit long. For incompatible mods in disabled section use gray colour. For incompatible mods in enabled section use red colour (what can happen when using arguments to start the game or they can be in config file). Add option to filter compatible mods, this does not affect enabled section, because if there is incompatible mod, it is error and it needs to be always visible. Add function recomputeCompatibility and g_ModsCompatibility to avoid recomputing aredependenciesmet when coloring mods, because every column is colored separately. Disable enable mod button if mod is incompatible. Remove all dependencies met messages as they are now replaced by this mechanism. fix getSelectedModUrl in process Differential revision: D3687 Fixes: #6053 Tested by: @Freagarach Comments by: @vladislavbelov This was SVN commit r25095.
220 lines
7.9 KiB
XML
220 lines
7.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<objects>
|
|
|
|
<script directory="gui/common/"/>
|
|
<script directory="gui/modmod/"/>
|
|
|
|
<object type="image" style="ModernWindow">
|
|
|
|
<!-- Page Title -->
|
|
<object style="ModernLabelText" type="text" size="50%-128 4 50%+128 36">
|
|
<translatableAttribute id="caption">Modifications</translatableAttribute>
|
|
</object>
|
|
|
|
<!-- Filter Panel -->
|
|
<object size="0 40 312 64">
|
|
<object name="modGenericFilter"
|
|
type="input"
|
|
style="ModernInput"
|
|
size="16 0 176 100%"
|
|
>
|
|
<action on="Press">displayModLists();</action>
|
|
<action on="TextEdit">displayModLists();</action>
|
|
<translatableAttribute id="placeholder_text">Filter</translatableAttribute>
|
|
</object>
|
|
|
|
<!-- Checkboxes -->
|
|
<object name="negateFilter"
|
|
type="checkbox"
|
|
checked="false"
|
|
style="ModernTickBox"
|
|
size="186 0 206 100%"
|
|
>
|
|
<action on="Press">displayModLists();</action>
|
|
</object>
|
|
<object type="text" size="208 0 100% 100%" text_align="left" textcolor="white">
|
|
<translatableAttribute id="caption">Negate</translatableAttribute>
|
|
</object>
|
|
</object>
|
|
|
|
<object size = "100%-200 40 100%-20 64">
|
|
<object name="modCompatibleFilter"
|
|
type="checkbox"
|
|
checked="false"
|
|
style="ModernTickBox"
|
|
size="16 0 36 100%"
|
|
>
|
|
<action on="Press">displayModLists();</action>
|
|
</object>
|
|
<object type="text" size="40 0 100% 100%" text_align="left" textcolor="white">
|
|
<translatableAttribute id="caption">Filter compatible</translatableAttribute>
|
|
</object>
|
|
</object>
|
|
|
|
<object
|
|
name="globalModDescription"
|
|
type="text"
|
|
size="312 32 100%-16 69"
|
|
textcolor="180 180 180"
|
|
text_align="left"
|
|
text_valign="center"
|
|
>
|
|
<translatableAttribute id="caption">Description</translatableAttribute>
|
|
</object>
|
|
|
|
<!-- Available Mods Wrapper -->
|
|
<object size="16 66 100%-15 62%">
|
|
|
|
<object style="ModernLabelText" type="text" size="0 5 100% 25">
|
|
<translatableAttribute id="caption">Available Mods</translatableAttribute>
|
|
</object>
|
|
|
|
<object name="modsDisabledList"
|
|
type="olist"
|
|
style="ModernSortedList"
|
|
sortable="true"
|
|
selected_column="name"
|
|
selected_column_order="1"
|
|
size="0 25 100%-2 100%"
|
|
font="sans-stroke-13"
|
|
auto_scroll="true"
|
|
>
|
|
<action on="SelectionChange">selectedMod(this.name);</action>
|
|
<action on="SelectionColumnChange">displayModLists();</action>
|
|
<action on="MouseLeftDoubleClickItem">enableMod();</action>
|
|
|
|
<!-- List headers -->
|
|
<!-- Keep the column names in sync with the property names of mods -->
|
|
<column id="name" color="255 255 255" width="10%">
|
|
<translatableAttribute id="heading">Name</translatableAttribute>
|
|
</column>
|
|
<column id="version" color="255 255 255" width="7%">
|
|
<translatableAttribute id="heading">Version</translatableAttribute>
|
|
</column>
|
|
<column id="folder" color="255 255 255" width="13%">
|
|
<translatableAttribute id="heading">(Folder)</translatableAttribute>
|
|
</column>
|
|
<column id="label" color="255 255 255" width="26%">
|
|
<translatableAttribute id="heading">Mod Label</translatableAttribute>
|
|
</column>
|
|
<column id="dependencies" color="255 255 255" width="20%">
|
|
<translatableAttribute id="heading">Dependencies</translatableAttribute>
|
|
</column>
|
|
<column id="url" color="255 255 255" width="24%">
|
|
<translatableAttribute id="heading">Website</translatableAttribute>
|
|
</column>
|
|
</object>
|
|
</object>
|
|
|
|
<!-- Enabled Mods Wrapper -->
|
|
<object size="16 62% 100%-15 100%-84">
|
|
|
|
<object style="ModernLabelText" type="text" size="0 5 100% 25">
|
|
<translatableAttribute id="caption">Enabled Mods</translatableAttribute>
|
|
</object>
|
|
|
|
<object name="modsEnabledList"
|
|
style="ModernSortedList"
|
|
type="olist"
|
|
size="0 25 100%-32-2-2 100%"
|
|
font="sans-stroke-13"
|
|
tooltip_style="pgToolTip"
|
|
auto_scroll="true"
|
|
>
|
|
<action on="SelectionChange">selectedMod(this.name);</action>
|
|
<action on="MouseLeftDoubleClickItem">disableMod();</action>
|
|
|
|
<!-- List headers -->
|
|
<column id="name" color="255 255 255" width="10%">
|
|
<translatableAttribute id="heading">Name</translatableAttribute>
|
|
</column>
|
|
<column id="version" color="255 255 255" width="7%">
|
|
<translatableAttribute id="heading">Version</translatableAttribute>
|
|
</column>
|
|
<column id="folder" color="255 255 255" width="13%">
|
|
<translatableAttribute id="heading">(Folder)</translatableAttribute>
|
|
</column>
|
|
<column id="label" color="255 255 255" width="26%">
|
|
<translatableAttribute id="heading">Mod Label</translatableAttribute>
|
|
</column>
|
|
<column id="dependencies" color="255 255 255" width="20%">
|
|
<translatableAttribute id="heading">Dependencies</translatableAttribute>
|
|
</column>
|
|
<column id="url" color="255 255 255" width="24%">
|
|
<translatableAttribute id="heading">Website</translatableAttribute>
|
|
</column>
|
|
</object>
|
|
|
|
<object
|
|
name="enabledModUp"
|
|
type="button"
|
|
style="ModernButtonRed"
|
|
size="100%-32-2 23+4 100%-2 23+32+4"
|
|
enabled="false"
|
|
sprite="ModernArrowUpRed"
|
|
sprite_pressed="ModernArrowUpRed"
|
|
sprite_over="ModernArrowUpRedBright"
|
|
sprite_disabled="ModernArrowUpGrey"
|
|
>
|
|
<translatableAttribute id="tooltip">Change the order in which mods are launched. This should match the mods dependencies.</translatableAttribute>
|
|
<action on="Press">moveCurrItem("modsEnabledList", true);</action>
|
|
</object>
|
|
<object
|
|
name="enabledModDown"
|
|
type="button"
|
|
style="ModernButtonRed"
|
|
size="100%-32-2 100%-32-4 100%-2 100%-4"
|
|
enabled="false"
|
|
sprite="ModernArrowDownRed"
|
|
sprite_pressed="ModernArrowDownRed"
|
|
sprite_over="ModernArrowDownRedBright"
|
|
sprite_disabled="ModernArrowDownGrey"
|
|
>
|
|
<translatableAttribute id="tooltip">Change the order in which mods are launched. This should match the mods dependencies.</translatableAttribute>
|
|
<action on="Press">moveCurrItem("modsEnabledList", false);</action>
|
|
</object>
|
|
</object>
|
|
|
|
<!-- MOD-SPECIFIC BUTTONS -->
|
|
<object name="toggleModButton" type="button" style="ModernButtonRed" size="16 100%-80 196 100%-52" enabled="false"/>
|
|
<object name="visitWebButton" type="button" style="ModernButtonRed" size="200 100%-80 380 100%-52" enabled="false">
|
|
<translatableAttribute id="caption">Visit Website</translatableAttribute>
|
|
<action on="Press">visitModWebsite();</action>
|
|
</object>
|
|
|
|
<!-- Message -->
|
|
<object name="message" type="text" size="466 100%-78 100%-15 100%-52" text_align="left" textcolor="white"/>
|
|
|
|
<!-- BUTTONS -->
|
|
<object name="quitButton" type="button" style="ModernButtonRed" size="100%-932 100%-44 100%-752 100%-16">
|
|
<translatableAttribute id="caption">Quit</translatableAttribute>
|
|
<action on="Press">Engine.Exit();</action>
|
|
</object>
|
|
|
|
<object name="cancelButton" type="button" style="ModernButtonRed" size="100%-932 100%-44 100%-752 100%-16" hotkey="cancel">
|
|
<translatableAttribute id="caption">Cancel</translatableAttribute>
|
|
<action on="Press">closePage();</action>
|
|
</object>
|
|
|
|
<object type="button" style="ModernButtonRed" size="100%-748 100%-44 100%-568 100%-16">
|
|
<translatableAttribute id="caption">Help</translatableAttribute>
|
|
<action on="Press">Engine.PushGuiPage("page_modhelp.xml");</action>
|
|
</object>
|
|
|
|
<object type="button" style="ModernButtonRed" size="100%-564 100%-44 100%-384 100%-16">
|
|
<translatableAttribute id="caption">Download Mods</translatableAttribute>
|
|
<action on="Press">downloadModsButton();</action>
|
|
</object>
|
|
|
|
<object name="saveConfigurationButton" type="button" style="ModernButtonRed" size="100%-380 100%-44 100%-200 100%-16">
|
|
<translatableAttribute id="caption">Save Configuration</translatableAttribute>
|
|
<action on="Press">saveMods();</action>
|
|
</object>
|
|
|
|
<object name="startModsButton" type="button" style="ModernButtonRed" size="100%-196 100%-44 100%-16 100%-16">
|
|
<translatableAttribute id="caption">Start Mods</translatableAttribute>
|
|
<action on="Press">startMods();</action>
|
|
</object>
|
|
</object>
|
|
</objects>
|