void turn_off_query_menus(void) { turn_off_menu(GMnu_CREATURE_QUERY1); turn_off_menu(GMnu_CREATURE_QUERY2); turn_off_menu(GMnu_CREATURE_QUERY3); turn_off_menu(GMnu_CREATURE_QUERY4); }
void turn_off_all_panel_menus(void) { int mnu_num; struct GuiMenu *gmnu; mnu_num = menu_id_to_number(GMnu_MAIN); if (mnu_num >= 0) { gmnu = get_active_menu(mnu_num); setup_radio_buttons(gmnu); } if ( menu_is_active(GMnu_ROOM) ) { turn_off_menu(GMnu_ROOM); } if ( menu_is_active(GMnu_SPELL) ) { turn_off_menu(GMnu_SPELL); } if ( menu_is_active(GMnu_TRAP) ) { turn_off_menu(GMnu_TRAP); } if ( menu_is_active(GMnu_QUERY) ) { turn_off_menu(GMnu_QUERY); } if ( menu_is_active(GMnu_CREATURE) ) { turn_off_menu(GMnu_CREATURE); } if ( menu_is_active(GMnu_CREATURE_QUERY1) ) { turn_off_menu(GMnu_CREATURE_QUERY1); } if ( menu_is_active(GMnu_CREATURE_QUERY2) ) { turn_off_menu(GMnu_CREATURE_QUERY2); } if ( menu_is_active(GMnu_CREATURE_QUERY3) ) { turn_off_menu(GMnu_CREATURE_QUERY3); } if ( menu_is_active(GMnu_CREATURE_QUERY4) ) { turn_off_menu(GMnu_CREATURE_QUERY4); } if ( menu_is_active(GMnu_SPELL_LOST) ) { turn_off_menu(GMnu_SPELL_LOST); } }
void turn_off_event_box_if_necessary(PlayerNumber plyr_idx, unsigned char event_idx) { struct Dungeon *dungeon; dungeon = get_players_num_dungeon(plyr_idx); if (dungeon->visible_event_idx != event_idx) { return; } dungeon->visible_event_idx = 0; if (is_my_player_number(plyr_idx)) { turn_off_menu(GMnu_TEXT_INFO); turn_off_menu(GMnu_BATTLE); turn_off_menu(GMnu_DUNGEON_SPECIAL); } }
short turn_off_all_bottom_menus(void) { short result; result = false; if (menu_is_active(GMnu_TEXT_INFO)) { result = true; turn_off_menu(GMnu_TEXT_INFO); } if (menu_is_active(GMnu_BATTLE)) { result = true; turn_off_menu(GMnu_BATTLE); } if (menu_is_active(GMnu_DUNGEON_SPECIAL)) { result = true; turn_off_menu(GMnu_DUNGEON_SPECIAL); } return result; }
void turn_off_roaming_menus(void) { turn_off_menu(GMnu_VIDEO); turn_off_menu(GMnu_SOUND); turn_off_menu(GMnu_QUIT); turn_off_menu(GMnu_HOLD_AUDIENCE); turn_off_menu(GMnu_ARMAGEDDON); turn_off_menu(GMnu_TEXT_INFO); }
void start_resurrect_creature(struct PlayerInfo *player, struct Thing *thing) { struct Dungeon *dungeon; dungeon = get_dungeon(player->id_number); if (dungeon->dead_creatures_count != 0) { if (is_my_player(player)) { dungeon_special_selected = thing->index; resurrect_creature_scroll_offset = 0; turn_off_menu(GMnu_DUNGEON_SPECIAL); turn_on_menu(GMnu_RESURRECT_CREATURE); } } }
void start_transfer_creature(struct PlayerInfo *player, struct Thing *thing) { struct Dungeon *dungeon; dungeon = get_dungeon(player->id_number); if (dungeon->num_active_creatrs != 0) { if (is_my_player(player)) { dungeon_special_selected = thing->index; transfer_creature_scroll_offset = 0; turn_off_menu(GMnu_DUNGEON_SPECIAL); turn_on_menu(GMnu_TRANSFER_CREATURE); } } }
void select_resurrect_creature(struct GuiButton *gbtn) { struct Dungeon *dungeon; dungeon = get_my_dungeon(); int i; i = selected_resurrect_creature(dungeon, gbtn); if (i != -1) { struct CreatureStorage *cstore; cstore = &dungeon->dead_creatures[i]; struct Packet *pckt; pckt = get_packet(my_player_number); set_packet_action(pckt, PckA_ResurrectCrtr, dungeon_special_selected, dungeon->owner | (cstore->model << 4) | (cstore->explevel << 12)); turn_off_menu(GMnu_RESURRECT_CREATURE); } }
void select_transfer_creature(struct GuiButton *gbtn) { struct Dungeon *dungeon; dungeon = get_my_dungeon(); struct Thing *thing; thing = INVALID_THING; int listitm_idx; listitm_idx = selected_transfer_creature(dungeon, gbtn); if (listitm_idx != -1) { thing = get_player_list_nth_creature_of_model(dungeon->creatr_list_start, 0, listitm_idx); } if (thing_exists(thing)) { struct Packet *pckt; pckt = get_packet(my_player_number); set_packet_action(pckt, PckA_TransferCreatr, dungeon_special_selected, thing->index); turn_off_menu(GMnu_TRANSFER_CREATURE); } }
short turn_off_all_window_menus(void) { short result; result = false; if (menu_is_active(GMnu_QUIT)) { result = true; turn_off_menu(GMnu_QUIT); } if (menu_is_active(GMnu_LOAD)) { result = true; set_packet_pause_toggle(); turn_off_menu(GMnu_LOAD); } if (menu_is_active(GMnu_SAVE)) { result = true; set_packet_pause_toggle(); turn_off_menu(GMnu_SAVE); } if (menu_is_active(GMnu_OPTIONS)) { result = true; turn_off_menu(GMnu_OPTIONS); } if (menu_is_active(GMnu_VIDEO)) { result = true; turn_off_menu(GMnu_VIDEO); } if (menu_is_active(GMnu_SOUND)) { result = true; turn_off_menu(GMnu_SOUND); } if (menu_is_active(GMnu_ERROR_BOX)) { result = true; turn_off_menu(GMnu_ERROR_BOX); } if (menu_is_active(GMnu_INSTANCE)) { result = true; turn_off_menu(GMnu_INSTANCE); } if (menu_is_active(GMnu_RESURRECT_CREATURE)) { result = true; turn_off_menu(GMnu_RESURRECT_CREATURE); } if (menu_is_active(GMnu_TRANSFER_CREATURE)) { result = true; turn_off_menu(GMnu_TRANSFER_CREATURE); } if (menu_is_active(GMnu_ARMAGEDDON)) { result = true; turn_off_menu(GMnu_ARMAGEDDON); } if (menu_is_active(GMnu_AUTOPILOT)) { result = true; turn_off_menu(GMnu_AUTOPILOT); } if (menu_is_active(GMnu_SPELL_LOST)) { result = true; turn_off_menu(GMnu_SPELL_LOST); } return result; }