diff --git a/modules/otclientrc.lua b/modules/otclientrc.lua index 347e991a..7cef0451 100644 --- a/modules/otclientrc.lua +++ b/modules/otclientrc.lua @@ -1,5 +1,4 @@ -- this file is loaded after all modules are loaded and initialized -- you can place any custom user code here --- you Keyboard.bindKeyDown('Ctrl+R', Client.reloadScripts) diff --git a/src/framework/graphics/texturemanager.cpp b/src/framework/graphics/texturemanager.cpp index a2b1c18c..633d3bc9 100644 --- a/src/framework/graphics/texturemanager.cpp +++ b/src/framework/graphics/texturemanager.cpp @@ -22,6 +22,7 @@ #include "texturemanager.h" #include "animatedtexture.h" +#include "graphics.h" #include #include @@ -54,6 +55,7 @@ TexturePtr TextureManager::getTexture(const std::string& textureFile) texture = loadPNG(fin); } catch(Exception& e) { logError("unable to load texture '", textureFile, "': ", e.what()); + texture = g_graphics.getEmptyTexture(); } } diff --git a/src/framework/ui/uiwidget.cpp b/src/framework/ui/uiwidget.cpp index 89271f12..ebfeacfd 100644 --- a/src/framework/ui/uiwidget.cpp +++ b/src/framework/ui/uiwidget.cpp @@ -245,7 +245,7 @@ void UIWidget::focusChild(const UIWidgetPtr& child, Fw::FocusReason reason) child->updateState(Fw::FocusState); child->updateState(Fw::ActiveState); - g_eventDispatcher.addEvent(std::bind(&UIWidget::onFocusChange, child, true, reason)); + child->onFocusChange(true, reason); } if(oldFocused) { @@ -253,7 +253,7 @@ void UIWidget::focusChild(const UIWidgetPtr& child, Fw::FocusReason reason) oldFocused->updateState(Fw::FocusState); oldFocused->updateState(Fw::ActiveState); - g_eventDispatcher.addEvent(std::bind(&UIWidget::onFocusChange, oldFocused, false, reason)); + oldFocused->onFocusChange(false, reason); } onChildFocusChange(child, oldFocused, reason);