49 load(
"cg_attributes");
79 if (widget.
getTag() ==
"OkButton") {
85 if (widget.
getTag() ==
"CancelButton") {
90 if (widget.
getTag() ==
"RecommendButton") {
95 const std::vector< WidgetButton* > buttonsList =
_attrButtons->getButtonsList();
99 _attrButtons->setActive(dynamic_cast<WidgetButton *>(&widget));
101 for (
uint b = 0; b < 6; ++b) {
102 if (buttonsList[b] != &widget)
111 for (
size_t a = 0; a< 6; ++a) {
112 if (buttonsList[a] != widget.
getParent())
169 const std::vector< WidgetButton* > buttonsList =
_attrButtons->getButtonsList();
170 for (std::vector<WidgetButton *>::const_iterator it = buttonsList.begin(); it != buttonsList.end(); ++it)
187 for (
size_t it = 0; it < 6; ++it) {
203 for (
size_t ab = 0; ab < 6; ++ab) {
220 int8 modifier = (realValue - realValue % 2) / 2;
236 if (attrValue < 15) {
242 uint8 cost = ((attrValue - attrValue % 2) / 2) + 2;
258 for (
uint it = 0; it < 6; ++it) {
Class to hold the two-dimensional array of a 2DA file.
void genTextAttributes(size_t attribute)
#define TalkMan
Shortcut for accessing the talk manager.
uint32 _returnCode
The GUI's return code.
A class holding an UTF-8 string.
bool endsWith(const UString &with) const
Utility templates and functions for working with strings and streams.
std::vector< uint8 > _attrAdjust
void callbackActive(Widget &widget)
Callback that's triggered when a widget was activated.
WidgetButton * getButton(const Common::UString &tag, bool vital=false)
virtual void show()
Show the GUI.
WidgetLabel * getLabel(const Common::UString &tag, bool vital=false)
uint8 getAbility(Ability ability) const
Utility templates and functions.
Common::ScopedPtr< ButtonsGroup > _attrButtons
CharGenChoices * _choices
Handling BioWare's 2DAs (two-dimensional array).
std::vector< WidgetLabel * > _labelAttributes
A node within a 3D model.
uint8 pointCost(uint8 attrValue)
void load(const Common::UString &resref)
CharAttributes(CharGenChoices &choices, ::Engines::Console *console=0)
#define TwoDAReg
Shortcut for accessing the 2da registry.
int32 getInt(size_t column) const
Return the contents of a cell as an int.
void updateText(uint8 attribute)
WidgetEditBox * getEditBox(const Common::UString &tag, bool vital=false)
const TwoDARow & getRow(size_t row) const
Get a row.
The attributes chooser in CharGen.
The global talk manager for Aurora strings.
std::vector< uint8 > _attributes
void setAbilities(std::vector< uint8 > abilities, std::vector< uint8 > racialAbilities)
virtual void hide()
Hide the GUI.