1
0
forked from 0ad/0ad

Rename the "color" property of COlist columns to "textcolor"

Patch by: @Vantha
Differential Revision: https://code.wildfiregames.com/D5278
This was SVN commit r28120.
This commit is contained in:
Stan 2024-06-22 20:18:09 +00:00
parent e01ea16ae5
commit 9af1433995
11 changed files with 44 additions and 44 deletions

View File

@ -587,7 +587,7 @@
<interleave>
<attribute name="id"/>
<optional>
<attribute name="color">
<attribute name="textcolor">
<ref name="ccolor"/>
</attribute>
</optional>

View File

@ -50,19 +50,19 @@
<!-- List headers -->
<!-- Keep in sync with mod property names -->
<column id="name_id" color="255 255 255" width="20%">
<column id="name_id" textcolor="255 255 255" width="20%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="version" color="255 255 255" width="15%">
<column id="version" textcolor="255 255 255" width="15%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="name" color="255 255 255" width="20%">
<column id="name" textcolor="255 255 255" width="20%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="filesize" color="255 255 255" width="20%">
<column id="filesize" textcolor="255 255 255" width="20%">
<translatableAttribute id="heading">File Size</translatableAttribute>
</column>
<column id="dependencies" color="255 255 255" width="25%">
<column id="dependencies" textcolor="255 255 255" width="25%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
</object>

View File

@ -86,22 +86,22 @@
<!-- List headers -->
<!-- Keep the column names in sync with the property names of mods -->
<column id="name" color="255 255 255" width="10%">
<column id="name" textcolor="255 255 255" width="10%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="version" color="255 255 255" width="7%">
<column id="version" textcolor="255 255 255" width="7%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="folder" color="255 255 255" width="13%">
<column id="folder" textcolor="255 255 255" width="13%">
<translatableAttribute id="heading">(Folder)</translatableAttribute>
</column>
<column id="label" color="255 255 255" width="26%">
<column id="label" textcolor="255 255 255" width="26%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="dependencies" color="255 255 255" width="20%">
<column id="dependencies" textcolor="255 255 255" width="20%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
<column id="url" color="255 255 255" width="24%">
<column id="url" textcolor="255 255 255" width="24%">
<translatableAttribute id="heading">Website</translatableAttribute>
</column>
</object>
@ -127,22 +127,22 @@
<action on="MouseLeftDoubleClickItem">disableMod();</action>
<!-- List headers -->
<column id="name" color="255 255 255" width="10%">
<column id="name" textcolor="255 255 255" width="10%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="version" color="255 255 255" width="7%">
<column id="version" textcolor="255 255 255" width="7%">
<translatableAttribute id="heading">Version</translatableAttribute>
</column>
<column id="folder" color="255 255 255" width="13%">
<column id="folder" textcolor="255 255 255" width="13%">
<translatableAttribute id="heading">(Folder)</translatableAttribute>
</column>
<column id="label" color="255 255 255" width="26%">
<column id="label" textcolor="255 255 255" width="26%">
<translatableAttribute id="heading">Mod Label</translatableAttribute>
</column>
<column id="dependencies" color="255 255 255" width="20%">
<column id="dependencies" textcolor="255 255 255" width="20%">
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
<column id="url" color="255 255 255" width="24%">
<column id="url" textcolor="255 255 255" width="24%">
<translatableAttribute id="heading">Website</translatableAttribute>
</column>
</object>

View File

@ -23,11 +23,11 @@
font="sans-stroke-16"
>
<!-- Columns -->
<column id="name" color="172 172 212" width="80%">
<column id="name" textcolor="172 172 212" width="80%">
<translatableAttribute id="heading" context="campaignLevelList">Scenario Name</translatableAttribute>
</column>
<column id="status" color="192 192 192" width="20%">
<column id="status" textcolor="192 192 192" width="20%">
<translatableAttribute id="heading" context="campaignLevelList">Status</translatableAttribute>
</column>
</object>

View File

@ -22,7 +22,7 @@
font="sans-stroke-16"
>
<column id="name" color="172 172 212" width="99%">
<column id="name" textcolor="172 172 212" width="99%">
<translatableAttribute id="heading" context="campaignsetup">Name</translatableAttribute>
</column>
</object>

View File

@ -35,11 +35,11 @@
type="olist"
auto_scroll="true"
>
<column id="name" color="255 255 255" width="60%">
<column id="name" textcolor="255 255 255" width="60%">
<translatableAttribute id="heading" context="hotkey list">Name</translatableAttribute>
</column>
<column id="mapping" color="255 255 255" width="40%">
<column id="mapping" textcolor="255 255 255" width="40%">
<translatableAttribute id="heading" context="hotkey list">Mapping</translatableAttribute>
</column>
</object>

View File

@ -23,19 +23,19 @@
type="olist"
auto_scroll="true"
>
<column id="date" color="255 255 255" width="25%">
<column id="date" textcolor="255 255 255" width="25%">
<translatableAttribute id="heading" context="replay">Date / Time</translatableAttribute>
</column>
<column id="mapType" color="255 255 255" width="15%">
<column id="mapType" textcolor="255 255 255" width="15%">
<translatableAttribute id="heading" context="replay">Map Type</translatableAttribute>
</column>
<column id="mapName" color="255 255 255" width="35%">
<column id="mapName" textcolor="255 255 255" width="35%">
<translatableAttribute id="heading" context="replay">Map Name</translatableAttribute>
</column>
<column id="description" color="255 255 255" width="25%">
<column id="description" textcolor="255 255 255" width="25%">
<translatableAttribute id="heading" context="replay">Description</translatableAttribute>
</column>
</object>

View File

@ -13,13 +13,13 @@
</object>
<object name="leaderboardBox" style="ModernList" type="olist" size="19 19 100%-19 100%-62">
<column id="rank" color="255 255 255" width="15%">
<column id="rank" textcolor="255 255 255" width="15%">
<translatableAttribute id="heading">Rank</translatableAttribute>
</column>
<column id="name" color="255 255 255" width="55%">
<column id="name" textcolor="255 255 255" width="55%">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="rating" color="255 255 255" width="30%">
<column id="rating" textcolor="255 255 255" width="30%">
<translatableAttribute id="heading">Rating</translatableAttribute>
</column>
</object>

View File

@ -9,22 +9,22 @@
>
<column id="buddy" width="12"/>
<column id="private" width="20"/>
<column id="gameName" color="128 128 128" width="33%-12">
<column id="gameName" textcolor="128 128 128" width="33%-12">
<translatableAttribute id="heading">Name</translatableAttribute>
</column>
<column id="mapName" color="128 128 128" width="25%">
<column id="mapName" textcolor="128 128 128" width="25%">
<translatableAttribute id="heading">Map Name</translatableAttribute>
</column>
<column id="mapSize" color="128 128 128" width="16%">
<column id="mapSize" textcolor="128 128 128" width="16%">
<translatableAttribute id="heading" context="map">Size</translatableAttribute>
</column>
<column id="mapType" color="0 160 160" width="16%">
<column id="mapType" textcolor="0 160 160" width="16%">
<translatableAttribute id="heading" context="map">Type</translatableAttribute>
</column>
<column id="maxnbp" color="0 128 128" width="10%">
<column id="maxnbp" textcolor="0 128 128" width="10%">
<translatableAttribute id="heading">Players</translatableAttribute>
</column>
<column id="gameRating" color="0 160 160" width="16%">
<column id="gameRating" textcolor="0 160 160" width="16%">
<translatableAttribute id="heading">Rating</translatableAttribute>
</column>
</object>

View File

@ -67,27 +67,27 @@
<action on="MouseLeftDoubleClickItem">startReplay();</action>
<!-- Columns -->
<column id="months" color="172 172 212" width="12%">
<column id="months" textcolor="172 172 212" width="12%">
<translatableAttribute id="heading" context="replay">Date / Time</translatableAttribute>
</column>
<column id="players" color="192 192 192" width="44%">
<column id="players" textcolor="192 192 192" width="44%">
<translatableAttribute id="heading" context="replay">Players</translatableAttribute>
</column>
<column id="mapName" color="192 192 192" width="14%">
<column id="mapName" textcolor="192 192 192" width="14%">
<translatableAttribute id="heading" context="replay">Map Name</translatableAttribute>
</column>
<column id="mapSize" color="192 192 192" width="10%">
<column id="mapSize" textcolor="192 192 192" width="10%">
<translatableAttribute id="heading" context="replay">Size</translatableAttribute>
</column>
<column id="popCapacity" color="192 192 192" width="10%">
<column id="popCapacity" textcolor="192 192 192" width="10%">
<translatableAttribute id="heading" context="replay">Population</translatableAttribute>
</column>
<column id="duration" color="192 192 192" width="10%">
<column id="duration" textcolor="192 192 192" width="10%">
<translatableAttribute id="heading" context="replay">Duration</translatableAttribute>
</column>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2024 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -214,7 +214,7 @@ bool COList::HandleAdditionalChildren(const XMBData& xmb, const XMBElement& chil
std::string_view attr_name(xmb.GetAttributeStringView(attr.Name));
CStr attr_value(attr.Value);
if (attr_name == "color")
if (attr_name == "textcolor")
{
if (!CGUI::ParseString<CGUIColor>(&m_pGUI, attr_value.FromUTF8(), column.m_TextColor))
LOGERROR("GUI: Error parsing '%s' (\"%s\")", attr_name.data(), attr_value.c_str());