66 data.username.c_str(),
data.lastLogin.c_str()),
74 mSwitchLoginButton(
new Button(this,
_(
"Switch"),
"switch",
77 mChangePasswordButton(
new Button(this,
_(
"Password"),
"change_password",
199 for (
unsigned int i = 0, fsz =
CAST_U32(
215 const std::string &eventId =
event.getId();
222 if (eventId ==
"use")
227 else if (eventId ==
"delete"
233 else if (eventId ==
"rename"
237 selected]->getCharacter()->dummy;
240 _(
"Please enter new name"),
250 else if (eventId ==
"info")
253 selected]->getCharacter();
254 if (character ==
nullptr)
265 _(
"Hp: %u/%u\nMp: %u/%u\nLevel: %u\n"
266 "Experience: %s\nMoney: %s"),
290 if (eventId ==
"switch")
295 else if (eventId ==
"change_password")
301 else if (eventId ==
"change_email")
307 else if (eventId ==
"try delete character")
329 _(
"Incorrect password"),
341 else if (eventId ==
"changepin")
370 PRAGMA45(GCC diagnostic ignored
"-Wswitch-enum")
471 const std::string &email)
492 _(
"Enter your email for deleting character"),
502 _(
"Enter password for deleting character"),
504 _(
"Enter password:"),
532 FOR_EACH (STD_VECTOR<CharacterDisplay*>::const_iterator,
535 if (*iter !=
nullptr)
536 (*iter)->setCharacter(
nullptr);
539 FOR_EACH (Net::Characters::const_iterator, i, characters)
546 if (character ==
nullptr)
548 const int characterSlot = character->
slot;
551 logger->
log(
"Warning: slot out of range: %d", character->
slot);
601 if (character !=
nullptr)
603 if (character->
dummy !=
nullptr &&
648 idx]->getCharacter()->dummy;
661 for (
unsigned int i = 0, fsz =
CAST_U32(
667 if (character ==
nullptr)
670 if ((player !=
nullptr) && player->
getId() ==
id)
CharRenameListener charRenameListener
static const int SLOTS_PER_ROW
Net::CharServerHandler * charServerHandler
void setName(const std::string &name)
const std::string & getName() const
void setDialog(EditDialog *const dialog)
void setId(const BeingId id)
std::vector< CharacterDisplay * > mCharacterEntries
CharacterViewBase * mCharacterView
bool selectByName(const std::string &name, const SelectAction action)
CharSelectDialog(LoginData &data)
void setName(const BeingId id, const std::string &newName)
Net::CharServerHandler * mCharServerHandler
void action(const ActionEvent &event)
void setLocked(const bool locked)
Button * mChangePinButton
TextDialog * mDeleteDialog
void setCharacter(Net::Character *const character)
void askPasswordForDeletion(const int index)
void widgetResized(const Event &event)
Button * mSwitchLoginButton
Button * mChangePasswordButton
void keyPressed(KeyEvent &event)
void attemptCharacterDelete(const int index, const std::string &email)
void setCharacters(const Net::Characters &characters)
void attemptCharacterSelect(const int index)
void use(const int selected)
Net::Character * getCharacter() const
virtual void show(const int i)=0
void setState(const StateT state)
int getIntValue(const std::string &key) const
void log(const char *const log_text,...)
static std::string savedPassword
virtual void chooseCharacter(Net::Character *const character) const =0
virtual void setCharCreateDialog(CharCreateDialog *const window) const =0
virtual void clear() const =0
virtual void setCharSelectDialog(CharSelectDialog *const window) const =0
virtual void deleteCharacter(Net::Character *const character, const std::string &email) const =0
virtual bool havePincode() const =0
virtual bool haveEmailOnDelete() const =0
void setState(const PincodeStateT state)
const std::string & getText() const
ContainerPlacer getPlacer(const int x, const int y)
virtual void setVisible(Visible visible)
void reflowLayout(int w, int h)
void setCaption(const std::string &caption)
void widgetResized(const Event &event)
void setCloseButton(const bool flag)
#define FOR_EACH(type, iter, array)
PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") PRAGMA45(GCC diagnostic pop) class TestMain
bool msg(InputEvent &event)
std::string toString(T const &value)
converts any type to a string
std::list< Character * > Characters
ServerTypeT getNetworkType()
std::string formatCurrency(const int value)
Net::ServerFeatures * serverFeatures
PincodeManager pincodeManager
const bool ShowCenter_true
std::string strprintf(const char *const format,...)