summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 12:35:46 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-10-09 12:35:46 +0000
commitff4d98eeee5a5a799039549c6df885a5208b792f (patch)
tree1e3a770cac29ed3f3e2d2f7b62e6286d8d5bb24d /src
parent6f706879515b4e37a78994aaae6b0e36d00b5f32 (diff)
downloadmana-client-ff4d98eeee5a5a799039549c6df885a5208b792f.tar.gz
mana-client-ff4d98eeee5a5a799039549c6df885a5208b792f.tar.bz2
mana-client-ff4d98eeee5a5a799039549c6df885a5208b792f.tar.xz
mana-client-ff4d98eeee5a5a799039549c6df885a5208b792f.zip
Fixed display of [TARGET] and Alt keys for toggling windows.
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp10
-rw-r--r--src/engine.cpp18
-rw-r--r--src/game.cpp5
3 files changed, 12 insertions, 21 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 9f9c7834..9dccb5f6 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -427,6 +427,16 @@ void Being::drawSpeech(Graphics *graphics, Sint32 offsetX, Sint32 offsetY)
gcn::Graphics::CENTER);
}
+ // Potentially draw [TARGET] above this being
+ if (this == autoTarget)
+ {
+ graphics->setFont(speechFont);
+ int dy = (getType() == PLAYER) ? 90 : 52;
+
+ graphics->drawText("[TARGET]", px + 15, py - dy,
+ gcn::Graphics::CENTER);
+ }
+
// Draw player name
if (getType() == PLAYER && this != player_node)
{
diff --git a/src/engine.cpp b/src/engine.cpp
index dda6896c..73974edc 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -340,24 +340,6 @@ void Engine::draw()
(*i)->drawSpeech(graphics, -map_x, -map_y);
}
- if (autoTarget)
- {
- if (autoTarget->getType() == Being::PLAYER)
- {
- graphics->drawText("[TARGET]",
- autoTarget->getPixelX() + 15,
- autoTarget->getPixelY() - 60,
- gcn::Graphics::CENTER);
- }
- else
- {
- graphics->drawText("[TARGET]",
- autoTarget->getPixelX() + 60,
- autoTarget->getPixelY(),
- gcn::Graphics::CENTER);
- }
- }
-
#ifdef DEBUG
std::stringstream debugStream;
debugStream << "[" << fps << " fps] " << mouseTileX << ", " << mouseTileY;
diff --git a/src/game.cpp b/src/game.cpp
index e8692fd9..9cac4df0 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -647,7 +647,7 @@ void do_input()
}
SDL_FreeSurface(screenshot);
}
- break;
+ break;
default:
break;
@@ -655,7 +655,7 @@ void do_input()
if (requestedWindow)
{
- requestedWindow->setVisible(requestedWindow->isVisible());
+ requestedWindow->setVisible(!requestedWindow->isVisible());
if (requestedWindow->isVisible())
{
requestedWindow->requestMoveToTop();
@@ -1492,7 +1492,6 @@ void do_parse()
player_node->mFrame = 0;
player_node->x = x;
player_node->y = y;
- player_node->setMap(tiledMap);
// Send "map loaded"
MessageOut outMsg;