60 RegisterKeyBind(
MENU_NONE ,
KeyCode.KC_HOME ,-1 ,
"PluginDeveloper" ,
"ToggleFreeCamera" ,
"[Home]" ,
"Toggle free camera and teleport player to its position");
61 RegisterKeyBind(
MENU_NONE ,
KeyCode.KC_DIVIDE ,-1 ,
"PluginDeveloper" ,
"ToggleFreeCameraBackPos" ,
"[Divide numeric]" ,
"Toggle free camera, no player teleport");
66 RegisterKeyBind(
MENU_NONE ,
KeyCode.KC_LCONTROL ,
KeyCode.KC_Z ,
"PluginDeveloper" ,
"SetDeveloperItemClient" ,
"Starts watching the item" ,
"Sets the target as Watched item for debug purposes");
74 RegisterKeyBind(
MENU_NONE ,
KeyCode.KC_LCONTROL ,
KeyCode.KC_PRIOR ,
"PluginRecipesManager" ,
"CallbackGenerateCache" ,
"[LCtrl]+[BACKSPACE]" ,
"PluginRecipesManager => Generate recipe cache and save it to file");
139 bool key1_match =
false;
140 bool key2_match =
false;
142 if ( key_binding.
GetKey1() > -1 )
156 if ( key_binding.
GetKey2() > -1 )
170 if ( key1_match && key2_match )
195 if (button_info == NULL)
return;
210 if (button_info == NULL)
return;
211 int time_curr =
g_Game.GetTime();
214 int time_delta_press = time_curr - time_last_press;
215 int time_delta_relase = time_curr - time_last_release;
248 int time_curr =
g_Game.GetTime();
251 if ( time_hold < time_curr )
288 protected void RegisterKeyBind(
int ui_id,
int key_code1,
int key_code2,
string plugin_name,
string fnc_name,
string info_shortcut,
string info_description )
290 m_KeyBindings.Insert(
new KeyBinding(ui_id, key_code1, key_code2, plugin_name, fnc_name, info_shortcut, info_description) );
296 protected void RegisterMouseBind(
int ui_id,
int mouse_button,
int mouse_event,
string plugin_name,
string fnc_name,
string info_shortcut,
string info_description )
298 m_MouseBindings.Insert(
new MouseBinding(ui_id, mouse_button, mouse_event, plugin_name, fnc_name, info_shortcut, info_description) );
308 if (
g_Game.GetUIManager().GetMenu() )
310 ui_page_current =
g_Game.GetUIManager().GetMenu().GetID();
313 if ( ui_page_current <
MENU_ANY || !
CheckMask( ui_page_request, ui_page_current ) )
326 if ( ( source_mask & target_mask ) == target_mask )
337 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...