Skip to content

Commit

Permalink
GRAPHICS: Remove the now useless GUIMan::update() method
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Feb 7, 2014
1 parent 2efb2e9 commit 5835949
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 46 deletions.
15 changes: 1 addition & 14 deletions src/engines/aurora/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ void GUI::setVisible(bool visible) {
widget.setVisible(visible);
}

GUIMan.update();

_visible = visible;
}

Expand Down Expand Up @@ -252,7 +250,6 @@ int GUI::sub(GUI &gui, int startCode, bool showSelf) {
gui.setVisible(true);
setVisible(false);

GUIMan.update();
GfxMan.unlockFrame();

// Run the sub GUI
Expand All @@ -265,7 +262,6 @@ int GUI::sub(GUI &gui, int startCode, bool showSelf) {
setVisible(true);
gui.setVisible(false);

GUIMan.update();
GfxMan.unlockFrame();

// Update the mouse position
Expand Down Expand Up @@ -299,10 +295,8 @@ void GUI::setPosition(float x, float y, float z) {
_y = y;
_z = z;

if (_visible) {
GUIMan.update();
if (_visible)
GfxMan.unlockFrame();
}
}

void GUI::getPosition(float &x, float &y, float &z) const {
Expand Down Expand Up @@ -355,8 +349,6 @@ void GUI::changedWidget(Widget *widget) {
// Enter the new current widget
if (_currentWidget)
_currentWidget->enter();

GUIMan.update();
}

void GUI::checkWidgetActive(Widget *widget) {
Expand Down Expand Up @@ -458,7 +450,6 @@ void GUI::mouseMove(Widget *widget, const Events::Event &event) {
LOCK_FRAME();

widget->mouseMove(event.motion.state, screenXToGUIX(event.motion.x), screenYToGUIY(event.motion.y));
GUIMan.update();
}

void GUI::mouseDown(Widget *widget, const Events::Event &event) {
Expand All @@ -468,7 +459,6 @@ void GUI::mouseDown(Widget *widget, const Events::Event &event) {
LOCK_FRAME();

widget->mouseDown(event.button.button, screenXToGUIX(event.button.x), screenYToGUIY(event.button.y));
GUIMan.update();
}

void GUI::mouseUp(Widget *widget, const Events::Event &event) {
Expand All @@ -495,8 +485,6 @@ void GUI::mouseUp(Widget *widget, const Events::Event &event) {
widget->_lastClickTime = curTime;
widget->_lastClickX = x;
widget->_lastClickY = y;

GUIMan.update();
}

void GUI::mouseWheel(Widget *widget, const Events::Event &event) {
Expand All @@ -506,7 +494,6 @@ void GUI::mouseWheel(Widget *widget, const Events::Event &event) {
LOCK_FRAME();

widget->mouseWheel(event.wheel.type, event.wheel.x, event.wheel.y);
GUIMan.update();
}

} // End of namespace Engines
1 change: 0 additions & 1 deletion src/engines/nwn/gui/main/newmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ void NewModuleMenu::selectedModule() {
description = TalkMan.getString(67741);

getListBox("ModDescEditBox", true)->setText("fnt_galahad14", description, 1.0);
GUIMan.update();
}

void NewModuleMenu::loadModule() {
Expand Down
4 changes: 0 additions & 4 deletions src/engines/nwn/gui/widgets/listbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,6 @@ void WidgetListBox::scrollUp(uint n) {

updateVisible();
updateScrollbarPosition();

GUIMan.update();
}

void WidgetListBox::scrollDown(uint n) {
Expand All @@ -541,8 +539,6 @@ void WidgetListBox::scrollDown(uint n) {

updateVisible();
updateScrollbarPosition();

GUIMan.update();
}

void WidgetListBox::select(uint item) {
Expand Down
4 changes: 0 additions & 4 deletions src/engines/nwn/nwn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,6 @@ bool NWNEngine::legalFadeIn(Graphics::Aurora::Model_NWN *legal) {
if (EventMan.quitRequested() || !legal)
return true;

GUIMan.setAutoUpdate(true);

legal->fade(Graphics::kFadeDirectionIn, 1.0, false);
legal->setVisible(true);

Expand Down Expand Up @@ -454,8 +452,6 @@ void NWNEngine::legalShow(Graphics::Aurora::Model_NWN *legal, bool aborted) {
}

legal->setVisible(false);
GUIMan.setAutoUpdate(false);
GUIMan.update();
}

void NWNEngine::mainMenuLoop() {
Expand Down
5 changes: 0 additions & 5 deletions src/graphics/aurora/fps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ void FPS::create(uint size, float r, float g, float b, float a) {
_text->setPosition(5.0, -5.0, -10.0);
_text->setVisible(true);

GUIMan.update();

Ogre::Root::getSingleton().addFrameListener(_listener);
}

Expand All @@ -105,16 +103,13 @@ void FPS::destroy() {

_listener = 0;
_text = 0;

GUIMan.update();
}

void FPS::set(double fps) {
if (_fps == fps)
return;

_text->set(Common::UString::sprintf("%.2f", fps));
GUIMan.update();

_fps = fps;
}
Expand Down
10 changes: 0 additions & 10 deletions src/graphics/guiman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,4 @@ Renderable *GUIManager::getRenderableAt(int x, int y, float &distance) {
return renderable;
}

void GUIManager::update() {
}

bool GUIManager::getAutoUpdate() const {
return true;
}

void GUIManager::setAutoUpdate(bool autoUpdate) {
}

} // End of namespace Graphics
8 changes: 0 additions & 8 deletions src/graphics/guiman.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,6 @@ class GUIManager : public Common::Singleton<GUIManager> {
/** Return the nearest renderable at these screen coordinates. */
Renderable *getRenderableAt(int x, int y, float &distance);

/** Render the GUI. */
void update();

/** Are we currently automatically rendering the GUI every frame? */
bool getAutoUpdate() const;
/** Set whether the GUI should be rendered automatically every frame. */
void setAutoUpdate(bool autoUpdate);


private:
typedef std::map<Common::UString, Renderable *> Renderables;
Expand Down

0 comments on commit 5835949

Please sign in to comment.