summaryrefslogtreecommitdiff
path: root/src/gui/char_select.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-09-14 01:29:30 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-09-14 01:29:30 +0000
commit21dc5bb7a3ec09dafb41bc84050a2f5fbe0f9311 (patch)
tree5dfa5d1cebb1ca4ba9637b5ad8957d1c4b35e360 /src/gui/char_select.cpp
parent535ac50a68c17e421230875fea05fd1161a92fe6 (diff)
downloadmana-21dc5bb7a3ec09dafb41bc84050a2f5fbe0f9311.tar.gz
mana-21dc5bb7a3ec09dafb41bc84050a2f5fbe0f9311.tar.bz2
mana-21dc5bb7a3ec09dafb41bc84050a2f5fbe0f9311.tar.xz
mana-21dc5bb7a3ec09dafb41bc84050a2f5fbe0f9311.zip
src/gui/char_select.cpp, src/main.cpp: Fix the character name matching loop and add support for saving the last used character (based on a patch by Andrew Harrison).
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r--src/gui/char_select.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp
index 6da0f64d..4aacd40e 100644
--- a/src/gui/char_select.cpp
+++ b/src/gui/char_select.cpp
@@ -23,6 +23,7 @@
#include "char_select.h"
+#include <iostream>
#include <string>
#include <guichan/widgets/label.hpp>
@@ -238,9 +239,12 @@ bool CharSelectDialog::selectByName(const std::string &name)
mCharInfo->select(0);
do {
LocalPlayer *player = mCharInfo->getEntry();
+ std::cout << name << " " << (player ? player->getName() : "") << "\n";
if (player && player->getName() == name)
return true;
+
+ mCharInfo->next();
} while (mCharInfo->getPos());
mCharInfo->select(oldPos);