static void activate_callback(GObject *widget, gpointer user_data) { guint32 activate_time = gtk_get_current_event_time(); /* Always show the menu, whatever button is pressed. * Agent dialog can be shown from the notification (or should * be shown automatically in the background). */ popup_callback(widget, 0, activate_time, user_data); }
static void activate_callback(GObject *widget, gpointer user_data) { guint32 activate_time = gtk_get_current_event_time(); if (query_blinking() == TRUE) { show_agents(); return; } popup_callback(widget, 0, activate_time, user_data); }
bool MN_PopupResponder(event_t *ev) { int *menuSounds = GameModeInfo->menuSounds; char ch; if(ev->type != ev_keydown) return false; if(ev->character) ch = tolower(ev->character); else ch = ev->data1; switch(popup_message_type) { case popup_alert: { // haleyjd 02/24/02: restore saved menuactive state menuactive = popupMenuActive; // kill message MN_PopWidget(); S_StartSound(NULL, menuSounds[MN_SND_DEACTIVATE]); } break; case popup_question: if(ch == 'y') // yes! { // run command and kill message // haleyjd 02/24/02: restore saved menuactive state menuactive = popupMenuActive; if(popup_callback) { popup_callback(); popup_callback = NULL; } else { Console.cmdtype = c_menu; C_RunTextCmd(popup_message_command); } S_StartSound(NULL, menuSounds[MN_SND_COMMAND]); MN_PopWidget(); // kill message } if(ch == 'n' || action_menu_toggle || action_menu_previous) // no! { // kill message // haleyjd 02/24/02: restore saved menuactive state action_menu_toggle = action_menu_previous = false; menuactive = popupMenuActive; S_StartSound(NULL, menuSounds[MN_SND_DEACTIVATE]); MN_PopWidget(); // kill message } break; default: break; } return true; // always eat key }