bool CUIActorMenu::OnKeyboard(int dik, EUIMessages keyboard_action) { /* if (UIPropertiesBox.GetVisible()) { UIPropertiesBox.OnKeyboard(dik, keyboard_action); } */ InfoCurItem( NULL ); if ( is_binded(kDROP, dik) ) { if ( WINDOW_KEY_PRESSED == keyboard_action && CurrentIItem() && !CurrentIItem()->IsQuestItem() ) { SendEvent_Item_Drop (CurrentIItem(), m_pActorInvOwner->object_id()); SetCurrentItem (NULL); } return true; } if ( is_binded(kSPRINT_TOGGLE, dik) ) { if ( WINDOW_KEY_PRESSED == keyboard_action ) { OnPressUserKey(); } return true; } if ( is_binded(kUSE, dik) ) { if ( WINDOW_KEY_PRESSED == keyboard_action ) { GetHolder()->StartStopMenu( this, true ); } return true; } if( inherited::OnKeyboard(dik,keyboard_action) )return true; return false; }
void CUISequencer::IR_OnKeyboardPress (int dik) { if(m_items.size()) m_items.front()->OnKeyboardPress (dik); bool b = true; if(m_items.size()) b &= m_items.front()->AllowKey(dik); if(b && is_binded(kQUIT, dik) ) { Stop (); return; } if(b&&!GrabInput()&&m_pStoredInputReceiver) m_pStoredInputReceiver->IR_OnKeyboardPress (dik); }
void CMainMenu::IR_OnKeyboardPress(int dik) { if(!IsActive()) return; if( is_binded(kCONSOLE, dik) ) { Console->Show(); return; } if (DIK_F12 == dik){ Render->Screenshot(); return; } CDialogHolder::IR_UIOnKeyboardPress(dik); };