diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-12-03 17:00:07 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-12-03 17:00:07 +0000 |
commit | 061b9e817ffe73acca163510b276e6ca7dd8f6c2 (patch) | |
tree | c1488381a9a62520f94cdb353bd5bd12ebc1b699 /src/npc.cpp | |
parent | 092bf185fc056338bcde2749a304e576edf342fd (diff) | |
download | mana-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.gz mana-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.bz2 mana-061b9e817ffe73acca163510b276e6ca7dd8f6c2.tar.xz mana-061b9e817ffe73acca163510b276e6ca7dd8f6c2.zip |
Made NPC names visible. Windows are now invisible by default.
Diffstat (limited to 'src/npc.cpp')
-rw-r--r-- | src/npc.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/npc.cpp b/src/npc.cpp index d2e3f93f..a961420f 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -24,10 +24,13 @@ #include "npc.h" #include "animatedsprite.h" +#include "graphics.h" #include "net/messageout.h" #include "net/protocol.h" +#include "gui/gui.h" + class Spriteset; extern Spriteset *npcset; @@ -47,6 +50,17 @@ NPC::getType() const } void +NPC::drawName(Graphics *graphics, Sint32 offsetX, Sint32 offsetY) +{ + int px = mPx + offsetX; + int py = mPy + offsetY; + + graphics->setFont(speechFont); + graphics->setColor(gcn::Color(200, 200, 255)); + graphics->drawText(mName, px + 15, py + 30, gcn::Graphics::CENTER); +} + +void NPC::talk() { MessageOut outMsg(mNetwork); |