diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-08-24 12:32:19 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-08-24 12:32:19 +0000 |
commit | 2debd445c71e65265359b6471795cab2cb2c7086 (patch) | |
tree | 695f276a3ae343f2a182dd2d3bb75afa6254f899 /src/gui/char_select.cpp | |
parent | 15c9ca70fa37dc8bae6b9ebd63209f5d0f7b0756 (diff) | |
download | mana-client-2debd445c71e65265359b6471795cab2cb2c7086.tar.gz mana-client-2debd445c71e65265359b6471795cab2cb2c7086.tar.bz2 mana-client-2debd445c71e65265359b6471795cab2cb2c7086.tar.xz mana-client-2debd445c71e65265359b6471795cab2cb2c7086.zip |
Added trimming of name for new character creation and of chat messages
appearing above players. Also improved resize mouse cursor indication, removing
duplicated code and fixing indicator above resize grip.
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r-- | src/gui/char_select.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index fc6be59f..fe260561 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -41,6 +41,7 @@ #include "../net/messageout.h" #include "../utils/tostring.h" +#include "../utils/trim.h" // Defined in main.cpp, used here for setting the char create dialog extern CharServerHandler charServerHandler; @@ -249,11 +250,6 @@ bool CharSelectDialog::selectByName(const std::string &name) return false; } -std::string CharSelectDialog::getName() -{ - return mNameLabel->getCaption(); -} - CharCreateDialog::CharCreateDialog(Window *parent, int slot, Network *network, unsigned char sex): Window("Create Character", true, parent), mNetwork(network), mSlot(slot) @@ -357,10 +353,12 @@ CharCreateDialog::action(const gcn::ActionEvent &event) } } -const std::string& +std::string CharCreateDialog::getName() { - return mNameField->getText(); + std::string name = mNameField->getText(); + trim(name); + return name; } void |