62 RegisterKeyBind(
MENU_NONE ,
KeyCode.KC_HOME ,-1 ,
"PluginDeveloper" ,
"ToggleFreeCamera" ,
"[Home]" ,
"Toggle free camera and teleport player to its position");
63 RegisterKeyBind(
MENU_NONE ,
KeyCode.KC_DIVIDE ,-1 ,
"PluginDeveloper" ,
"ToggleFreeCameraBackPos" ,
"[Divide numeric]" ,
"Toggle free camera, no player teleport");
69 RegisterKeyBind(
MENU_NONE ,
KeyCode.KC_LCONTROL ,
KeyCode.KC_Z ,
"PluginDeveloper" ,
"SetDeveloperItemClient" ,
"Starts watching the item" ,
"Sets the target as Watched item for debug purposes");
77 RegisterKeyBind(
MENU_NONE ,
KeyCode.KC_LCONTROL ,
KeyCode.KC_PRIOR ,
"PluginRecipesManager" ,
"CallbackGenerateCache" ,
"[LCtrl]+[BACKSPACE]" ,
"PluginRecipesManager => Generate recipe cache and save it to file");
145 bool key1_match =
false;
146 bool key2_match =
false;
148 if ( key_binding.
GetKey1() > -1 )
162 if ( key_binding.
GetKey2() > -1 )
176 if ( key1_match && key2_match )
201 if (button_info == NULL)
return;
216 if (button_info == NULL)
return;
217 int time_curr =
g_Game.GetTime();
220 int time_delta_press = time_curr - time_last_press;
221 int time_delta_relase = time_curr - time_last_release;
254 int time_curr =
g_Game.GetTime();
257 if ( time_hold < time_curr )
294 protected void RegisterKeyBind(
int ui_id,
int key_code1,
int key_code2,
string plugin_name,
string fnc_name,
string info_shortcut,
string info_description )
296 m_KeyBindings.Insert(
new KeyBinding(ui_id, key_code1, key_code2, plugin_name, fnc_name, info_shortcut, info_description) );
302 protected void RegisterMouseBind(
int ui_id,
int mouse_button,
int mouse_event,
string plugin_name,
string fnc_name,
string info_shortcut,
string info_description )
304 m_MouseBindings.Insert(
new MouseBinding(ui_id, mouse_button, mouse_event, plugin_name, fnc_name, info_shortcut, info_description) );
314 if (
g_Game.GetUIManager().GetMenu() )
316 ui_page_current =
g_Game.GetUIManager().GetMenu().GetID();
319 if ( ui_page_current <
MENU_ANY || !
CheckMask( ui_page_request, ui_page_current ) )
332 if ( ( source_mask & target_mask ) == target_mask )
343 protected void OnMouse(
int event_id,
int button )
PluginBase GetPlugin(typename plugin_type)
string GetCallbackFunction()
string GetCallbackTarget()
string GetCallbackFunction()
string GetCallbackTarget()
bool CheckMask(int source_mask, int target_mask)
ref array< ref MouseButtonInfo > m_MouseButtons
ref array< ref KeyBinding > m_KeyBindings
void OnMouse(int event_id, int button)
const int DOUBLE_CLICK_TIME
void OnMouseButtonPress(int button)
const int HOLD_CLICK_TIME_MIN
MouseButtonInfo GetMouseButtonInfo(int button)
void RegisterKeyBind(int ui_id, int key_code1, int key_code2, string plugin_name, string fnc_name, string info_shortcut, string info_description)
override void OnDestroy()
void OnMouseButtonRelease(int button)
bool IsCurrentUIPageValid(int ui_page_request)
ref array< ref MouseBinding > m_MouseBindings
array< ref KeyBinding > GetKeyBindings()
void RegisterMouseBind(int ui_id, int mouse_button, int mouse_event, string plugin_name, string fnc_name, string info_shortcut, string info_description)
static PluginKeyBinding instance
void OnKeyRelease(int key)
array< ref MouseBinding > GetMouseBindings()
bool IsKeyPressed(int key)
Plugin interface for controlling of agent pool system.
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native int KeyState(KeyCode key)
const int MB_EVENT_RELEASE
const int MB_EVENT_DOUBLECLICK
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...