mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r7023) -Fix: Pressing F1 in scenario editor did not work because the keypress event was sent
twice. due to e->we.keypress.cont not being set to false. Also indent the switch statements for some coding style bonus points.
This commit is contained in:
parent
eadf788cc5
commit
6c76a89c20
30
main_gui.c
30
main_gui.c
@ -2034,21 +2034,23 @@ static void ScenEditToolbarWndProc(Window *w, WindowEvent *e)
|
|||||||
|
|
||||||
case WE_KEYPRESS:
|
case WE_KEYPRESS:
|
||||||
switch (e->we.keypress.keycode) {
|
switch (e->we.keypress.keycode) {
|
||||||
case WKC_F1: ToolbarPauseClick(w); break;
|
case WKC_F1: ToolbarPauseClick(w); break;
|
||||||
case WKC_F2: ShowGameOptions(); break;
|
case WKC_F2: ShowGameOptions(); break;
|
||||||
case WKC_F3: MenuClickSaveLoad(0); break;
|
case WKC_F3: MenuClickSaveLoad(0); break;
|
||||||
case WKC_F4: ToolbarScenGenLand(w); break;
|
case WKC_F4: ToolbarScenGenLand(w); break;
|
||||||
case WKC_F5: ToolbarScenGenTown(w); break;
|
case WKC_F5: ToolbarScenGenTown(w); break;
|
||||||
case WKC_F6: ToolbarScenGenIndustry(w); break;
|
case WKC_F6: ToolbarScenGenIndustry(w); break;
|
||||||
case WKC_F7: ToolbarScenBuildRoad(w); break;
|
case WKC_F7: ToolbarScenBuildRoad(w); break;
|
||||||
case WKC_F8: ToolbarScenPlantTrees(w); break;
|
case WKC_F8: ToolbarScenPlantTrees(w); break;
|
||||||
case WKC_F9: ToolbarScenPlaceSign(w); break;
|
case WKC_F9: ToolbarScenPlaceSign(w); break;
|
||||||
case WKC_F10: ShowMusicWindow(); break;
|
case WKC_F10: ShowMusicWindow(); break;
|
||||||
case WKC_F11: PlaceLandBlockInfo(); break;
|
case WKC_F11: PlaceLandBlockInfo(); break;
|
||||||
case WKC_CTRL | 'S': MenuClickSmallScreenshot(); break;
|
case WKC_CTRL | 'S': MenuClickSmallScreenshot(); break;
|
||||||
case WKC_CTRL | 'G': MenuClickWorldScreenshot(); break;
|
case WKC_CTRL | 'G': MenuClickWorldScreenshot(); break;
|
||||||
case 'L': ShowEditorTerraformToolBar(); break;
|
case 'L': ShowEditorTerraformToolBar(); break;
|
||||||
|
default: return;
|
||||||
}
|
}
|
||||||
|
e->we.keypress.cont = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WE_PLACE_OBJ: {
|
case WE_PLACE_OBJ: {
|
||||||
|
Loading…
Reference in New Issue
Block a user