summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-03 21:03:09 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-07-03 21:03:09 +0000
commitb5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73 (patch)
treeff35acbbf544331e88912a62558c560c88f329b0 /src/gui
parentde8b695c863576f10cfeb02c38b8980ec5dd019e (diff)
downloadmana-b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73.tar.gz
mana-b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73.tar.bz2
mana-b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73.tar.xz
mana-b5ca1c7c4021d9ef04cabd6f6dbc6e1bc050ab73.zip
- Fixed blue, red and yellow damage fonts to work in SDL mode
- Added two international characters to fixed font, fixed autotarget - Fixed mouse autotarget (now default for left click) - Cleaned up showing of empty right click menus
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.cpp13
-rw-r--r--src/gui/popupmenu.cpp34
2 files changed, 31 insertions, 16 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index ec9a6adc..a6f9ad4b 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -84,8 +84,15 @@ Gui::Gui(Graphics *graphics)
guiFont = new gcn::ImageFont(
TMW_DATADIR "data/graphics/gui/fixedfont.png",
" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567"
- "89:@!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`"
+ "89:@!\"$%&/=?^+*#[]{}()<>_;'.,\\|-~`øå"
);
+ /*
+ guiFont = new gcn::ImageFont(
+ TMW_DATADIR "data/graphics/gui/rpgfont.png",
+ " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567"
+ "89_,!?-+/():;%&`'*#=[]\""
+ );
+ */
}
catch (gcn::Exception e)
{
@@ -161,9 +168,9 @@ void Gui::mousePress(int mx, int my, int button)
if (state == GAME && tiledMap->getWalk(tilex, tiley)) {
walk(tilex, tiley, 0);
player_node->setDestination(tilex, tiley);
- }
- autoTarget = NULL;
+ autoTarget = NULL;
+ }
}
}
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index c9b53324..4469eaaf 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -75,26 +75,34 @@ void PopupMenu::showPopup(int mx, int my)
mY = my;
browserBox->clearRows();
- if (being)
+ if (being && being->isNpc())
{
- if (being->isNpc())
- {
- browserBox->addRow("@@talk|Talk To NPC@@");
- }
- else if (being->isPlayer())
- {
- std::string name = being->name;
- //browserBox->addRow("@@attack|Attack " + name + "@@");
- browserBox->addRow("@@trade|Trade With " + name + "@@");
- //browserBox->addRow("@@follow|Follow " + name + "@@");
- //browserBox->addRow("@@buddy|Add " + name + " to Buddy List@@");
- }
+ // NPCs can be talked to (single option, candidate for removal unless
+ // more options would be added)
+ browserBox->addRow("@@talk|Talk To NPC@@");
+ }
+ else if (being && being->isPlayer())
+ {
+ // Players can be traded with. Later also attack, follow and add as
+ // buddy will be options in this menu.
+
+ std::string name = being->name;
+ //browserBox->addRow("@@attack|Attack " + name + "@@");
+ browserBox->addRow("@@trade|Trade With " + name + "@@");
+ //browserBox->addRow("@@follow|Follow " + name + "@@");
+ //browserBox->addRow("@@buddy|Add " + name + " to Buddy List@@");
}
else if (floorItem)
{
+ // Floor item can be picked up (single option, candidate for removal)
std::string name = itemDb->getItemInfo(floorItem->id)->getName();
browserBox->addRow("@@pickup|Pick Up " + name + "@@");
}
+ else
+ {
+ // If there is nothing of interest, don't display menu.
+ return;
+ }
//browserBox->addRow("@@look|Look To@@");
browserBox->addRow("##3---");