DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnMouse()

void PluginBase::OnMouse ( int event_id,
int button )
inlineprotected

См. определение в файле PluginKeyBinding.c строка 337

338 {
339 for ( int i = 0; i < m_MouseBindings.Count(); ++i )
340 {
341 MouseBinding mouse_binding = m_MouseBindings.Get(i);
342
343 if ( mouse_binding.GetButtonID() == button && mouse_binding.GetMouseEvent() == event_id )
344 {
345 if ( IsCurrentUIPageValid( mouse_binding.GetUIMenuID() ) )
346 {
347 PluginBase m = GetPlugin(mouse_binding.GetCallbackTarget().ToType());
348 GetGame().GameScript.CallFunction(m, mouse_binding.GetCallbackFunction(), NULL, 0);
349 }
350 }
351 }
352 }
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
ScriptModule GameScript
Определения Game.c:12
int GetUIMenuID()
Определения MouseBinding.c:22
int GetMouseEvent()
Определения MouseBinding.c:32
string GetCallbackFunction()
Определения MouseBinding.c:42
int GetButtonID()
Определения MouseBinding.c:27
string GetCallbackTarget()
Определения MouseBinding.c:37
void PluginBase()
bool IsCurrentUIPageValid(int ui_page_request)
Определения PluginKeyBinding.c:304
ref array< ref MouseBinding > m_MouseBindings
Определения PluginKeyBinding.c:283
proto native CGame GetGame()
proto volatile int CallFunction(Class inst, string function, out void returnVal, void parm)
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...

Перекрестные ссылки ScriptModule::CallFunction(), CGame::GameScript, MouseBinding::GetButtonID(), MouseBinding::GetCallbackFunction(), MouseBinding::GetCallbackTarget(), GetGame(), MouseBinding::GetMouseEvent(), GetPlugin(), MouseBinding::GetUIMenuID(), IsCurrentUIPageValid(), m_MouseBindings, PluginBase() и string::ToType().

Используется в OnFrame(), OnMouseButtonPress() и OnMouseButtonRelease().