From 4484b433abc8f07bcf7d4d22fd946e00b66b078d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 9 Sep 2011 19:43:40 +0300 Subject: Fix first part of shadow variables/methods errors. --- src/gui/spellpopup.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/spellpopup.cpp') diff --git a/src/gui/spellpopup.cpp b/src/gui/spellpopup.cpp index a918e037d..f87e691de 100644 --- a/src/gui/spellpopup.cpp +++ b/src/gui/spellpopup.cpp @@ -80,14 +80,14 @@ void SpellPopup::view(int x, int y) int posX = std::max(0, x - getWidth() / 2); int posY = y + distance; - if (posX + getWidth() > graphics->mWidth) + if (posX + getWidth() > mainGraphics->mWidth) { - if (graphics->mWidth > getWidth()) - posX = graphics->mWidth - getWidth(); + if (mainGraphics->mWidth > getWidth()) + posX = mainGraphics->mWidth - getWidth(); else posX = 0; } - if (posY + getHeight() > graphics->mHeight) + if (posY + getHeight() > mainGraphics->mHeight) { if (y > getHeight() + distance) posY = y - getHeight() - distance; -- cgit v1.2.3-60-g2f50