1909 case WKC_CTRL | 'G': _make_screenshot = 2; break; |
1909 case WKC_CTRL | 'G': _make_screenshot = 2; break; |
1910 case WKC_CTRL | WKC_ALT | 'C': if (!_networking) ShowCheatWindow(); break; |
1910 case WKC_CTRL | WKC_ALT | 'C': if (!_networking) ShowCheatWindow(); break; |
1911 case 'A': ShowBuildRailToolbar(_last_built_railtype, 4); break; /* Invoke Autorail */ |
1911 case 'A': ShowBuildRailToolbar(_last_built_railtype, 4); break; /* Invoke Autorail */ |
1912 case 'L': ShowTerraformToolbar(); break; |
1912 case 'L': ShowTerraformToolbar(); break; |
1913 default: return; |
1913 default: return; |
|
1914 } |
1914 e->keypress.cont = false; |
1915 e->keypress.cont = false; |
1915 } |
|
1916 } break; |
1916 } break; |
1917 |
1917 |
1918 case WE_PLACE_OBJ: { |
1918 case WE_PLACE_OBJ: { |
1919 _place_proc(e->place.tile); |
1919 _place_proc(e->place.tile); |
1920 } break; |
1920 } break; |
2395 height = _screen.height; |
2395 height = _screen.height; |
2396 |
2396 |
2397 // XXX: these are not done |
2397 // XXX: these are not done |
2398 switch(_game_mode) { |
2398 switch(_game_mode) { |
2399 case GM_MENU: |
2399 case GM_MENU: |
2400 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, 0, NULL); |
2400 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL); |
2401 AssignWindowViewport(w, 0, 0, width, height, TILE_XY(32, 32), 0); |
2401 AssignWindowViewport(w, 0, 0, width, height, TILE_XY(32, 32), 0); |
2402 // w = AllocateWindowDesc(&_toolb_intro_desc); |
2402 // w = AllocateWindowDesc(&_toolb_intro_desc); |
2403 // w->flags4 &= ~WF_WHITE_BORDER_MASK; |
2403 // w->flags4 &= ~WF_WHITE_BORDER_MASK; |
2404 ShowSelectGameWindow(); |
2404 ShowSelectGameWindow(); |
2405 break; |
2405 break; |
2406 case GM_NORMAL: |
2406 case GM_NORMAL: |
2407 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, 0, NULL); |
2407 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL); |
2408 AssignWindowViewport(w, 0, 0, width, height, TILE_XY(32, 32), 0); |
2408 AssignWindowViewport(w, 0, 0, width, height, TILE_XY(32, 32), 0); |
2409 |
2409 |
2410 ShowVitalWindows(); |
2410 ShowVitalWindows(); |
2411 |
2411 |
2412 /* Bring joining GUI to front till the client is really joined */ |
2412 /* Bring joining GUI to front till the client is really joined */ |
2413 if (_networking && !_network_server) |
2413 if (_networking && !_network_server) |
2414 ShowJoinStatusWindowAfterJoin(); |
2414 ShowJoinStatusWindowAfterJoin(); |
2415 |
2415 |
2416 break; |
2416 break; |
2417 case GM_EDITOR: |
2417 case GM_EDITOR: |
2418 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, 0, NULL); |
2418 w = AllocateWindow(0, 0, width, height, MainWindowWndProc, WC_MAIN_WINDOW, NULL); |
2419 AssignWindowViewport(w, 0, 0, width, height, 0, 0); |
2419 AssignWindowViewport(w, 0, 0, width, height, 0, 0); |
2420 |
2420 |
2421 w = AllocateWindowDesc(&_toolb_scen_desc); |
2421 w = AllocateWindowDesc(&_toolb_scen_desc); |
2422 w->disabled_state = 1 << 9; |
2422 w->disabled_state = 1 << 9; |
2423 CLRBITS(w->flags4, WF_WHITE_BORDER_MASK); |
2423 CLRBITS(w->flags4, WF_WHITE_BORDER_MASK); |