summaryrefslogtreecommitdiff
path: root/src/gui/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/viewport.cpp')
-rw-r--r--src/gui/viewport.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 19e9a4fb..f5a6edb4 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -19,6 +19,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "ministatus.h"
#include "popupmenu.h"
#include "viewport.h"
@@ -74,6 +75,8 @@ void Viewport::setMap(Map *map)
mMap = map;
}
+extern MiniStatusWindow *miniStatusWindow;
+
void Viewport::draw(gcn::Graphics *gcnGraphics)
{
static int lastTick = tick_time;
@@ -167,7 +170,7 @@ void Viewport::draw(gcn::Graphics *gcnGraphics)
// Find a path from the player to the mouse, and draw it. This is for debug
// purposes.
- if (mShowDebugPath)
+ if (mShowDebugPath)
{
// Get the current mouse position
int mouseX, mouseY;
@@ -211,6 +214,9 @@ void Viewport::draw(gcn::Graphics *gcnGraphics)
(*i)->drawEmotion(graphics, -(int) mPixelViewX, -(int) mPixelViewY);
}
+ if (miniStatusWindow)
+ miniStatusWindow->drawIcons(graphics);
+
// Draw contained widgets
WindowContainer::draw(gcnGraphics);
}
@@ -263,7 +269,8 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
mPopupMenu->showPopup(event.getX(), event.getY(), being);
return;
}
- else if((floorItem = floorItemManager->findByCoordinates(tilex, tiley)))
+ else if ((floorItem = floorItemManager->findByCoordinates(tilex,
+ tiley)))
{
mPopupMenu->showPopup(event.getX(), event.getY(), floorItem);
return;
@@ -282,7 +289,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
{
Being *being;
FloorItem *item;
-
+
// Interact with some being
// if ((being = beingManager->findBeing(tilex, tiley)))
if ((being = beingManager->findBeingByPixel(x, y)))
@@ -330,7 +337,7 @@ void Viewport::mousePressed(gcn::MouseEvent &event)
{
// Find the being nearest to the clicked position
Being *target = beingManager->findBeingByPixel(x, y);
-
+
if (target)
{
player_node->setTarget(target);