summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorRoderic Morris <roderic@ccs.neu.edu>2008-07-14 23:15:10 +0000
committerRoderic Morris <roderic@ccs.neu.edu>2008-07-14 23:15:10 +0000
commit1e5a8a201f59cb54f725ac4660a41013bcd768cf (patch)
treed0edea7722cc2d15acea776a5239c313b852e525 /src/gui
parent993b43e87e2d53e8ae8ea31c43f04a19613a6d09 (diff)
downloadmana-client-1e5a8a201f59cb54f725ac4660a41013bcd768cf.tar.gz
mana-client-1e5a8a201f59cb54f725ac4660a41013bcd768cf.tar.bz2
mana-client-1e5a8a201f59cb54f725ac4660a41013bcd768cf.tar.xz
mana-client-1e5a8a201f59cb54f725ac4660a41013bcd768cf.zip
fix view names checkbox, fix compilation with cmake
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chat.cpp2
-rw-r--r--src/gui/chat.h2
-rw-r--r--src/gui/viewport.cpp8
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index ad5e0c9b..b7c63247 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -155,7 +155,7 @@ void ChatWindow::logic()
void
ChatWindow::chatLog(std::string line, int own, std::string channelName)
{
- if(channelName == "getFocused\"")
+ if(channelName.empty())
channelName = getFocused();
ChannelMap::const_iterator chan = mChannels.find(channelName);
diff --git a/src/gui/chat.h b/src/gui/chat.h
index e0e61ce5..3923e097 100644
--- a/src/gui/chat.h
+++ b/src/gui/chat.h
@@ -95,7 +95,7 @@ class ChatWindow : public Window,
*/
void chatLog(std::string line,
int own = BY_SERVER,
- std::string channelName = "getFocused\"");
+ std::string channelName = "");
/**
* Performs action.
diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp
index 11dbb146..9677f81a 100644
--- a/src/gui/viewport.cpp
+++ b/src/gui/viewport.cpp
@@ -68,7 +68,7 @@ Viewport::Viewport():
mScrollRadius = (int) config.getValue("ScrollRadius", 32);
mScrollCenterOffsetX = (int) config.getValue("ScrollCenterOffsetX", 0);
mScrollCenterOffsetY = (int) config.getValue("ScrollCenterOffsetY", 0);
- mVisibleNames = (config.getValue("visiblenames", 1) == 1);
+ mVisibleNames = config.getValue("visiblenames", 1);
config.addListener("ScrollLaziness", this);
config.addListener("ScrollRadius", this);
@@ -239,9 +239,9 @@ Viewport::draw(gcn::Graphics *gcnGraphics)
for (BeingIterator i = beings.begin(); i != beings.end(); i++)
{
(*i)->drawSpeech(graphics, -(int) mViewX, -(int) mViewY);
- if(mVisibleNames && (*i) == mSelectedBeing)
+ if(mVisibleNames)
(*i)->drawName(graphics, -(int) mViewX, -(int) mViewY);
- else if(!mVisibleNames)
+ else if((*i) == mSelectedBeing)
(*i)->drawName(graphics, -(int) mViewX, -(int) mViewY);
(*i)->drawEmotion(graphics, -(int) mViewX, -(int) mViewY);
}
@@ -469,7 +469,7 @@ Viewport::optionChanged(const std::string &name)
mScrollRadius = (int) config.getValue("ScrollRadius", 32);
if (name == "visiblenames") {
- mVisibleNames = config.getValue("visiblenames", 1) == 1;
+ mVisibleNames = config.getValue("visiblenames", 1);
}
}