Merged public functions for controlling gender, face and hair with the event function, no need to have both.

pull/17/head
Jan Borsodi 15 years ago
parent e60b1f88d2
commit e88f67bb3c

@ -70,36 +70,6 @@ int wrap(int index, int max)
return index;
}
void RaceDialog::selectPreviousGender()
{
genderIndex = wrap(genderIndex - 1, 2);
}
void RaceDialog::selectNextGender()
{
genderIndex = wrap(genderIndex + 1, 2);
}
void RaceDialog::selectPreviousFace()
{
faceIndex = wrap(faceIndex - 1, faceCount);
}
void RaceDialog::selectNextFace()
{
faceIndex = wrap(faceIndex + 1, faceCount);
}
void RaceDialog::selectPreviousHair()
{
hairIndex = wrap(hairIndex - 1, hairCount);
}
void RaceDialog::selectNextHair()
{
hairIndex = wrap(hairIndex - 1, hairCount);
}
// widget controls
void RaceDialog::onHeadRotate(MyGUI::VScroll*, size_t _position)
@ -109,32 +79,32 @@ void RaceDialog::onHeadRotate(MyGUI::VScroll*, size_t _position)
void RaceDialog::onSelectPreviousGender(MyGUI::Widget*)
{
selectPreviousGender();
genderIndex = wrap(genderIndex - 1, 2);
}
void RaceDialog::onSelectNextGender(MyGUI::Widget*)
{
selectNextGender();
genderIndex = wrap(genderIndex + 1, 2);
}
void RaceDialog::onSelectPreviousFace(MyGUI::Widget*)
{
selectPreviousFace();
faceIndex = wrap(faceIndex - 1, faceCount);
}
void RaceDialog::onSelectNextFace(MyGUI::Widget*)
{
selectNextFace();
faceIndex = wrap(faceIndex + 1, faceCount);
}
void RaceDialog::onSelectPreviousHair(MyGUI::Widget*)
{
selectPreviousHair();
hairIndex = wrap(hairIndex - 1, hairCount);
}
void RaceDialog::onSelectNextHair(MyGUI::Widget*)
{
selectNextHair();
hairIndex = wrap(hairIndex - 1, hairCount);
}
void RaceDialog::onSelectRace(MyGUI::List* _sender, size_t _index)

@ -29,15 +29,6 @@ namespace MWGui
public:
RaceDialog();
void selectPreviousGender();
void selectNextGender();
void selectPreviousFace();
void selectNextFace();
void selectPreviousHair();
void selectNextHair();
protected:
void onHeadRotate(MyGUI::VScroll* _sender, size_t _position);

Loading…
Cancel
Save