From 5f43cf85c7e59f0e1192f803560848777d64743f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Jul 2011 04:57:16 +0300 Subject: Replace some getters to direct members access in graphics class. --- src/gui/textpopup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/textpopup.cpp') diff --git a/src/gui/textpopup.cpp b/src/gui/textpopup.cpp index 049f86d76..4114706a6 100644 --- a/src/gui/textpopup.cpp +++ b/src/gui/textpopup.cpp @@ -94,9 +94,9 @@ void TextPopup::show(int x, int y, const std::string &str1, int posX = std::max(0, x - getWidth() / 2); int posY = y + distance; - if (posX + getWidth() > graphics->getWidth()) - posX = graphics->getWidth() - getWidth(); - if (posY + getHeight() > graphics->getHeight()) + if (posX + getWidth() > graphics->mWidth) + posX = graphics->mWidth - getWidth(); + if (posY + getHeight() > graphics->mHeight) posY = y - getHeight() - distance; setPosition(posX, posY); -- cgit v1.2.3-70-g09d2