91 CharGenBase(console), _selectedPortrait(
"gui_po_nwnlogo_") {
136 if (texture !=
"gui_po_nwnlogo_")
139 std::vector<Common::UString> textures;
140 textures.push_back(texture +
"h");
146 if (widget.
getTag() ==
"OkButton") {
152 if (widget.
getTag() ==
"CancelButton") {
166 std::vector<Common::UString> portraits;
167 std::vector<Common::UString> racePortraits;
169 for (
size_t po = 0; po < twodaPortraits.
getRowCount(); ++po) {
172 if (rowPortrait.
empty(
"plot"))
175 if (rowPortrait.
getInt(
"plot"))
181 if (rowPortrait.
empty(
"Race"))
187 racePortraits.push_back(
"po_" + rowPortrait.
getString(
"BaseResRef"));
189 portraits.push_back(
"po_" + rowPortrait.
getString(
"BaseResRef"));
193 portraits.insert(portraits.begin(), racePortraits.begin(), racePortraits.end());
204 for (std::vector<Common::UString>::const_iterator it = portraits.begin();
205 it != portraits.end(); ++it) {
Class to hold the two-dimensional array of a 2DA file.
const Common::UString & getString(size_t column) const
Return the contents of a cell as a string.
uint32 _returnCode
The GUI's return code.
A class holding an UTF-8 string.
Common::UString _selectedPortrait
const Creature & getCharacter()
WidgetGridBox * _portraitsBox
void getPosition(float &x, float &y, float &z) const
Get the position of the node.
size_t getRowCount() const
Return the number of rows in the array.
const std::vector< Common::UString > initPortraitList()
WidgetButton * getButton(const Common::UString &tag, bool vital=false)
void callbackActive(Widget &widget)
Callback that's triggered when a widget was activated.
virtual void show()
Show the GUI.
CharGenChoices * _choices
Handling BioWare's 2DAs (two-dimensional array).
A node within a 3D model.
WidgetPanel * getPanel(const Common::UString &tag, bool vital=false)
void load(const Common::UString &resref)
#define TwoDAReg
Shortcut for accessing the 2da registry.
int32 getInt(size_t column) const
Return the contents of a cell as an int.
void setPortrait(const Common::UString &portrait)
bool empty(size_t column) const
Check if the cell is empty.
uint32 getRace() const
Return the creature's race value.
const TwoDARow & getRow(size_t row) const
Get a row.
Gender getGender() const
Get the creature's gender.
A creature in a Neverwinter Nights area.
const Common::UString & getPortrait() const
Get the creature's portrait.
void setMainTexture(const Common::UString &texture)
void move(float x, float y, float z)
Move the node, relative to its current position.
The portrait chooser in CharGen.
A portrait model and widget.
CharPortrait(CharGenChoices &choices, ::Engines::Console *console=0)
void addWidget(Widget *widget)
Add a widget.
void setTextures(const std::vector< Common::UString > &textures)
Set textures to the node.