MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / IR_OnKeyboardRelease

Method IR_OnKeyboardRelease

ogsr_engine/xrGame/ui/UIDialogWnd.cpp:99–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99bool CUIDialogWnd::IR_OnKeyboardRelease(int dik)
100{
101 if (!IR_process())
102 return false;
103
104 // mouse click
105 if (dik == MOUSE_1 || dik == MOUSE_2 || dik == MOUSE_3)
106 {
107 Fvector2 cp = GetUICursor()->GetCursorPosition();
108 EUIMessages action = (dik == MOUSE_1) ? WINDOW_LBUTTON_UP : (dik == MOUSE_2) ? WINDOW_RBUTTON_UP : WINDOW_CBUTTON_UP;
109 if (OnMouse(cp.x, cp.y, action))
110 return true;
111 }
112
113 if (OnKeyboard(dik, WINDOW_KEY_RELEASED))
114 return true;
115
116 if (!StopAnyMove() && g_pGameLevel)
117 {
118 CObject* O = Level().CurrentEntity();
119 if (O)
120 {
121 IInputReceiver* IR = smart_cast<IInputReceiver*>(smart_cast<CGameObject*>(O));
122 if (!IR)
123 return (false);
124 IR->IR_OnKeyboardRelease(get_binded_action(dik));
125 }
126 }
127 return false;
128}
129
130bool CUIDialogWnd::IR_OnMouseWheel(int direction)
131{

Callers

nothing calls this directly

Calls 3

GetUICursorFunction · 0.85
get_binded_actionFunction · 0.85
GetCursorPositionMethod · 0.80

Tested by

no test coverage detected