Merge lp:~thenifker13-deactivatedaccount/widelands/trunk into lp:widelands
- trunk
- Merge into trunk
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~thenifker13-deactivatedaccount/widelands/trunk | ||||
Merge into: | lp:widelands | ||||
Diff against target: |
265 lines (+90/-2) 15 files modified
src/editor/editorinteractive.cc (+3/-1) src/editor/ui_menus/main_menu.cc (+16/-0) src/editor/ui_menus/main_menu.h (+2/-0) src/ui_basic/window.cc (+20/-0) src/ui_basic/window.h (+1/-0) src/ui_fsmenu/campaign_select.cc (+2/-0) src/ui_fsmenu/loadgame.cc (+2/-0) src/ui_fsmenu/mapselect.cc (+2/-0) src/ui_fsmenu/scenario_select.cc (+2/-0) src/wui/game_message_menu.cc (+4/-0) src/wui/game_options_menu.cc (+22/-0) src/wui/game_options_menu.h (+5/-0) src/wui/interactive_player.cc (+3/-1) src/wui/login_box.cc (+3/-0) src/wui/story_message_box.cc (+3/-0) |
||||
To merge this branch: | bzr merge lp:~thenifker13-deactivatedaccount/widelands/trunk | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Toni Förster | Approve | ||
Widelands Developers | Pending | ||
Review via email: mp+368235@code.launchpad.net |
Commit message
Description of the change
Window closing, opening OptionsMenu and exiting using the keyboard.
- 9124. By Antonino Siena
-
Added space to comment
Toni Förster (stonerl) wrote : | # |
When a window looses focus, it cannot be closed by ESC any more. E.g. open the stats menu and then the mini map. The mini map can be closed with ESC but not the stats menu. Instead, the main menu opens.
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Is it possible to access all windows(like in a vector/array)?
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 5136. State: passed. Details: https:/
Appveyor build 4918. State: failed. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
No, but you can access a Panel's children and parent internally. Have a look at Panel::do_think() to see how to iterate through a panel's children.
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Fixed it - will push it now!
- 9125. By Antonino Siena
-
When closing a window using ESCAPE will cause the next open window to gain focus
Toni Förster (stonerl) wrote : | # |
LGTM :)
There are some menus in the game, e.g. the tutorial screen, that do not handle the ESC key. That's not part of the feature but if you'd like to tip your toes into, it would be much appreciated.
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
I'm gonna look into these too, contemporary.
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
So you mean it should be implemented for 'story_message_box' too?
GunChleoc (gunchleoc) wrote : | # |
I have added some notes to the diff for further improvements that you can make.
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Forgot to add the binding there, thanks.
Yes I want to add a binding for GameMessageMenu too, but I didnt figure
yet out how to properly bind in this case.
I tried it previously like this:
/SDL_Keysym esc = SDL_Keysym{
KMOD_NONE, 0}; list->cancel.
boost::ref(*this), _1, _2)(true, esc) );/
Ok I just removed the else case as it is not necessary because of return
in the if case.
Am 04.06.19 um 17:44 schrieb GunChleoc:
> I have added some notes to the diff for further improvements that you can make.
>
> Diff comments:
>
>> === modified file 'src/ui_
>> --- src/ui_
>> +++ src/ui_
>> @@ -170,6 +170,10 @@
>> }
>>
>> bool FullscreenMenuL
>> + if (code.sym == SDLK_ESCAPE)
> You should be able to define load_or_
>
>> + FullscreenMenuL
>> + return true;
>> +
>> if (!down)
>> return false;
>>
>>
>> === modified file 'src/wui/
>> --- src/wui/
>> +++ src/wui/
>> @@ -362,6 +362,10 @@
>> * Handle message menu hotkeys.
>> */
>> bool GameMessageMenu
>> + // Special ESCAPE handling
>> + // When ESCAPE is pressed down is false
>> + if (code.sym == SDLK_ESCAPE)
>> + return UI::Window:
> The difference for ths function is that it has
>
>
> return list->handle_
>
> on the bottom. Do an if-else around that and you might not need the special handling.
>
>> if (down) {
>> switch (code.sym) {
>> // Don't forget to change the tooltips if any of these get reassigned
>>
>> === modified file 'src/wui/
>> --- src/wui/
>> +++ src/wui/
>> @@ -101,6 +101,28 @@
>> center_to_parent();
>> }
>>
>> +bool GameOptionsMenu
>> + if (down) {
>> + switch (code.sym) {
>> + case SDLK_ESCAPE:
>> + die();
>> + return true;
>> + case SDLK_RETURN:
>> + if ((code.mod & (KMOD_LCTRL | KMOD_RCTRL))) {
>> + igb_.end_
>> + return true;
>> + }
>> + else
> We try to avoid if/else/for without {}, because leaving them out can cause bugs.
>
>> + new GameExitConfirm
>> + die();
>> + return true;
>> + default:
>> + break;
>> + }
>> + }
>> + return UI::Window:
>> +}
>> +
>> GameOptionsMenu
>> }
>>
>
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 5153. State: failed. Details: https:/
Appveyor build 4935. State: failed. Details: https:/
GunChleoc (gunchleoc) wrote : | # |
2 more comments.
This branch breaks map keyboard navigation with the arrow keys though as soon as a buildingwindow is open. So, BuildingWindow needs to check whether Window has handled the key and if not, delegate it to its parent_.
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Firstly how do I check if the sibling I get from get_next_sibling() from Panel is actually one?
And from which windows should it be possible to navigate?
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Trying in window.cc - doesnt work so far:
"
case SDLK_UP:
case SDLK_DOWN:
case SDLK_LEFT:
case SDLK_RIGHT:{
Panel *p = get_parent();
return p->handle_key(down, code);
}
"
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
No ideas?
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Literally no one that has any idea?
GunChleoc (gunchleoc) wrote : | # |
Sorry I didn't get back to you earlier, I don't have much time for Widelands at the moment.
I did some digging into the code, and for some weird reason, map movement with the arrow keys is implemented in InteractiveBase
This is also creating problems for me in another branch, so I think I better have a look at it in a new branch, and then retest this branch once the other branch has been merged.
GunChleoc (gunchleoc) wrote : | # |
Merge request for the map keyboard navigation is up: https:/
GunChleoc (gunchleoc) wrote : | # |
The other branch has been merged now. Can you please merge trunk into this one so that we can retest?
- 9131. By Antonino Siena
-
Merged trunk here
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Merged trunk right now.
bunnybot (widelandsofficial) wrote : | # |
Continuous integration builds have changed state:
Travis build 5289. State: failed. Details: https:/
Appveyor build 5064. State: success. Details: https:/
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Has someone else tested it already?
GunChleoc (gunchleoc) wrote : | # |
I'm sorry, Launchpad did not notify us on your comments. *headdesk* Can you contact me personally via https:/
The files src/editor/
I have done some testing, and it is working well now :)
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Ill do so. Id rather move to GitLab but GitHub should be fine.
When trying to merge I then got this compilation error I was unsure about:
"
../src/
844 | new EditorMainMenu(
| ^~~~~~~~~~~~~~
"
GunChleoc (gunchleoc) wrote : | # |
That's because the class EditorMainMenu does not exist any more. It has been replaced with UI::Dropdown<
Antonino Siena (thenifker13-deactivatedaccount) wrote : | # |
Ok, good to know - Ill take a look at it the next days.
Am 08.09.19 um 17:28 schrieb GunChleoc:
> That's because the class EditorMainMenu does not exist any more. It has been replaced with UI::Dropdown<
GunChleoc (gunchleoc) wrote : | # |
Unmerged revisions
- 9131. By Antonino Siena
-
Merged trunk here
- 9130. By Antonino Siena
-
Proper ESCAPE handling
- 9129. By Antonino Siena
-
Removed unnecessary else-case
- 9128. By Antonino Siena
-
Added ESCAPE -> back functionality for main menu menues
- 9127. By Antonino Siena
-
Open and Close Editor menu using ESCAPE and exit from from Editor using ENTER
- 9126. By Antonino Siena
-
Allow ESCAPE to close story_message_box
- 9125. By Antonino Siena
-
When closing a window using ESCAPE will cause the next open window to gain focus
- 9124. By Antonino Siena
-
Added space to comment
- 9123. By Antonino Siena
-
Instant exit using CTRL+ENTER
- 9122. By Antonino Siena
-
Removed empty line and changed special ESCAPE handling a bit
Preview Diff
1 | === modified file 'src/editor/editorinteractive.cc' | |||
2 | --- src/editor/editorinteractive.cc 2019-04-26 05:52:49 +0000 | |||
3 | +++ src/editor/editorinteractive.cc 2019-07-28 13:42:36 +0000 | |||
4 | @@ -566,7 +566,9 @@ | |||
5 | 566 | case SDLK_F1: | 566 | case SDLK_F1: |
6 | 567 | helpmenu_.toggle(); | 567 | helpmenu_.toggle(); |
7 | 568 | return true; | 568 | return true; |
9 | 569 | 569 | case SDLK_ESCAPE: | |
10 | 570 | new EditorMainMenu(*this, mainmenu_); | ||
11 | 571 | return true; | ||
12 | 570 | default: | 572 | default: |
13 | 571 | break; | 573 | break; |
14 | 572 | } | 574 | } |
15 | 573 | 575 | ||
16 | === modified file 'src/editor/ui_menus/main_menu.cc' | |||
17 | --- src/editor/ui_menus/main_menu.cc 2019-02-23 11:00:49 +0000 | |||
18 | +++ src/editor/ui_menus/main_menu.cc 2019-07-28 13:42:36 +0000 | |||
19 | @@ -82,6 +82,22 @@ | |||
20 | 82 | center_to_parent(); | 82 | center_to_parent(); |
21 | 83 | } | 83 | } |
22 | 84 | 84 | ||
23 | 85 | bool EditorMainMenu::handle_key(bool down, SDL_Keysym code) { | ||
24 | 86 | if (down) { | ||
25 | 87 | switch (code.sym) { | ||
26 | 88 | case SDLK_ESCAPE: | ||
27 | 89 | die(); | ||
28 | 90 | return true; | ||
29 | 91 | case SDLK_RETURN: | ||
30 | 92 | exit_btn(); | ||
31 | 93 | return true; | ||
32 | 94 | default: | ||
33 | 95 | break; | ||
34 | 96 | } | ||
35 | 97 | } | ||
36 | 98 | return UI::Window::handle_key(down, code); | ||
37 | 99 | } | ||
38 | 100 | |||
39 | 85 | void EditorMainMenu::new_map_btn() { | 101 | void EditorMainMenu::new_map_btn() { |
40 | 86 | new MainMenuNewMap(eia()); | 102 | new MainMenuNewMap(eia()); |
41 | 87 | die(); | 103 | die(); |
42 | 88 | 104 | ||
43 | === modified file 'src/editor/ui_menus/main_menu.h' | |||
44 | --- src/editor/ui_menus/main_menu.h 2019-02-23 11:00:49 +0000 | |||
45 | +++ src/editor/ui_menus/main_menu.h 2019-07-28 13:42:36 +0000 | |||
46 | @@ -32,6 +32,8 @@ | |||
47 | 32 | struct EditorMainMenu : public UI::UniqueWindow { | 32 | struct EditorMainMenu : public UI::UniqueWindow { |
48 | 33 | EditorMainMenu(EditorInteractive&, UI::UniqueWindow::Registry&); | 33 | EditorMainMenu(EditorInteractive&, UI::UniqueWindow::Registry&); |
49 | 34 | 34 | ||
50 | 35 | bool handle_key(bool down, SDL_Keysym code) override; | ||
51 | 36 | |||
52 | 35 | private: | 37 | private: |
53 | 36 | EditorInteractive& eia(); | 38 | EditorInteractive& eia(); |
54 | 37 | UI::Box box_; | 39 | UI::Box box_; |
55 | 38 | 40 | ||
56 | === modified file 'src/ui_basic/window.cc' | |||
57 | --- src/ui_basic/window.cc 2019-07-27 11:20:37 +0000 | |||
58 | +++ src/ui_basic/window.cc 2019-07-28 13:42:36 +0000 | |||
59 | @@ -101,6 +101,7 @@ | |||
60 | 101 | VT_B_PIXMAP_THICKNESS, VT_B_PIXMAP_THICKNESS, TP_B_PIXMAP_THICKNESS, BT_B_PIXMAP_THICKNESS); | 101 | VT_B_PIXMAP_THICKNESS, VT_B_PIXMAP_THICKNESS, TP_B_PIXMAP_THICKNESS, BT_B_PIXMAP_THICKNESS); |
61 | 102 | set_top_on_click(true); | 102 | set_top_on_click(true); |
62 | 103 | set_layout_toplevel(true); | 103 | set_layout_toplevel(true); |
63 | 104 | focus(); | ||
64 | 104 | } | 105 | } |
65 | 105 | 106 | ||
66 | 106 | /** | 107 | /** |
67 | @@ -411,6 +412,25 @@ | |||
68 | 411 | return true; | 412 | return true; |
69 | 412 | } | 413 | } |
70 | 413 | 414 | ||
71 | 415 | bool Window::handle_key(bool down, SDL_Keysym code) { | ||
72 | 416 | // Handles a key input and event and will close when pressing ESC | ||
73 | 417 | |||
74 | 418 | if (down) { | ||
75 | 419 | switch (code.sym) { | ||
76 | 420 | case SDLK_ESCAPE: { | ||
77 | 421 | die(); | ||
78 | 422 | Panel *ch = get_next_sibling(); | ||
79 | 423 | if (ch != nullptr) | ||
80 | 424 | ch->focus(); | ||
81 | 425 | return true; | ||
82 | 426 | } | ||
83 | 427 | default: | ||
84 | 428 | break; | ||
85 | 429 | } | ||
86 | 430 | } | ||
87 | 431 | return UI::Panel::handle_key(down, code); | ||
88 | 432 | } | ||
89 | 433 | |||
90 | 414 | /** | 434 | /** |
91 | 415 | * Close the window. Overwrite this virtual method if you want | 435 | * Close the window. Overwrite this virtual method if you want |
92 | 416 | * to take some action before the window is destroyed, or to | 436 | * to take some action before the window is destroyed, or to |
93 | 417 | 437 | ||
94 | === modified file 'src/ui_basic/window.h' | |||
95 | --- src/ui_basic/window.h 2019-02-23 11:00:49 +0000 | |||
96 | +++ src/ui_basic/window.h 2019-07-28 13:42:36 +0000 | |||
97 | @@ -98,6 +98,7 @@ | |||
98 | 98 | handle_mousemove(uint8_t state, int32_t mx, int32_t my, int32_t xdiff, int32_t ydiff) override; | 98 | handle_mousemove(uint8_t state, int32_t mx, int32_t my, int32_t xdiff, int32_t ydiff) override; |
99 | 99 | bool handle_mousewheel(uint32_t which, int32_t x, int32_t y) override; | 99 | bool handle_mousewheel(uint32_t which, int32_t x, int32_t y) override; |
100 | 100 | bool handle_tooltip() override; | 100 | bool handle_tooltip() override; |
101 | 101 | bool handle_key(bool down, SDL_Keysym code) override; | ||
102 | 101 | 102 | ||
103 | 102 | protected: | 103 | protected: |
104 | 103 | void die() override; | 104 | void die() override; |
105 | 104 | 105 | ||
106 | === modified file 'src/ui_fsmenu/campaign_select.cc' | |||
107 | --- src/ui_fsmenu/campaign_select.cc 2019-05-26 17:21:15 +0000 | |||
108 | +++ src/ui_fsmenu/campaign_select.cc 2019-07-28 13:42:36 +0000 | |||
109 | @@ -74,6 +74,8 @@ | |||
110 | 74 | table_.focus(); | 74 | table_.focus(); |
111 | 75 | fill_table(); | 75 | fill_table(); |
112 | 76 | layout(); | 76 | layout(); |
113 | 77 | |||
114 | 78 | table_.cancel.connect(boost::bind(&FullscreenMenuCampaignSelect::clicked_back, boost::ref(*this))); | ||
115 | 77 | } | 79 | } |
116 | 78 | 80 | ||
117 | 79 | void FullscreenMenuCampaignSelect::layout() { | 81 | void FullscreenMenuCampaignSelect::layout() { |
118 | 80 | 82 | ||
119 | === modified file 'src/ui_fsmenu/loadgame.cc' | |||
120 | --- src/ui_fsmenu/loadgame.cc 2019-05-26 17:21:15 +0000 | |||
121 | +++ src/ui_fsmenu/loadgame.cc 2019-07-28 13:42:36 +0000 | |||
122 | @@ -109,6 +109,8 @@ | |||
123 | 109 | if (!load_or_save_.table().empty()) { | 109 | if (!load_or_save_.table().empty()) { |
124 | 110 | load_or_save_.table().select(0); | 110 | load_or_save_.table().select(0); |
125 | 111 | } | 111 | } |
126 | 112 | |||
127 | 113 | load_or_save_.table_.cancel.connect(boost::bind(&FullscreenMenuLoadGame::clicked_back, boost::ref(*this))); | ||
128 | 112 | } | 114 | } |
129 | 113 | 115 | ||
130 | 114 | void FullscreenMenuLoadGame::layout() { | 116 | void FullscreenMenuLoadGame::layout() { |
131 | 115 | 117 | ||
132 | === modified file 'src/ui_fsmenu/mapselect.cc' | |||
133 | --- src/ui_fsmenu/mapselect.cc 2019-05-26 17:21:15 +0000 | |||
134 | +++ src/ui_fsmenu/mapselect.cc 2019-07-28 13:42:36 +0000 | |||
135 | @@ -298,6 +298,8 @@ | |||
136 | 298 | table_.select(0); | 298 | table_.select(0); |
137 | 299 | } | 299 | } |
138 | 300 | set_has_selection(); | 300 | set_has_selection(); |
139 | 301 | |||
140 | 302 | table_.cancel.connect(boost::bind(&FullscreenMenuMapSelect::clicked_back, boost::ref(*this))); | ||
141 | 301 | } | 303 | } |
142 | 302 | 304 | ||
143 | 303 | /* | 305 | /* |
144 | 304 | 306 | ||
145 | === modified file 'src/ui_fsmenu/scenario_select.cc' | |||
146 | --- src/ui_fsmenu/scenario_select.cc 2019-05-26 17:21:15 +0000 | |||
147 | +++ src/ui_fsmenu/scenario_select.cc 2019-07-28 13:42:36 +0000 | |||
148 | @@ -118,6 +118,8 @@ | |||
149 | 118 | table_.focus(); | 118 | table_.focus(); |
150 | 119 | fill_table(); | 119 | fill_table(); |
151 | 120 | layout(); | 120 | layout(); |
152 | 121 | |||
153 | 122 | table_.cancel.connect(boost::bind(&FullscreenMenuScenarioSelect::clicked_back, boost::ref(*this))); | ||
154 | 121 | } | 123 | } |
155 | 122 | 124 | ||
156 | 123 | void FullscreenMenuScenarioSelect::layout() { | 125 | void FullscreenMenuScenarioSelect::layout() { |
157 | 124 | 126 | ||
158 | === modified file 'src/wui/game_message_menu.cc' | |||
159 | --- src/wui/game_message_menu.cc 2019-06-25 07:34:58 +0000 | |||
160 | +++ src/wui/game_message_menu.cc 2019-07-28 13:42:36 +0000 | |||
161 | @@ -360,6 +360,10 @@ | |||
162 | 360 | * Handle message menu hotkeys. | 360 | * Handle message menu hotkeys. |
163 | 361 | */ | 361 | */ |
164 | 362 | bool GameMessageMenu::handle_key(bool down, SDL_Keysym code) { | 362 | bool GameMessageMenu::handle_key(bool down, SDL_Keysym code) { |
165 | 363 | // Special ESCAPE handling | ||
166 | 364 | // When ESCAPE is pressed down is false | ||
167 | 365 | if (code.sym == SDLK_ESCAPE) | ||
168 | 366 | return UI::Window::handle_key(true, code); | ||
169 | 363 | if (down) { | 367 | if (down) { |
170 | 364 | switch (code.sym) { | 368 | switch (code.sym) { |
171 | 365 | // Don't forget to change the tooltips if any of these get reassigned | 369 | // Don't forget to change the tooltips if any of these get reassigned |
172 | 366 | 370 | ||
173 | === modified file 'src/wui/game_options_menu.cc' | |||
174 | --- src/wui/game_options_menu.cc 2019-03-18 07:11:02 +0000 | |||
175 | +++ src/wui/game_options_menu.cc 2019-07-28 13:42:36 +0000 | |||
176 | @@ -101,6 +101,28 @@ | |||
177 | 101 | center_to_parent(); | 101 | center_to_parent(); |
178 | 102 | } | 102 | } |
179 | 103 | 103 | ||
180 | 104 | bool GameOptionsMenu::handle_key(bool down, SDL_Keysym code) { | ||
181 | 105 | if (down) { | ||
182 | 106 | switch (code.sym) { | ||
183 | 107 | case SDLK_ESCAPE: | ||
184 | 108 | die(); | ||
185 | 109 | return true; | ||
186 | 110 | case SDLK_RETURN: | ||
187 | 111 | if ((code.mod & (KMOD_LCTRL | KMOD_RCTRL))) { | ||
188 | 112 | igb_.end_modal<UI::Panel::Returncodes>(UI::Panel::Returncodes::kBack); | ||
189 | 113 | return true; | ||
190 | 114 | } | ||
191 | 115 | |||
192 | 116 | new GameExitConfirmBox(*get_parent(), igb_); | ||
193 | 117 | die(); | ||
194 | 118 | return true; | ||
195 | 119 | default: | ||
196 | 120 | break; | ||
197 | 121 | } | ||
198 | 122 | } | ||
199 | 123 | return UI::Window::handle_key(down, code); | ||
200 | 124 | } | ||
201 | 125 | |||
202 | 104 | GameOptionsMenu::~GameOptionsMenu() { | 126 | GameOptionsMenu::~GameOptionsMenu() { |
203 | 105 | } | 127 | } |
204 | 106 | 128 | ||
205 | 107 | 129 | ||
206 | === modified file 'src/wui/game_options_menu.h' | |||
207 | --- src/wui/game_options_menu.h 2019-02-23 11:00:49 +0000 | |||
208 | +++ src/wui/game_options_menu.h 2019-07-28 13:42:36 +0000 | |||
209 | @@ -32,8 +32,13 @@ | |||
210 | 32 | GameOptionsMenu(InteractiveGameBase&, | 32 | GameOptionsMenu(InteractiveGameBase&, |
211 | 33 | UI::UniqueWindow::Registry&, | 33 | UI::UniqueWindow::Registry&, |
212 | 34 | InteractiveGameBase::GameMainMenuWindows&); | 34 | InteractiveGameBase::GameMainMenuWindows&); |
213 | 35 | |||
214 | 36 | bool handle_key(bool down, SDL_Keysym code) override; | ||
215 | 37 | |||
216 | 38 | |||
217 | 35 | ~GameOptionsMenu(); | 39 | ~GameOptionsMenu(); |
218 | 36 | 40 | ||
219 | 41 | |||
220 | 37 | private: | 42 | private: |
221 | 38 | InteractiveGameBase& igb_; | 43 | InteractiveGameBase& igb_; |
222 | 39 | InteractiveGameBase::GameMainMenuWindows& windows_; | 44 | InteractiveGameBase::GameMainMenuWindows& windows_; |
223 | 40 | 45 | ||
224 | === modified file 'src/wui/interactive_player.cc' | |||
225 | --- src/wui/interactive_player.cc 2019-05-31 19:31:45 +0000 | |||
226 | +++ src/wui/interactive_player.cc 2019-07-28 13:42:36 +0000 | |||
227 | @@ -487,7 +487,9 @@ | |||
228 | 487 | map_view()->scroll_to_field( | 487 | map_view()->scroll_to_field( |
229 | 488 | game().map().get_starting_pos(player_number_), MapView::Transition::Smooth); | 488 | game().map().get_starting_pos(player_number_), MapView::Transition::Smooth); |
230 | 489 | return true; | 489 | return true; |
232 | 490 | 490 | case SDLK_ESCAPE: | |
233 | 491 | new GameOptionsMenu(*this, options_, main_windows_); | ||
234 | 492 | return true; | ||
235 | 491 | case SDLK_KP_ENTER: | 493 | case SDLK_KP_ENTER: |
236 | 492 | case SDLK_RETURN: | 494 | case SDLK_RETURN: |
237 | 493 | if (chat_provider_) { | 495 | if (chat_provider_) { |
238 | 494 | 496 | ||
239 | === modified file 'src/wui/login_box.cc' | |||
240 | --- src/wui/login_box.cc 2019-06-01 11:29:24 +0000 | |||
241 | +++ src/wui/login_box.cc 2019-07-28 13:42:36 +0000 | |||
242 | @@ -81,6 +81,9 @@ | |||
243 | 81 | } | 81 | } |
244 | 82 | 82 | ||
245 | 83 | eb_nickname->focus(); | 83 | eb_nickname->focus(); |
246 | 84 | |||
247 | 85 | eb_nickname->cancel.connect(boost::bind(&LoginBox::clicked_back, boost::ref(*this))); | ||
248 | 86 | eb_password->cancel.connect(boost::bind(&LoginBox::clicked_back, boost::ref(*this))); | ||
249 | 84 | } | 87 | } |
250 | 85 | 88 | ||
251 | 86 | /// think function of the UI (main loop) | 89 | /// think function of the UI (main loop) |
252 | 87 | 90 | ||
253 | === modified file 'src/wui/story_message_box.cc' | |||
254 | --- src/wui/story_message_box.cc 2019-02-23 11:00:49 +0000 | |||
255 | +++ src/wui/story_message_box.cc 2019-07-28 13:42:36 +0000 | |||
256 | @@ -97,6 +97,9 @@ | |||
257 | 97 | case SDLK_RETURN: | 97 | case SDLK_RETURN: |
258 | 98 | clicked_ok(); | 98 | clicked_ok(); |
259 | 99 | return true; | 99 | return true; |
260 | 100 | case SDLK_ESCAPE: | ||
261 | 101 | clicked_ok(); | ||
262 | 102 | return UI::Window::handle_key(down, code); | ||
263 | 100 | default: | 103 | default: |
264 | 101 | break; // not handled | 104 | break; // not handled |
265 | 102 | } | 105 | } |
Continuous integration builds have changed state:
Travis build 5130. State: failed. Details: https:/ /travis- ci.org/ widelands/ widelands/ builds/ 540341469. /ci.appveyor. com/project/ widelands- dev/widelands/ build/_ thenifker13_ widelands_ trunk-4912.
Appveyor build 4912. State: failed. Details: https:/