/* ------------------------------------------------------------------------ * Initialising * ------------------------------------------------------------------------ */ static void ui_enter_init(Game_Event.Event_Type type, Game_Event data, object user) { show_splashscreen(type, data, user); /* Set up our splashscreen handlers */ Game_Event.add_handler(Game_Event.Event_Type.INITSTATUS, splashscreen_note, null); }
public static void init_display() { Game_Event.add_handler(Game_Event.Event_Type.ENTER_INIT, ui_enter_init, null); Game_Event.add_handler(Game_Event.Event_Type.LEAVE_INIT, ui_leave_init, null); Game_Event.add_handler(Game_Event.Event_Type.ENTER_GAME, ui_enter_game, null); Game_Event.add_handler(Game_Event.Event_Type.LEAVE_GAME, ui_leave_game, null); UIBirth.ui_init_birthstate_handlers(); }
static void point_based_start() { string prompt = "[up/down to move, left/right to modify, 'r' to reset, 'Enter' to accept]"; /* Clear */ Term.clear(); /* Display the player */ Files.display_player_xtra_info(); Files.display_player_stat_info(); Utilities.prt(prompt, Term.instance.hgt - 1, Term.instance.wid / 2 - prompt.Length / 2); /* Register handlers for various events - cheat a bit because we redraw * the lot at once rather than each bit at a time. */ Game_Event.add_handler(Game_Event.Event_Type.BIRTHPOINTS, point_based_points, null); Game_Event.add_handler(Game_Event.Event_Type.STATS, point_based_stats, null); Game_Event.add_handler(Game_Event.Event_Type.GOLD, point_based_misc, null); }
static void ui_enter_game(Game_Event.Event_Type type, Game_Event data, object user) { /* Because of the "flexible" sidebar, all these things trigger * the same function. */ Game_Event.add_handler_set(player_events, Sidebar.update_sidebar, null); /* The flexible statusbar has similar requirements, so is * also trigger by a large set of events. */ Game_Event.add_handler_set(statusline_events, Statusline.update_statusline, null); /* Player HP can optionally change the colour of the '@' now. */ Game_Event.add_handler(Game_Event.Event_Type.HP, Sidebar.hp_colour_change, null); /* Simplest way to keep the map up to date - will do for now */ Game_Event.add_handler(Game_Event.Event_Type.MAP, Map.update_maps, Misc.angband_term[0]); //#if 0 // Game_Event.event_add_handler(EVENT_MAP, trace_map_updates, angband_term[0]); //#endif /* Check if the panel should shift when the player's moved */ Game_Event.add_handler(Game_Event.Event_Type.PLAYERMOVED, Floor.check_panel, null); Game_Event.add_handler(Game_Event.Event_Type.SEEFLOOR, Floor.see_floor_items, null); }
public static void ui_init_birthstate_handlers() { Game_Event.add_handler(Game_Event.Event_Type.ENTER_BIRTH, ui_enter_birthscreen, null); Game_Event.add_handler(Game_Event.Event_Type.LEAVE_BIRTH, ui_leave_birthscreen, null); }