diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-02-27 16:31:34 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-02-27 16:31:34 +0000 |
commit | 88a86283083800443c4f5e934fface5988c42fe8 (patch) | |
tree | fa6a26c56836d8b1f148d362eb0b6b0e0ed3ce9b /src/gui/button.cpp | |
parent | a064b260e2950b5a153e51c13f579095c53a9a7a (diff) | |
download | mana-88a86283083800443c4f5e934fface5988c42fe8.tar.gz mana-88a86283083800443c4f5e934fface5988c42fe8.tar.bz2 mana-88a86283083800443c4f5e934fface5988c42fe8.tar.xz mana-88a86283083800443c4f5e934fface5988c42fe8.zip |
Tabbed containers now display the button of the active tab pressed all the time.
Diffstat (limited to 'src/gui/button.cpp')
-rw-r--r-- | src/gui/button.cpp | 9 |
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()); |