Skip to content

Commit e1f1afe

Browse files
author
Pavel Kovalenko
committed
Fix misplaced weather buttons in MP voting dialog.
1 parent 1a7264c commit e1f1afe

File tree

4 files changed

+38
-38
lines changed

4 files changed

+38
-38
lines changed

res/gamedata/configs/mp/map_list.ltx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[weather]
2-
Clear = 9:00
3-
Rain =16:00
4-
Night = 01:00
5-
Cloudy = 13:00
2+
clear = 9:00
3+
rain = 16:00
4+
night = 01:00
5+
cloudy = 13:00

res/gamedata/configs/ui/voting_category.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,30 +124,30 @@
124124
<text y="2" font="graffiti19" align="c">mm_mp_cancel</text>
125125
<texture>ui_inGame2_Mp_bigbuttone</texture>
126126
</btn_cancel>
127-
<btn_1 x="214" y="127" width="210" height="28" stretch="1">
127+
<btn_clear x="214" y="127" width="210" height="28" stretch="1">
128128
<texture>ui_inGame2_vote_button</texture>
129-
</btn_1>
130-
<btn_2 x="214" y="155" width="210" height="28" stretch="1">
129+
</btn_clear>
130+
<btn_rain x="214" y="155" width="210" height="28" stretch="1">
131131
<texture>ui_inGame2_vote_button</texture>
132-
</btn_2>
133-
<btn_3 x="214" y="184" width="210" height="28" stretch="1">
132+
</btn_rain>
133+
<btn_night x="214" y="184" width="210" height="28" stretch="1">
134134
<texture>ui_inGame2_vote_button</texture>
135-
</btn_3>
136-
<btn_4 x="214" y="212" width="210" height="28" stretch="1">
135+
</btn_night>
136+
<btn_cloudy x="214" y="212" width="210" height="28" stretch="1">
137137
<texture>ui_inGame2_vote_button</texture>
138-
</btn_4>
139-
<txt_1 x="222" y="127" width="200" height="28">
138+
</btn_cloudy>
139+
<txt_clear x="222" y="127" width="200" height="28">
140140
<text font="letterica16" r="170" g="170" b="170" vert_align="c" align="l">mp_weather_clear</text>
141-
</txt_1>
142-
<txt_2 x="222" y="155" width="200" height="28">
141+
</txt_clear>
142+
<txt_rain x="222" y="155" width="200" height="28">
143143
<text font="letterica16" r="170" g="170" b="170" vert_align="c" align="l">mp_weather_rain</text>
144-
</txt_2>
145-
<txt_3 x="222" y="184" width="200" height="28">
144+
</txt_rain>
145+
<txt_night x="222" y="184" width="200" height="28">
146146
<text font="letterica16" r="170" g="170" b="170" vert_align="c" align="l">mp_weather_night</text>
147-
</txt_3>
148-
<txt_4 x="222" y="212" width="200" height="28">
147+
</txt_night>
148+
<txt_cloudy x="222" y="212" width="200" height="28">
149149
<text font="letterica16" r="170" g="170" b="170" vert_align="c" align="l">mp_weather_cloudy</text>
150-
</txt_4>
150+
</txt_cloudy>
151151
</change_weather>
152152
<change_gametype x="205" y="166" width="624" height="411">
153153
<background x="0" y="0" width="624" height="411">

res/gamedata/configs/ui/voting_category_16.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,30 +124,30 @@
124124
<text y="2" font="graffiti19" align="c">mm_mp_cancel</text>
125125
<texture>ui_inGame2_Mp_bigbuttone</texture>
126126
</btn_cancel>
127-
<btn_1 x="171" y="127" width="168" height="28" stretch="1">
127+
<btn_clear x="171" y="127" width="168" height="28" stretch="1">
128128
<texture>ui_inGame2_vote_button</texture>
129-
</btn_1>
130-
<btn_2 x="171" y="155" width="168" height="28" stretch="1">
129+
</btn_clear>
130+
<btn_rain x="171" y="155" width="168" height="28" stretch="1">
131131
<texture>ui_inGame2_vote_button</texture>
132-
</btn_2>
133-
<btn_3 x="171" y="184" width="168" height="28" stretch="1">
132+
</btn_rain>
133+
<btn_night x="171" y="184" width="168" height="28" stretch="1">
134134
<texture>ui_inGame2_vote_button</texture>
135-
</btn_3>
136-
<btn_4 x="171" y="212" width="168" height="28" stretch="1">
135+
</btn_night>
136+
<btn_cloudy x="171" y="212" width="168" height="28" stretch="1">
137137
<texture>ui_inGame2_vote_button</texture>
138-
</btn_4>
139-
<txt_1 x="177" y="127" width="160" height="28">
138+
</btn_cloudy>
139+
<txt_clear x="177" y="127" width="160" height="28">
140140
<text font="letterica16" r="170" g="170" b="170" vert_align="c" align="l">mp_weather_clear</text>
141-
</txt_1>
142-
<txt_2 x="177" y="155" width="160" height="28">
141+
</txt_clear>
142+
<txt_rain x="177" y="155" width="160" height="28">
143143
<text font="letterica16" r="170" g="170" b="170" vert_align="c" align="l">mp_weather_rain</text>
144-
</txt_2>
145-
<txt_3 x="177" y="184" width="160" height="28">
144+
</txt_rain>
145+
<txt_night x="177" y="184" width="160" height="28">
146146
<text font="letterica16" r="170" g="170" b="170" vert_align="c" align="l">mp_weather_night</text>
147-
</txt_3>
148-
<txt_4 x="177" y="212" width="160" height="28">
147+
</txt_night>
148+
<txt_cloudy x="177" y="212" width="160" height="28">
149149
<text font="letterica16" r="170" g="170" b="170" vert_align="c" align="l">mp_weather_cloudy</text>
150-
</txt_4>
150+
</txt_cloudy>
151151
</change_weather>
152152
<change_gametype x="266" y="166" width="499" height="411">
153153
<background x="0" y="0" width="499" height="411" stretch="1">

src/xrGame/ui/ChangeWeatherDialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ void ChangeWeatherDialog::InitChangeWeather(CUIXml& xmlDoc)
9898
string256 path;
9999
for (u32 i = 0; i < weatherItems.size(); i++)
100100
{
101-
xr_sprintf(path, "change_weather:btn_%d", i+1);
101+
xr_sprintf(path, "change_weather:btn_%s", gameWeathers[i].m_weather_name.c_str());
102102
CUIXmlInit::Init3tButton(xmlDoc, path, 0, GetButton(i).Button);
103-
xr_sprintf(path, "change_weather:txt_%d", i+1);
103+
xr_sprintf(path, "change_weather:txt_%s", gameWeathers[i].m_weather_name.c_str());
104104
CUIXmlInit::InitTextWnd(xmlDoc, path, 0, GetButton(i).Text);
105105
weatherItems[i].Name = gameWeathers[i].m_weather_name;
106106
weatherItems[i].Time = gameWeathers[i].m_start_time;

0 commit comments

Comments
 (0)