Fixed crass on character creation, allowed some character creation windows to be Esc-able

deque
Digmaster 11 years ago
parent 060a50f94a
commit 033f1850f9

@ -718,6 +718,11 @@ namespace MWGui
} }
void SelectSpecializationDialog::onCancelClicked(MyGUI::Widget* _sender) void SelectSpecializationDialog::onCancelClicked(MyGUI::Widget* _sender)
{
exit();
}
void SelectSpecializationDialog::exit()
{ {
eventCancel(); eventCancel();
} }
@ -764,6 +769,11 @@ namespace MWGui
} }
void SelectAttributeDialog::onCancelClicked(MyGUI::Widget* _sender) void SelectAttributeDialog::onCancelClicked(MyGUI::Widget* _sender)
{
exit();
}
void SelectAttributeDialog::exit()
{ {
eventCancel(); eventCancel();
} }
@ -855,6 +865,11 @@ namespace MWGui
} }
void SelectSkillDialog::onCancelClicked(MyGUI::Widget* _sender) void SelectSkillDialog::onCancelClicked(MyGUI::Widget* _sender)
{
exit();
}
void SelectSkillDialog::exit()
{ {
eventCancel(); eventCancel();
} }

@ -136,6 +136,8 @@ namespace MWGui
SelectSpecializationDialog(); SelectSpecializationDialog();
~SelectSpecializationDialog(); ~SelectSpecializationDialog();
virtual void exit();
ESM::Class::Specialization getSpecializationId() const { return mSpecializationId; } ESM::Class::Specialization getSpecializationId() const { return mSpecializationId; }
// Events // Events
@ -167,6 +169,8 @@ namespace MWGui
SelectAttributeDialog(); SelectAttributeDialog();
~SelectAttributeDialog(); ~SelectAttributeDialog();
virtual void exit();
ESM::Attribute::AttributeID getAttributeId() const { return mAttributeId; } ESM::Attribute::AttributeID getAttributeId() const { return mAttributeId; }
// Events // Events
@ -196,6 +200,8 @@ namespace MWGui
SelectSkillDialog(); SelectSkillDialog();
~SelectSkillDialog(); ~SelectSkillDialog();
virtual void exit();
ESM::Skill::SkillEnum getSkillId() const { return mSkillId; } ESM::Skill::SkillEnum getSkillId() const { return mSkillId; }
// Events // Events

@ -49,7 +49,12 @@ namespace MWGui
mItemEdit->setCaption(boost::lexical_cast<std::string>(maxCount)); mItemEdit->setCaption(boost::lexical_cast<std::string>(maxCount));
} }
void CountDialog::cancel() void CountDialog::cancel() //Keeping this here as I don't know if anything else relies on it.
{
exit();
}
void CountDialog::exit()
{ {
setVisible(false); setVisible(false);
} }
@ -65,16 +70,16 @@ namespace MWGui
setVisible(false); setVisible(false);
} }
// essentially duplicating what the OK button does if user presses // essentially duplicating what the OK button does if user presses
// Enter key // Enter key
void CountDialog::onEnterKeyPressed(MyGUI::EditBox* _sender) void CountDialog::onEnterKeyPressed(MyGUI::EditBox* _sender)
{ {
eventOkClicked(NULL, mSlider->getScrollPosition()+1); eventOkClicked(NULL, mSlider->getScrollPosition()+1);
setVisible(false); setVisible(false);
} }
void CountDialog::onEditTextChange(MyGUI::EditBox* _sender) void CountDialog::onEditTextChange(MyGUI::EditBox* _sender)
{ {
if (_sender->getCaption() == "") if (_sender->getCaption() == "")

@ -11,6 +11,7 @@ namespace MWGui
CountDialog(); CountDialog();
void open(const std::string& item, const std::string& message, const int maxCount); void open(const std::string& item, const std::string& message, const int maxCount);
void cancel(); void cancel();
virtual void exit();
typedef MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, int> EventHandle_WidgetInt; typedef MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, int> EventHandle_WidgetInt;

@ -56,11 +56,6 @@ void WindowModal::close()
MWBase::Environment::get().getWindowManager()->removeCurrentModal(this); MWBase::Environment::get().getWindowManager()->removeCurrentModal(this);
} }
void WindowModal::exit()
{
close();
}
NoDrop::NoDrop(DragAndDrop *drag, MyGUI::Widget *widget) NoDrop::NoDrop(DragAndDrop *drag, MyGUI::Widget *widget)
: mDrag(drag), mWidget(widget), mTransparent(false) : mDrag(drag), mWidget(widget), mTransparent(false)
{ {

@ -47,7 +47,7 @@ namespace MWGui
WindowModal(const std::string& parLayout); WindowModal(const std::string& parLayout);
virtual void open(); virtual void open();
virtual void close(); virtual void close();
virtual void exit(); virtual void exit() {}
}; };
/// A window that cannot be the target of a drag&drop action. /// A window that cannot be the target of a drag&drop action.

Loading…
Cancel
Save