MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / script_input_event

Function script_input_event

Engine/source/cinterface/c_scripting.cpp:394–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392#ifdef TORQUE_OS_WIN
393
394 void script_input_event(S32 type, S32 value1, S32 value2)
395 {
396 if (PlatformWindowManager::get() && PlatformWindowManager::get()->getFirstWindow())
397 {
398 Win32Window* w = (Win32Window*) PlatformWindowManager::get()->getFirstWindow();
399 WindowId devId = w->getWindowId();
400
401 switch (type)
402 {
403 case 0:
404 w->mouseEvent.trigger(devId,0,value1,value2,w->isMouseLocked());
405 break;
406 case 1:
407 if (value2)
408 w->buttonEvent.trigger(devId,0,IA_MAKE,value1);
409 else
410 w->buttonEvent.trigger(devId,0,IA_BREAK,value1);
411 break;
412
413 }
414
415 }
416
417 }
418#endif
419
420}

Callers

nothing calls this directly

Calls 5

getFunction · 0.50
getFirstWindowMethod · 0.45
getWindowIdMethod · 0.45
triggerMethod · 0.45
isMouseLockedMethod · 0.45

Tested by

no test coverage detected