82 mCharSelectDialog(parent),
112 strprintf(
_(
"Please distribute %d points"), 99))),
121 mPlayerBox(
new PlayerBox(this, mPlayer,
"charcreate_playerbox.xml",
122 "charcreate_selectedplayerbox.xml")),
156 for (STD_VECTOR<BeingSlot>::const_iterator it = items.begin(),
157 it_fend = items.end();
275 if (forceGender == -1)
327 const uint32_t labelPadding =
getOption(
"labelPadding", 2);
328 const uint32_t leftX = 120 +
mPadding;
329 const uint32_t rightX = 300 +
mPadding;
331 uint32_t nameX = leftX + labelPadding;
457 const std::string &
id =
event.getId();
465 STD_VECTOR<int> atts;
467 for (
size_t i = 0; i < sz; i++)
472 for (
size_t i = sz; i < 6; i ++)
475 const int characterSlot =
mSlot;
492 _(
"Your name needs to be at least 4 characters."),
502 else if (
id ==
"cancel")
506 else if (
id ==
"nextcolor")
511 else if (
id ==
"prevcolor")
516 else if (
id ==
"nextstyle")
521 else if (
id ==
"prevstyle")
526 else if (
id ==
"nextrace")
531 else if (
id ==
"prevrace")
536 else if (
id ==
"nextlook")
541 else if (
id ==
"prevlook")
546 else if (
id ==
"statslider")
550 else if (
id ==
"action")
557 else if (
id ==
"rotate")
564 else if (
id ==
"gender_m")
569 else if (
id ==
"gender_f")
574 else if (
id ==
"gender_u")
613 strprintf(
_(
"Please distribute %d points"), pointsLeft));
619 strprintf(
_(
"Please remove %d points"), -pointsLeft));
633 unsigned int points = 0;
642 const int min,
const int max)
646 if (min == max || available == 0)
672 const uint32_t w = 480;
680 for (
size_t i = 0; i < sz; i++)
729 if (forceGender == -1 && h < 180)
854 PRAGMA45(GCC diagnostic ignored
"-Wswitch-enum")
BeingAction ::T BeingActionT
const BeingId BeingId_zero
const BeingTypeId BeingTypeId_zero
static const uint8_t directions[]
static const BeingActionT actions[]
Net::CharServerHandler * charServerHandler
virtual void add(Widget *const widget)
virtual void remove(Widget *const widget)
virtual void setDirection(const uint8_t direction)
virtual void setAction(const BeingActionT &action, const int attackId)
static GenderT intToGender(const uint8_t sex) A_CONST
void setSpriteCards(const unsigned int slot, const int id, const CardsList &cards)
void setSubtype(const BeingTypeId subtype, const uint16_t look)
virtual void setGender(const GenderT gender)
void setSpriteColor(const unsigned int slot, const int id, const std::string &color)
void action(const ActionEvent &event)
unsigned int minHairStyle
Button * mPrevHairStyleButton
Button * mPrevHairColorButton
std::vector< Label * > mAttributeLabel
Button * mNextHairStyleButton
unsigned int maxHairColor
std::vector< Label * > mAttributeValue
Button * mNextHairColorButton
unsigned int minHairColor
int getDistributedPoints() const
void setButtonsPosition(const int w, const int h)
void keyPressed(KeyEvent &event)
Label * mHairColorNameLabel
void setDefaultGender(const GenderT gender)
std::vector< Slider * > mAttributeSlider
void setAttributes(const StringVect &labels, int available, const int min, const int max)
std::string getName() const
Label * mHairStyleNameLabel
CharCreateDialog(CharSelectDialog *const parent, const int slot)
unsigned int maxHairStyle
int getIntValue(const std::string &key) const
int getColorsSize() const
const std::string & getName() const
std::string getDyeColorsString(const ItemColor color) const
std::string getColorName(const ItemColor idx) const
void resizeTo(const int maxSize, const int minSize)
void setCaption(const std::string &caption)
virtual void setCharCreateDialog(CharCreateDialog *const window) const =0
virtual unsigned int hairSprite() const =0
virtual void newCharacter(const std::string &name, const int slot, const GenderT gender, const int hairstyle, const int hairColor, const unsigned char race, const uint16_t look, const std::vector< int > &stats) const =0
virtual bool haveCreateCharGender() const =0
virtual bool haveRaceSelection() const =0
virtual bool haveLookSelection() const =0
void setPressFirst(const bool press)
void setMaximum(const int max)
const std::string & getText() const
virtual void setVisible(Visible visible)
void setContentSize(int width, int height)
int getTitlePadding() const
void setWindowName(const std::string &name)
int getOption(const std::string &name, const int def) const
void setSticky(const bool sticky)
const std::string & getWindowName() const
virtual void scheduleDelete()
void setStickyButtonLock(const bool sticky)
PRAGMA45(GCC diagnostic push) PRAGMA45(GCC diagnostic ignored "-Wredundant-decls") PRAGMA45(GCC diagnostic pop) class TestMain
#define fromInt(val, name)
const bool LoseFocusOnTab_true
std::string trim(std::string const &str)
std::string toString(T const &value)
converts any type to a string
const std::vector< BeingSlot > & getDefaultItems()
unsigned getMinHairStyle()
unsigned getMaxHairStyle()
unsigned getMaxHairColor()
unsigned getMinHairColor()
std::string & getHairColorName(const ItemColor id)
Being * createBeing(const BeingId id, const int job)
const ItemInfo & get(const int id)
Net::ServerFeatures * serverFeatures
#define BLOCK_START(name)
const bool ShowCenter_true
std::string strprintf(const char *const format,...)
std::vector< std::string > StringVect