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

Method IR_OnKeyboardHold

ogsr_engine/xrGame/Level_input.cpp:384–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384void CLevel::IR_OnKeyboardHold(int key)
385{
386 if (CImGuiEditor::Get().Editor_KeyHold(key))
387 return;
388
389 if (g_bDisableAllInput)
390 return;
391
392 EGameActions _curr = get_binded_action(key);
393
394 if (m_blocked_actions.find(_curr) != m_blocked_actions.end())
395 return; // Real Wolf. 14.10.2014
396
397 if (g_block_all_except_movement)
398 {
399 if (!(_curr < kCAM_1 || _curr == kPAUSE || _curr == kSCREENSHOT || _curr == kQUIT || _curr == kCONSOLE))
400 return;
401 }
402
403 const bool b_ui_exist = (Has_HUD() && HUD().GetUI());
404
405 if (b_ui_exist && HUD().GetUI()->IR_OnKeyboardHold(key))
406 return;
407 if (b_ui_exist && HUD().GetUI()->MainInputReceiver())
408 return;
409 if (Device.Paused())
410 return;
411
412 if ((key != DIK_LALT) && (key != DIK_RALT) && (key != DIK_F4) && Actor())
413 Actor()->callback(GameObject::eOnKeyHold)(key, _curr);
414
415 if (CURRENT_ENTITY())
416 {
417 IInputReceiver* IR = smart_cast<IInputReceiver*>(smart_cast<CGameObject*>(CURRENT_ENTITY()));
418 if (IR)
419 IR->IR_OnKeyboardHold(_curr);
420 }
421}
422
423void CLevel::IR_OnMouseStop(int /**axis/**/, int /**value/**/) {}
424

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected