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

Method IR_OnKeyboardRelease

ogsr_engine/xrGame/Level_input.cpp:340–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340void CLevel::IR_OnKeyboardRelease(int key)
341{
342 if (CImGuiEditor::Get().Editor_KeyRelease(key))
343 return;
344
345 if (g_bDisableAllInput)
346 return;
347
348 EGameActions _curr = get_binded_action(key);
349
350 if (m_blocked_actions.find(_curr) != m_blocked_actions.end())
351 return; // Real Wolf. 14.10.2014
352
353 if (g_block_all_except_movement)
354 {
355 if (!(_curr < kCAM_1 || _curr == kPAUSE || _curr == kSCREENSHOT || _curr == kQUIT || _curr == kCONSOLE))
356 return;
357 }
358
359 const bool b_ui_exist = (Has_HUD() && HUD().GetUI());
360
361 if (b_ui_exist && HUD().GetUI()->IR_OnKeyboardRelease(key))
362 return;
363
364 if (Device.Paused())
365 return;
366
367 if (game && Game().OnKeyboardRelease(_curr))
368 return;
369
370 if ((key != DIK_LALT) && (key != DIK_RALT) && (key != DIK_F4) && Actor())
371 Actor()->callback(GameObject::eOnKeyRelease)(key, _curr);
372
373 if (b_ui_exist && HUD().GetUI()->MainInputReceiver())
374 return;
375
376 if (CURRENT_ENTITY())
377 {
378 IInputReceiver* IR = smart_cast<IInputReceiver*>(smart_cast<CGameObject*>(CURRENT_ENTITY()));
379 if (IR)
380 IR->IR_OnKeyboardRelease(_curr);
381 }
382}
383
384void CLevel::IR_OnKeyboardHold(int key)
385{

Callers

nothing calls this directly

Calls 11

GetFunction · 0.85
get_binded_actionFunction · 0.85
ActorFunction · 0.85
Editor_KeyReleaseMethod · 0.80
GetUIMethod · 0.80
PausedMethod · 0.80
findMethod · 0.45
endMethod · 0.45
OnKeyboardReleaseMethod · 0.45
callbackMethod · 0.45
MainInputReceiverMethod · 0.45

Tested by

no test coverage detected