summaryrefslogtreecommitdiff
path: root/src/gui/button.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-02-27 16:39:17 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-02-27 16:39:17 +0000
commit7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9 (patch)
treea880298777fcbb47a897e45ce6344ddbdf61b210 /src/gui/button.cpp
parentec72908d291fff37486a70d1624cfcece23b9bf7 (diff)
downloadmana-7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9.tar.gz
mana-7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9.tar.bz2
mana-7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9.tar.xz
mana-7a6e4d3c87ca4d7cc851af47fd9ebb616168f4c9.zip
Implementation of chat channels by Trapdoor.
Diffstat (limited to 'src/gui/button.cpp')
-rw-r--r--src/gui/button.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/button.cpp b/src/gui/button.cpp
index 0055c89a..e607b66a 100644
--- a/src/gui/button.cpp
+++ b/src/gui/button.cpp
@@ -38,8 +38,9 @@ ImageRect Button::button[4];
int Button::mInstances = 0;
Button::Button(const std::string& caption, const std::string &actionEventId,
- gcn::ActionListener *listener):
- gcn::Button(caption)
+ gcn::ActionListener *listener):
+ gcn::Button(caption),
+ mIsLogged(false)
{
setBorderSize(0);
@@ -100,7 +101,7 @@ Button::draw(gcn::Graphics *graphics)
if (!isEnabled()) {
mode = 3;
}
- else if (isPressed()) {
+ else if (isPressed() || mIsLogged) {
mode = 2;
}
else if (mHasMouse) {
@@ -130,7 +131,7 @@ Button::draw(gcn::Graphics *graphics)
textX = getWidth() - 4;
break;
default:
- throw GCN_EXCEPTION("Button::draw. Uknown alignment.");
+ throw GCN_EXCEPTION("Button::draw. Unknown alignment.");
}
graphics->setFont(getFont());