From b0b41a91997a386f8f210998bad56140fddbbdfd Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 21 Mar 2012 13:48:57 +0100 Subject: [PATCH] should now compile warning free --- apps/openmw/mwgui/class.cpp | 2 +- apps/openmw/mwgui/dialogue.cpp | 2 +- libs/openengine/gui/events.cpp | 14 +++++++------- libs/openengine/gui/manager.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index 48752707b..410a5c2e4 100644 --- a/apps/openmw/mwgui/class.cpp +++ b/apps/openmw/mwgui/class.cpp @@ -267,7 +267,7 @@ void InfoBoxDialog::layoutVertically(MyGUI::WidgetPtr widget, int margin) for (unsigned i = 0; i < count; ++i) { MyGUI::WidgetPtr child = widget->getChildAt(i); - if (!child->isVisible()) + if (!child->getVisible()) continue; child->setPosition(child->getLeft(), pos); diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index ac3518e2d..8083b3174 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -72,7 +72,7 @@ void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender) if(t == nullptr) return; - const IntPoint& lastPressed = InputManager::getInstance().getLastLeftPressed(); + const IntPoint& lastPressed = InputManager::getInstance().getLastPressedPosition(MyGUI::MouseButton::Left); size_t cursorPosition = t->getCursorPosition(lastPressed); MyGUI::UString color = history->getColorAtPos(cursorPosition); diff --git a/libs/openengine/gui/events.cpp b/libs/openengine/gui/events.cpp index 713db8585..3e52c6435 100644 --- a/libs/openengine/gui/events.cpp +++ b/libs/openengine/gui/events.cpp @@ -11,8 +11,8 @@ EventInjector::EventInjector(MyGUI::Gui *g) : gui(g), mouseX(0), mouseY(0), enabled(true) { assert(gui); - maxX = gui->getViewSize().width; - maxY = gui->getViewSize().height; + maxX = MyGUI::RenderManager::getInstance().getViewSize().width; + maxY = MyGUI::RenderManager::getInstance().getViewSize().height; } template @@ -51,11 +51,11 @@ void EventInjector::event(Type type, int index, const void *p) is still pretty significant.) */ MyGUI::Char text = (MyGUI::Char)key->text; - gui->injectKeyPress(code,text); + MyGUI::InputManager::getInstance().injectKeyPress(code,text); } else { - gui->injectKeyRelease(code); + MyGUI::InputManager::getInstance().injectKeyRelease(code); } } else if(type & EV_Mouse) @@ -71,10 +71,10 @@ void EventInjector::event(Type type, int index, const void *p) setRange(mouseY,0,maxY); if(type == EV_MouseDown) - gui->injectMousePress(mouseX, mouseY, id); + MyGUI::InputManager::getInstance().injectMousePress(mouseX, mouseY, id); else if(type == EV_MouseUp) - gui->injectMouseRelease(mouseX, mouseY, id); + MyGUI::InputManager::getInstance().injectMouseRelease(mouseX, mouseY, id); else - gui->injectMouseMove(mouseX, mouseY, mouse->state.Z.abs); + MyGUI::InputManager::getInstance().injectMouseMove(mouseX, mouseY, mouse->state.Z.abs); } } diff --git a/libs/openengine/gui/manager.cpp b/libs/openengine/gui/manager.cpp index 796731d93..2d84ac804 100644 --- a/libs/openengine/gui/manager.cpp +++ b/libs/openengine/gui/manager.cpp @@ -32,7 +32,7 @@ void MyGUIManager::setup(Ogre::RenderWindow *wnd, Ogre::SceneManager *mgr, bool // Create GUI mGui = new Gui(); - mGui->initialise("core.xml", theLogFile); + mGui->initialise("core.xml"); } void MyGUIManager::shutdown()