mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 12:34:55 +02:00
Rework hotkeys manager, fix many issues on it
This commit is contained in:
@@ -317,6 +317,8 @@ void Application::registerLuaFunctions()
|
||||
g_lua.bindSingletonFunction("g_ui", "getPressedWidget", &UIManager::getPressedWidget, &g_ui);
|
||||
g_lua.bindSingletonFunction("g_ui", "setDebugBoxesDrawing", &UIManager::setDebugBoxesDrawing, &g_ui);
|
||||
g_lua.bindSingletonFunction("g_ui", "isDrawingDebugBoxes", &UIManager::setDebugBoxesDrawing, &g_ui);
|
||||
g_lua.bindSingletonFunction("g_ui", "isMouseGrabbed", &UIManager::isMouseGrabbed, &g_ui);
|
||||
g_lua.bindSingletonFunction("g_ui", "isKeyboardGrabbed", &UIManager::isKeyboardGrabbed, &g_ui);
|
||||
|
||||
// FontManager
|
||||
g_lua.registerSingletonClass("g_fonts");
|
||||
|
@@ -65,6 +65,8 @@ public:
|
||||
UIWidgetPtr getHoveredWidget() { return m_hoveredWidget; }
|
||||
UIWidgetPtr getPressedWidget() { return m_pressedWidget; }
|
||||
UIWidgetPtr getRootWidget() { return m_rootWidget; }
|
||||
bool isMouseGrabbed() { return m_mouseReceiver != m_rootWidget; }
|
||||
bool isKeyboardGrabbed() { return m_keyboardReceiver != m_rootWidget; }
|
||||
|
||||
bool isDrawingDebugBoxes() { return m_drawDebugBoxes; }
|
||||
|
||||
|
Reference in New Issue
Block a user