119 if (tag ==
"AvailBox" || tag ==
"KnownBox")
144 int8 diff = (toKnownFeats) ? -1 : 1;
146 for (std::list<FeatItem>::iterator aF = fromList.begin(); aF != fromList.end(); ++aF) {
147 if ((*aF).featId != feat.
featId)
150 toList.push_back((*aF));
155 bool isNormalFeat =
true;
176 fromListBox->
remove(item);
188 std::vector<FeatItem> slaveFeatsList;
193 slaveFeatsList.push_back(*f);
197 std::sort(slaveFeatsList.begin(), slaveFeatsList.end());
209 fromListBox->
remove(item);
219 if (widget.
getTag() ==
"OkButton") {
233 if (widget.
getTag() ==
"CancelButton") {
238 if (widget.
getTag() ==
"ResetButton") {
245 if (widget.
getTag() ==
"RecommendButton") {
272 std::list<uint32> masterFeats;
274 if (list == 0 && (*f).list > 1)
277 if (list == 2 && (*f).list < 1)
285 for (std::list<uint32>::iterator mf = masterFeats.begin(); mf != masterFeats.end(); ++mf) {
317 std::vector<uint32> feats;
319 for (std::vector<uint32>::iterator f = feats.begin(); f != feats.end(); ++f) {
363 size_t startItem = 0;
396 std::vector<uint32> recFeats;
399 for (std::vector<uint32>::iterator rF = recFeats.begin(); rF != recFeats.end(); ++rF) {
404 if (*rF != (*aF).featId)
415 error(
"Unable to select the recommended feats");
Class to hold the two-dimensional array of a 2DA file.
The global graphics manager.
#define TalkMan
Shortcut for accessing the talk manager.
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.
WidgetListBox * getListBox(const Common::UString &tag, bool vital=false)
void makeAvailList(uint8 list)
Common::ScopedPtr< CharFeatsPopup > _featsPopup
UString generateIDNumberString()
Common::UString description
bool endsWith(const UString &with) const
Utility functions for generating unique IDs.
std::list< FeatItem > _availFeats
void removeFocus()
Forcefully remove the focus from the current widget.
std::list< FeatItem > _knownFeats
Utility templates and functions for working with strings and streams.
WidgetButton * getButton(const Common::UString &tag, bool vital=false)
WidgetLabel * getLabel(const Common::UString &tag, bool vital=false)
WidgetListBox * _availListBox
Utility templates and functions.
void getPrefFeats(std::vector< uint32 > &feats)
CharGenChoices * _choices
Handling BioWare's 2DAs (two-dimensional array).
CharFeats(CharGenChoices &choices, ::Engines::Console *console=0)
void load(const Common::UString &resref)
#define TwoDAReg
Shortcut for accessing the 2da registry.
Common::ScopedPtr< CharHelp > _featHelp
int32 getInt(size_t column) const
Return the contents of a cell as an int.
void getFeatItems(std::list< FeatItem > &feats, uint8 &normalFeats, uint8 &bonusFeats)
void moveFeat(FeatItem feat, bool toKnownFeats, bool rebuild=true)
void setRecommendedFeats()
const TwoDARow & getRow(size_t row) const
Get a row.
The global talk manager for Aurora strings.
A creature in a Neverwinter Nights area.
void fixWidgetType(const Common::UString &tag, NWN::GUI::WidgetType &type)
void setFeat(uint32 feat)
void callbackRun()
Callback that's triggered periodically in the run() method.
WidgetListBox * _knownListBox
void NORETURN_PRE error(const char *s,...)
uint8 list
The kind of list the feat belongs to: 0 (general feat), 2 (bonus feat), 1 (both)
std::vector< WidgetListItemFeat * > _featsTrash
#define GfxMan
Shortcut for accessing the graphics manager.
void showFeatHelp(FeatItem &feat)
void getFeats(std::vector< uint32 > &feats)
void changeAvailFeats(int8 diff, bool normalFeat, bool rebuild=true)
void callbackActive(Widget &widget)
Callback that's triggered when a widget was activated.