internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0) { if (c == Alt.GUI.Keys.C && Config.config_cheat() != 0) { Set.set_cheat(); return(State.goto_state(st_start.get_st_start())); } else if (Config.config_tst_d(Config.CONFIG_KEY_SCORE_NEXT, c) != 0) { int active = gui.gui_click(); if (st_start.start_action(Util.gui_score_next(Util.gui_score_get())) != 0) { /* HACK ALERT * * This assumes that 'active' is a valid widget ID even after * the above start_action has recreated the entire widget * hierarchy. Maybe it is. Maybe it isn't. */ gui.gui_focus(active); st_start.start_over(active, 0); return(1); } else { return(0); } } } return(1); }
public static void keybd_camera(Alt.GUI.Keys c) { if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_1, c) != 0) { set_camera(VIEW.VIEW_CHASE); } if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_2, c) != 0) { set_camera(VIEW.VIEW_LAZY); } if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_3, c) != 0) { set_camera(VIEW.VIEW_MANUAL); } if (c == Alt.GUI.Keys.F4 && Config.config_cheat() != 0) { set_camera(VIEW.VIEW_TOPDOWN); } if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_TOGGLE, c) != 0) { toggle_camera(); } }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0 && c == Alt.GUI.Keys.F12) { return(State.goto_state(st_play.get_st_play_loop())); } return(1); }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0 && Config.config_tst_d(Config.CONFIG_KEY_SCORE_NEXT, c) != 0) { return(st_done.done_action(Util.gui_score_next(Util.gui_score_get()))); } return(1); }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0) { st_play.keybd_camera(c); if (Config.config_tst_d(Config.CONFIG_KEY_PAUSE, c) != 0) { st_pause.goto_pause(); } } return(1); }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0) { if (Config.config_tst_d(Config.CONFIG_KEY_RESTART, c) != 0 && Progress.progress_same_avail() != 0) { if (Progress.progress_same() != 0) { State.goto_state(st_play.get_st_play_ready()); } } } return(1); }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0) { if (Config.config_tst_d(Config.CONFIG_KEY_PAUSE, c) != 0) { return(st_pause.pause_action(st_pause.PAUSE_CONTINUE)); } if (Config.config_tst_d(Config.CONFIG_KEY_RESTART, c) != 0 && Progress.progress_same_avail() != 0) { return(st_pause.pause_action(st_pause.PAUSE_RESTART)); } } return(1); }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0) { if (Config.config_tst_d(Config.CONFIG_KEY_SCORE_NEXT, c) != 0) { return(st_goal.goal_action(Util.gui_score_next(Util.gui_score_get()))); } if (Config.config_tst_d(Config.CONFIG_KEY_RESTART, c) != 0 && Progress.progress_same_avail() != 0) { return(st_goal.goal_action(st_goal.GOAL_SAME)); } } return(1); }
internal virtual int OnKeybd(Alt.GUI.Keys c, int d) { return(1);//because of null 0; }
public static int st_keybd(Alt.GUI.Keys c, int d) { return((Current != null) ? Current.OnKeybd(c, d) : 1); }
public static int config_tst_d(int i, Alt.GUI.Keys d) { return(config_tst_d(i, (int)d)); }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0) { if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_R, c) != 0) { st_play.view_rotate = +1; } if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_L, c) != 0) { st_play.view_rotate = -1; } if (Config.config_tst_d(Config.CONFIG_KEY_ROTATE_FAST, c) != 0) { st_play.fast_rotate = 1; } st_play.keybd_camera(c); if (Config.config_tst_d(Config.CONFIG_KEY_RESTART, c) != 0 && Progress.progress_same_avail() != 0) { if (Progress.progress_same() != 0) { State.goto_state(st_play.get_st_play_ready()); } } if (Config.config_tst_d(Config.CONFIG_KEY_PAUSE, c) != 0) { st_pause.goto_pause(); } } else { if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_R, c) != 0) { st_play.view_rotate = 0; } if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_L, c) != 0) { st_play.view_rotate = 0; } if (Config.config_tst_d(Config.CONFIG_KEY_ROTATE_FAST, c) != 0) { st_play.fast_rotate = 0; } } if (d != 0 && c == Alt.GUI.Keys.F12 && Config.config_cheat() != 0) { return(State.goto_state(st_play.get_st_look())); } if (d != 0 && c == Alt.GUI.Keys.F6) { st_play.show_hud = //!st_play.show_hud; st_play.show_hud == 0 ? 1 : 0; } if (d != 0 && c == Alt.GUI.Keys.C && Config.config_cheat() != 0) { Progress.progress_stat(GAME.GAME_GOAL); return(State.goto_state(st_goal.get_st_ball_goal())); } return(1); }