Merge lp:~widelands-dev/widelands/bug-1378801 into lp:widelands
- bug-1378801
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 7208 | ||||
Proposed branch: | lp:~widelands-dev/widelands/bug-1378801 | ||||
Merge into: | lp:widelands | ||||
Diff against target: |
452 lines (+121/-63) 2 files modified
src/editor/ui_menus/editor_main_menu_random_map.cc (+102/-56) src/editor/ui_menus/editor_main_menu_random_map.h (+19/-7) |
||||
To merge this branch: | bzr merge lp:~widelands-dev/widelands/bug-1378801 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
SirVer | Approve | ||
GunChleoc | Needs Resubmitting | ||
TiborB | Needs Fixing | ||
Review via email: mp+237599@code.launchpad.net |
Commit message
Description of the change
Fixed bug with mountains value in editor random map menu
GunChleoc (gunchleoc) wrote : | # |
I knew this was too easy *lol
TiborB (tiborb95) wrote : | # |
Hi, I was curious and came up with another solution - see revision 7205. But review and probably some polish is still neeeded.
Also, it would be reasonable and possible to add arrows (increase/decrease) also to 'mountains'
GunChleoc (gunchleoc) wrote : | # |
Thanks, that gave me a baseline to work from.
-1 to adding buttons for the mountain value. In another game, this kind of thing confused the hell out of me, because I never knew which other values would change when I pressed a button. This way, the user knows that the mountains are the first value that gets changed when you change one of the other values. Until you hit 0% / 100% anyway.
TiborB (tiborb95) wrote : | # |
you are welcome!
But I still believe that a change in one parameter should invoke
adjustments in all other parameters. But I do not insist.
And I am really interesting in your solution. To me this is a
mathematical/
2014-10-10 9:56 GMT+02:00 GunChleoc <email address hidden>:
> Thanks, that gave me a baseline to work from.
>
> -1 to adding buttons for the mountain value. In another game, this kind of
> thing confused the hell out of me, because I never knew which other values
> would change when I pressed a button. This way, the user knows that the
> mountains are the first value that gets changed when you change one of the
> other values. Until you hit 0% / 100% anyway.
> --
>
> https:/
> You are reviewing the proposed merge of
> lp:~widelands-dev/widelands/bug-1378801 into lp:widelands.
>
GunChleoc (gunchleoc) wrote : | # |
Yep, we have 2 different approaches: Yours is to distribute evenly, which makes for elegant code and nice mathematics. Mine is to change one value and then take care of the out of range issues afterwards. I also made sure that values get changed in steps of 5%, and this has the consequence that at most 2 values change at the same time, and I arranged it from bottom to top. I think that's just easier to control for the user. IMO it can get very fiddly if everything keeps changing at once and you want to set something specific.
SirVer (sirver) wrote : | # |
Added a bunch of comments in the review.
TiborB (tiborb95) wrote : | # |
Compilation fails here:
[ 59%] Building CXX object src/editor/
In file included from /var/widelands/BZR/bug-1378801/src/ui_
/var/widelands/BZR/bug-1378801/src/base/
TypeName(const TypeName&) = delete; ^
/var/widelands/BZR/bug-1378801/src/editor/
DISALLOW_
^
/var/widelands/BZR/bug-1378801/src/base/
TypeName(const TypeName&) = delete; ^
/var/widelands/BZR/bug-1378801/src/editor/
DISALLOW_
^
src/editor/
make[2]: *** [src/editor/
CMakeFiles/
make[1]: *** [src/editor/
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
GunChleoc (gunchleoc) wrote : | # |
All fixed now.
BTW the compilation failed because the DISALLOW_
GunChleoc (gunchleoc) wrote : | # |
OOps, I meant to resubmit
SirVer (sirver) wrote : | # |
> SirVer doesn't have time to wait for the compiler when doing code reviews,
that is a poor excuse :(. Sorry for that.
Code lgtm now.
GunChleoc (gunchleoc) wrote : | # |
No worries, I found it fast enough :)
Will merge
Preview Diff
1 | === modified file 'src/editor/ui_menus/editor_main_menu_random_map.cc' |
2 | --- src/editor/ui_menus/editor_main_menu_random_map.cc 2014-10-08 13:57:52 +0000 |
3 | +++ src/editor/ui_menus/editor_main_menu_random_map.cc 2014-10-12 06:27:37 +0000 |
4 | @@ -49,7 +49,7 @@ |
5 | (parent.get_w() - 260) / 2, |
6 | (parent.get_h() - 450) / 2, |
7 | 305, |
8 | - 490, |
9 | + 500, |
10 | _("New Random Map")), |
11 | // TRANSLATORS: The next are world names for the random map generator. |
12 | m_world_descriptions( |
13 | @@ -70,6 +70,7 @@ |
14 | m_waterval = 20; |
15 | m_landval = 60; |
16 | m_wastelandval = 0; |
17 | + m_mountainsval = 100 - m_waterval - m_landval - m_wastelandval; |
18 | m_pn = 1; |
19 | |
20 | // ---------- Random map number edit ---------- |
21 | @@ -81,7 +82,7 @@ |
22 | new UI::EditBox |
23 | (this, |
24 | posx, posy, |
25 | - width, 20, |
26 | + width, height, |
27 | g_gr->images().get("pics/but1.png")); |
28 | m_nrEditbox->changed.connect |
29 | (boost::bind(&MainMenuNewRandomMap::nr_edit_box_changed, this)); |
30 | @@ -90,7 +91,7 @@ |
31 | rng.rand(); |
32 | m_mapNumber = rng.rand(); |
33 | m_nrEditbox->set_text(std::to_string(static_cast<unsigned int>(m_mapNumber))); |
34 | - posy += height + spacing + spacing + spacing; |
35 | + posy += height + 3 * spacing; |
36 | |
37 | |
38 | // ---------- Width ---------- |
39 | @@ -106,7 +107,7 @@ |
40 | |
41 | UI::Button * widthupbtn = new UI::Button |
42 | (this, "width_up", |
43 | - get_inner_w() - spacing - 20, posy, 20, 20, |
44 | + get_inner_w() - spacing - height, posy, height, height, |
45 | g_gr->images().get("pics/but1.png"), |
46 | g_gr->images().get("pics/scrollbar_up.png")); |
47 | widthupbtn->sigclicked.connect |
48 | @@ -114,27 +115,27 @@ |
49 | |
50 | UI::Button * widthdownbtn = new UI::Button |
51 | (this, "width_down", |
52 | - posx, posy, 20, 20, |
53 | + posx, posy, height, height, |
54 | g_gr->images().get("pics/but1.png"), |
55 | g_gr->images().get("pics/scrollbar_down.png")); |
56 | widthdownbtn->sigclicked.connect |
57 | (boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::MAP_W_MINUS)); |
58 | |
59 | - m_width = new UI::Textarea(this, posx + spacing + 20, posy, |
60 | + m_width = new UI::Textarea(this, posx + spacing + height, posy, |
61 | (boost::format(_("Width: %u")) |
62 | % Widelands::MAP_DIMENSIONS[m_w]).str().c_str()); |
63 | |
64 | - posy += 20 + spacing + spacing; |
65 | + posy += height + 2 * spacing; |
66 | |
67 | // ---------- Height ---------- |
68 | |
69 | - m_height = new UI::Textarea(this, posx + spacing + 20, posy, |
70 | + m_height = new UI::Textarea(this, posx + spacing + height, posy, |
71 | (boost::format(_("Height: %u")) |
72 | % Widelands::MAP_DIMENSIONS[m_h]).str().c_str()); |
73 | |
74 | UI::Button * heightupbtn = new UI::Button |
75 | (this, "height_up", |
76 | - get_inner_w() - spacing - 20, posy, 20, 20, |
77 | + get_inner_w() - spacing - height, posy, height, height, |
78 | g_gr->images().get("pics/but1.png"), |
79 | g_gr->images().get("pics/scrollbar_up.png")); |
80 | heightupbtn->sigclicked.connect |
81 | @@ -142,20 +143,20 @@ |
82 | |
83 | UI::Button * heightdownbtn = new UI::Button |
84 | (this, "height_down", |
85 | - posx, posy, 20, 20, |
86 | + posx, posy, height, height, |
87 | g_gr->images().get("pics/but1.png"), |
88 | g_gr->images().get("pics/scrollbar_down.png")); |
89 | heightdownbtn->sigclicked.connect |
90 | (boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::MAP_H_MINUS)); |
91 | |
92 | - posy += 20 + spacing + spacing; |
93 | + posy += height + 4 * spacing; |
94 | |
95 | |
96 | // ---------- Water ----------- |
97 | |
98 | UI::Button * waterupbtn = new UI::Button |
99 | (this, "water_up", |
100 | - get_inner_w() - spacing - 20, posy, 20, 20, |
101 | + get_inner_w() - spacing - height, posy, height, height, |
102 | g_gr->images().get("pics/but1.png"), |
103 | g_gr->images().get("pics/scrollbar_up.png")); |
104 | waterupbtn->sigclicked.connect |
105 | @@ -163,16 +164,16 @@ |
106 | |
107 | UI::Button * waterdownbtn = new UI::Button |
108 | (this, "water_down", |
109 | - posx, posy, 20, 20, |
110 | + posx, posy, height, height, |
111 | g_gr->images().get("pics/but1.png"), |
112 | g_gr->images().get("pics/scrollbar_down.png")); |
113 | waterdownbtn->sigclicked.connect |
114 | (boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::WATER_MINUS)); |
115 | |
116 | - m_water = new UI::Textarea(this, posx + spacing + 20, posy, |
117 | + m_water = new UI::Textarea(this, posx + spacing + height, posy, |
118 | (boost::format(_("Water: %i %%")) % m_waterval).str().c_str()); |
119 | |
120 | - posy += 20 + spacing + spacing; |
121 | + posy += height + 2 * spacing; |
122 | |
123 | |
124 | |
125 | @@ -180,7 +181,7 @@ |
126 | |
127 | UI::Button * landupbtn = new UI::Button |
128 | (this, "land_up", |
129 | - get_inner_w() - spacing - 20, posy, 20, 20, |
130 | + get_inner_w() - spacing - height, posy, height, height, |
131 | g_gr->images().get("pics/but1.png"), |
132 | g_gr->images().get("pics/scrollbar_up.png")); |
133 | landupbtn->sigclicked.connect |
134 | @@ -188,16 +189,16 @@ |
135 | |
136 | UI::Button * landdownbtn = new UI::Button |
137 | (this, "land_down", |
138 | - posx, posy, 20, 20, |
139 | + posx, posy, height, height, |
140 | g_gr->images().get("pics/but1.png"), |
141 | g_gr->images().get("pics/scrollbar_down.png")); |
142 | landdownbtn->sigclicked.connect |
143 | (boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::LAND_MINUS)); |
144 | |
145 | - m_land = new UI::Textarea(this, posx + spacing + 20, posy, |
146 | + m_land = new UI::Textarea(this, posx + spacing + height, posy, |
147 | (boost::format(_("Land: %i %%")) % m_landval).str().c_str()); |
148 | |
149 | - posy += 20 + spacing + spacing; |
150 | + posy += height + 2 * spacing; |
151 | |
152 | |
153 | |
154 | @@ -205,7 +206,7 @@ |
155 | |
156 | UI::Button * wastelandupbtn = new UI::Button |
157 | (this, "wasteland_up", |
158 | - get_inner_w() - spacing - 20, posy, 20, 20, |
159 | + get_inner_w() - spacing - height, posy, height, height, |
160 | g_gr->images().get("pics/but1.png"), |
161 | g_gr->images().get("pics/scrollbar_up.png")); |
162 | wastelandupbtn->sigclicked.connect |
163 | @@ -213,32 +214,30 @@ |
164 | |
165 | UI::Button * wastelanddownbtn = new UI::Button |
166 | (this, "wasteland_down", |
167 | - posx, posy, 20, 20, |
168 | + posx, posy, height, height, |
169 | g_gr->images().get("pics/but1.png"), |
170 | g_gr->images().get("pics/scrollbar_down.png")); |
171 | wastelanddownbtn->sigclicked.connect |
172 | (boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::WASTE_MINUS)); |
173 | |
174 | - m_wasteland = new UI::Textarea(this, posx + spacing + 20, posy, |
175 | + m_wasteland = new UI::Textarea(this, posx + spacing + height, posy, |
176 | (boost::format(_("Wasteland: %i %%")) % m_wastelandval).str().c_str()); |
177 | |
178 | - posy += 20 + spacing + spacing; |
179 | + posy += height + 2 * spacing; |
180 | |
181 | |
182 | |
183 | // ---------- Mountains ----------- |
184 | |
185 | - m_mountains = new UI::Textarea(this, posx + spacing + 20, posy, |
186 | - (boost::format(_("Mountains: %i %%")) |
187 | - % (100 - m_waterval - m_landval - m_wastelandval)).str().c_str()); |
188 | - |
189 | - posy += 20 + spacing + spacing; |
190 | - |
191 | + m_mountains = new UI::Textarea(this, posx + spacing + height, posy, |
192 | + (boost::format(_("Mountains: %i %%")) % m_mountainsval).str().c_str()); |
193 | + |
194 | + posy += height + 2 * spacing; |
195 | |
196 | |
197 | // ---------- Island mode ---------- |
198 | |
199 | - Point pos(get_inner_w() - spacing - 20, posy); |
200 | + Point pos(get_inner_w() - spacing - height, posy); |
201 | m_island_mode = new UI::Checkbox(this, pos); |
202 | m_island_mode->set_state(true); |
203 | m_island_mode->changed.connect |
204 | @@ -267,7 +266,7 @@ |
205 | m_res_amounts[m_res_amount].c_str()); |
206 | m_res->sigclicked.connect(boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::SWITCH_RES)); |
207 | |
208 | - posy += height + spacing + spacing + spacing; |
209 | + posy += height + 3 * spacing; |
210 | |
211 | // ---------- Worlds ---------- |
212 | m_world = new UI::Button |
213 | @@ -278,23 +277,23 @@ |
214 | m_world->sigclicked.connect |
215 | (boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::SWITCH_WORLD)); |
216 | |
217 | - posy += height + spacing + spacing + spacing; |
218 | + posy += height + 3 * spacing; |
219 | |
220 | // ---------- Map ID String edit ---------- |
221 | |
222 | - new UI::Textarea(this, posx + spacing + 20, posy, _("Map ID:")); |
223 | + new UI::Textarea(this, posx, posy, _("Map ID:")); |
224 | posy += height + spacing; |
225 | |
226 | m_idEditbox = |
227 | new UI::EditBox |
228 | (this, |
229 | posx, posy, |
230 | - width, 20, |
231 | + width, height, |
232 | g_gr->images().get("pics/but1.png")); |
233 | m_idEditbox->set_text("abcd-efgh-ijkl-mnop"); |
234 | m_idEditbox->changed.connect |
235 | (boost::bind(&MainMenuNewRandomMap::id_edit_box_changed, this)); |
236 | - posy += height + spacing + spacing + spacing; |
237 | + posy += height + 3 * spacing; |
238 | |
239 | |
240 | |
241 | @@ -302,7 +301,7 @@ |
242 | |
243 | UI::Button * playerupbtn = new UI::Button |
244 | (this, "player_up", |
245 | - get_inner_w() - spacing - 20, posy, 20, 20, |
246 | + get_inner_w() - spacing - height, posy, height, height, |
247 | g_gr->images().get("pics/but1.png"), |
248 | g_gr->images().get("pics/scrollbar_up.png")); |
249 | playerupbtn->sigclicked.connect |
250 | @@ -310,17 +309,17 @@ |
251 | |
252 | UI::Button * playerdownbtn = new UI::Button |
253 | (this, "player_down", |
254 | - posx, posy, 20, 20, |
255 | + posx, posy, height, height, |
256 | g_gr->images().get("pics/but1.png"), |
257 | g_gr->images().get("pics/scrollbar_down.png")); |
258 | playerdownbtn->sigclicked.connect |
259 | (boost::bind(&MainMenuNewRandomMap::button_clicked, this, ButtonId::PLAYER_MINUS)); |
260 | |
261 | - m_players = new UI::Textarea(this, posx + spacing + 20, posy, |
262 | + m_players = new UI::Textarea(this, posx + spacing + height, posy, |
263 | (boost::format(_("Players: %u")) |
264 | % static_cast<unsigned int>(m_pn)).str().c_str()); |
265 | |
266 | - posy += 20 + spacing + spacing; |
267 | + posy += height + 2 * spacing; |
268 | |
269 | |
270 | |
271 | @@ -370,22 +369,26 @@ |
272 | case ButtonId::WATER_PLUS: |
273 | if (m_waterval < 60) |
274 | m_waterval += 5; |
275 | - if (m_landval + m_waterval > 100) |
276 | - m_landval -= 5; |
277 | + normalize_landmass(n); |
278 | break; |
279 | case ButtonId::WATER_MINUS: |
280 | - if (m_waterval > 0) |
281 | + if (m_waterval >= 5) |
282 | m_waterval -= 5; |
283 | + else |
284 | + m_waterval = 0; |
285 | + normalize_landmass(n); |
286 | break; |
287 | case ButtonId::LAND_PLUS: |
288 | if (m_landval < 100) |
289 | m_landval += 5; |
290 | - if (m_waterval + m_landval > 100) |
291 | - m_waterval -= 5; |
292 | + normalize_landmass(n); |
293 | break; |
294 | case ButtonId::LAND_MINUS: |
295 | - if (m_landval > 0) |
296 | + if (m_landval >= 5) |
297 | m_landval -= 5; |
298 | + else |
299 | + m_landval = 0; |
300 | + normalize_landmass(n); |
301 | break; |
302 | case ButtonId::SWITCH_WORLD: |
303 | ++ m_current_world; |
304 | @@ -396,11 +399,15 @@ |
305 | break; |
306 | case ButtonId::WASTE_PLUS: |
307 | if (m_wastelandval < 70) |
308 | - m_wastelandval += 10; |
309 | + m_wastelandval += 5; |
310 | + normalize_landmass(n); |
311 | break; |
312 | case ButtonId::WASTE_MINUS: |
313 | - if (m_wastelandval > 0) |
314 | - m_wastelandval -= 10; |
315 | + if (m_wastelandval >= 5) |
316 | + m_wastelandval -= 5; |
317 | + else |
318 | + m_wastelandval = 0; |
319 | + normalize_landmass(n); |
320 | break; |
321 | case ButtonId::SWITCH_RES: |
322 | ++ m_res_amount; |
323 | @@ -418,24 +425,63 @@ |
324 | if (m_h >= NUMBER_OF_MAP_DIMENSIONS) m_h = NUMBER_OF_MAP_DIMENSIONS - 1; |
325 | |
326 | m_width ->set_text((boost::format(_("Width: %u")) % Widelands::MAP_DIMENSIONS[m_w]).str().c_str()); |
327 | - |
328 | m_height->set_text((boost::format(_("Height: %u")) % Widelands::MAP_DIMENSIONS[m_h]).str().c_str()); |
329 | - |
330 | m_water->set_text((boost::format(_("Water: %i %%")) % m_waterval).str().c_str()); |
331 | - |
332 | m_land->set_text((boost::format(_("Land: %i %%")) % m_landval).str().c_str()); |
333 | - |
334 | m_wasteland->set_text((boost::format(_("Wasteland: %i %%")) % m_wastelandval).str().c_str()); |
335 | - |
336 | - m_mountains->set_text((boost::format(_("Mountains: %i %%")) |
337 | - % (100 - m_waterval - m_landval)).str().c_str()); |
338 | - |
339 | + m_mountains->set_text((boost::format(_("Mountains: %i %%")) % m_mountainsval).str().c_str()); |
340 | m_players->set_text((boost::format(_("Players: %u")) |
341 | % static_cast<unsigned int>(m_pn)).str().c_str()); |
342 | |
343 | nr_edit_box_changed(); // Update ID String |
344 | } |
345 | |
346 | + |
347 | +// If the the sum of our landmass is < 0% or > 100% change the mountain value. |
348 | +// If the mountain value gets out of range, change the other values. |
349 | +void MainMenuNewRandomMap::normalize_landmass(ButtonId clicked_button) { |
350 | + int32_t sum_without_mountainsval = m_waterval + m_landval + m_wastelandval; |
351 | + |
352 | + // Prefer changing mountainsval to keep consistency with old behaviour |
353 | + while (sum_without_mountainsval + m_mountainsval > 100) { |
354 | + m_mountainsval -= 1; |
355 | + } |
356 | + while (sum_without_mountainsval + m_mountainsval < 100) { |
357 | + m_mountainsval += 1; |
358 | + } |
359 | + |
360 | + // Compensate if mountainsval got above 100% / below 0% |
361 | + while (m_mountainsval < 0) { |
362 | + if (clicked_button != ButtonId::WASTE_PLUS && m_wastelandval > 0) { |
363 | + m_wastelandval -= 5; |
364 | + m_mountainsval += 5; |
365 | + } |
366 | + if (m_mountainsval < 0 && clicked_button != ButtonId::LAND_PLUS && m_landval > 0) { |
367 | + m_landval -= 5; |
368 | + m_mountainsval += 5; |
369 | + } |
370 | + if (m_mountainsval < 0 && clicked_button != ButtonId::WATER_PLUS && m_waterval > 0) { |
371 | + m_waterval -= 5; |
372 | + m_mountainsval += 5; |
373 | + } |
374 | + } |
375 | + |
376 | + while (m_mountainsval > 100) { |
377 | + if (clicked_button != ButtonId::WASTE_MINUS && m_wastelandval < 100) { |
378 | + m_wastelandval += 5; |
379 | + m_mountainsval -= 5; |
380 | + } |
381 | + if (m_mountainsval > 100 && clicked_button != ButtonId::LAND_MINUS && m_landval < 100) { |
382 | + m_landval += 5; |
383 | + m_mountainsval -= 5; |
384 | + } |
385 | + if (m_mountainsval > 100 && clicked_button != ButtonId::WATER_MINUS && m_waterval < 100) { |
386 | + m_waterval += 5; |
387 | + m_mountainsval -= 5; |
388 | + } |
389 | + } |
390 | +} |
391 | + |
392 | void MainMenuNewRandomMap::clicked_create_map() { |
393 | EditorInteractive & eia = |
394 | ref_cast<EditorInteractive, UI::Panel>(*get_parent()); |
395 | |
396 | === modified file 'src/editor/ui_menus/editor_main_menu_random_map.h' |
397 | --- src/editor/ui_menus/editor_main_menu_random_map.h 2014-09-14 12:13:35 +0000 |
398 | +++ src/editor/ui_menus/editor_main_menu_random_map.h 2014-10-12 06:27:37 +0000 |
399 | @@ -22,6 +22,7 @@ |
400 | |
401 | #include <vector> |
402 | |
403 | +#include "base/macros.h" |
404 | #include "ui_basic/checkbox.h" |
405 | #include "ui_basic/editbox.h" |
406 | #include "ui_basic/window.h" |
407 | @@ -68,6 +69,21 @@ |
408 | std::string descrname; |
409 | }; |
410 | |
411 | + void button_clicked(ButtonId); |
412 | + void clicked_create_map(); |
413 | + void id_edit_box_changed(); |
414 | + void nr_edit_box_changed(); |
415 | + |
416 | + // Ensures that the sum of our landmass is >= 0% and <= 100%, and changes |
417 | + // values as necessary. |
418 | + // \param clicked_button: The button that was clicked to change the values. |
419 | + // This function makes sure that after the normalization, |
420 | + // the value related to the button will still be set |
421 | + // as requested by the user. |
422 | + void normalize_landmass(MainMenuNewRandomMap::ButtonId clicked_button); |
423 | + |
424 | + void set_map_info(Widelands::UniqueRandomMapInfo & mapInfo) const; |
425 | + |
426 | const std::vector<WorldDescription> m_world_descriptions; |
427 | int m_current_world; |
428 | UI::Textarea * m_width, * m_height, * m_land; |
429 | @@ -76,7 +92,8 @@ |
430 | UI::Button * m_world; |
431 | UI::Checkbox * m_island_mode; |
432 | UI::Button * m_goButton; |
433 | - int32_t m_w, m_h, m_landval, m_waterval, m_wastelandval; |
434 | + int32_t m_w, m_h; |
435 | + int32_t m_landval, m_waterval, m_wastelandval, m_mountainsval; |
436 | uint8_t m_pn; |
437 | uint32_t m_mapNumber; |
438 | uint32_t m_res_amount; |
439 | @@ -85,12 +102,7 @@ |
440 | UI::EditBox * m_nrEditbox; |
441 | UI::EditBox * m_idEditbox; |
442 | |
443 | - void button_clicked(ButtonId); |
444 | - void clicked_create_map(); |
445 | - void id_edit_box_changed(); |
446 | - void nr_edit_box_changed(); |
447 | - |
448 | - void set_map_info(Widelands::UniqueRandomMapInfo & mapInfo) const; |
449 | + DISALLOW_COPY_AND_ASSIGN(MainMenuNewRandomMap); |
450 | }; |
451 | |
452 | #endif // end of include guard: WL_EDITOR_UI_MENUS_EDITOR_MAIN_MENU_RANDOM_MAP_H |
Open the new random map dialog window and increase the Wasteland to 30% - there is mathematical problem, perhaps overflow (underflow?)...