mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-31 10:36:42 +00:00
fix another bunch of gui stuff, some strings were untranslated and buttons were not resized to fit their text
This commit is contained in:
parent
424a90aa92
commit
cfa37b0e77
9 changed files with 92 additions and 82 deletions
|
@ -25,7 +25,6 @@ BirthDialog::BirthDialog(WindowManager& parWindowManager)
|
||||||
birthList->eventListMouseItemActivate += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
|
birthList->eventListMouseItemActivate += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
|
||||||
birthList->eventListChangePosition += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
|
birthList->eventListChangePosition += MyGUI::newDelegate(this, &BirthDialog::onSelectBirth);
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::ButtonPtr backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->setCaption(mWindowManager.getGameSettingString("sBack", ""));
|
backButton->setCaption(mWindowManager.getGameSettingString("sBack", ""));
|
||||||
|
@ -48,21 +47,16 @@ void BirthDialog::setNextButtonShow(bool shown)
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::ButtonPtr okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
// TODO: All hardcoded coords for buttons are temporary, will be replaced with a dynamic system.
|
|
||||||
if (shown)
|
if (shown)
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
|
||||||
okButton->setCaption("Next");
|
|
||||||
|
|
||||||
// Adjust back button when next is shown
|
|
||||||
backButton->setCoord(MyGUI::IntCoord(375 - 18, 340, 53, 23));
|
|
||||||
okButton->setCoord(MyGUI::IntCoord(431 - 18, 340, 42 + 18, 23));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->setCaption("OK");
|
|
||||||
backButton->setCoord(MyGUI::IntCoord(375, 340, 53, 23));
|
int okButtonWidth = okButton->getTextSize().width + 24;
|
||||||
okButton->setCoord(MyGUI::IntCoord(431, 340, 42, 23));
|
int backButtonWidth = backButton->getTextSize().width + 24;
|
||||||
}
|
|
||||||
|
okButton->setCoord(473 - okButtonWidth, 340, okButtonWidth, 23);
|
||||||
|
backButton->setCoord(473 - okButtonWidth - backButtonWidth - 6, 340, backButtonWidth, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BirthDialog::open()
|
void BirthDialog::open()
|
||||||
|
|
|
@ -26,7 +26,6 @@ GenerateClassResultDialog::GenerateClassResultDialog(WindowManager& parWindowMan
|
||||||
getWidget(classImage, "ClassImage");
|
getWidget(classImage, "ClassImage");
|
||||||
getWidget(className, "ClassName");
|
getWidget(className, "ClassName");
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::ButtonPtr backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->setCaption(mWindowManager.getGameSettingString("sBack", ""));
|
backButton->setCaption(mWindowManager.getGameSettingString("sBack", ""));
|
||||||
|
@ -36,6 +35,11 @@ GenerateClassResultDialog::GenerateClassResultDialog(WindowManager& parWindowMan
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onOkClicked);
|
||||||
|
|
||||||
|
int okButtonWidth = okButton->getTextSize().width + 24;
|
||||||
|
int backButtonWidth = backButton->getTextSize().width + 24;
|
||||||
|
okButton->setCoord(315 - okButtonWidth, 219, okButtonWidth, 23);
|
||||||
|
backButton->setCoord(315 - okButtonWidth - backButtonWidth - 6, 219, backButtonWidth, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenerateClassResultDialog::open()
|
void GenerateClassResultDialog::open()
|
||||||
|
@ -104,7 +108,6 @@ PickClassDialog::PickClassDialog(WindowManager& parWindowManager)
|
||||||
|
|
||||||
getWidget(classImage, "ClassImage");
|
getWidget(classImage, "ClassImage");
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::ButtonPtr backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onBackClicked);
|
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &PickClassDialog::onBackClicked);
|
||||||
|
@ -125,21 +128,16 @@ void PickClassDialog::setNextButtonShow(bool shown)
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::ButtonPtr okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
// TODO: All hardcoded coords for buttons are temporary, will be replaced with a dynamic system.
|
|
||||||
if (shown)
|
if (shown)
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
|
||||||
okButton->setCaption("Next");
|
|
||||||
|
|
||||||
// Adjust back button when next is shown
|
|
||||||
backButton->setCoord(MyGUI::IntCoord(382 - 18, 265, 53, 23));
|
|
||||||
okButton->setCoord(MyGUI::IntCoord(434 - 18, 265, 42 + 18, 23));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->setCaption("OK");
|
|
||||||
backButton->setCoord(MyGUI::IntCoord(382, 265, 53, 23));
|
int okButtonWidth = okButton->getTextSize().width + 24;
|
||||||
okButton->setCoord(MyGUI::IntCoord(434, 265, 42, 23));
|
int backButtonWidth = backButton->getTextSize().width + 24;
|
||||||
}
|
|
||||||
|
okButton->setCoord(476 - okButtonWidth, 265, okButtonWidth, 23);
|
||||||
|
backButton->setCoord(476 - okButtonWidth - backButtonWidth - 6, 265, backButtonWidth, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PickClassDialog::open()
|
void PickClassDialog::open()
|
||||||
|
@ -425,9 +423,9 @@ CreateClassDialog::CreateClassDialog(WindowManager& parWindowManager)
|
||||||
// Make sure the edit box has focus
|
// Make sure the edit box has focus
|
||||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(editName);
|
MyGUI::InputManager::getInstance().setKeyFocusWidget(editName);
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr descriptionButton;
|
MyGUI::ButtonPtr descriptionButton;
|
||||||
getWidget(descriptionButton, "DescriptionButton");
|
getWidget(descriptionButton, "DescriptionButton");
|
||||||
|
descriptionButton->setCaption(mWindowManager.getGameSettingString("sCreateClassMenu1", ""));
|
||||||
descriptionButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionClicked);
|
descriptionButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionClicked);
|
||||||
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::ButtonPtr backButton;
|
||||||
|
@ -509,32 +507,27 @@ std::vector<ESM::Skill::SkillEnum> CreateClassDialog::getMinorSkills() const
|
||||||
|
|
||||||
void CreateClassDialog::setNextButtonShow(bool shown)
|
void CreateClassDialog::setNextButtonShow(bool shown)
|
||||||
{
|
{
|
||||||
MyGUI::ButtonPtr descriptionButton;
|
|
||||||
getWidget(descriptionButton, "DescriptionButton");
|
|
||||||
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::ButtonPtr backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::ButtonPtr okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
// TODO: All hardcoded coords for buttons are temporary, will be replaced with a dynamic system.
|
MyGUI::ButtonPtr descriptionButton;
|
||||||
if (shown)
|
getWidget(descriptionButton, "DescriptionButton");
|
||||||
{
|
|
||||||
okButton->setCaption("Next");
|
|
||||||
|
|
||||||
// Adjust back button when next is shown
|
if (shown)
|
||||||
descriptionButton->setCoord(MyGUI::IntCoord(207 - 18, 158, 143, 23));
|
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
|
||||||
backButton->setCoord(MyGUI::IntCoord(356 - 18, 158, 53, 23));
|
|
||||||
okButton->setCoord(MyGUI::IntCoord(417 - 18, 158, 42 + 18, 23));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->setCaption("OK");
|
|
||||||
descriptionButton->setCoord(MyGUI::IntCoord(207, 158, 143, 23));
|
int okButtonWidth = okButton->getTextSize().width + 24;
|
||||||
backButton->setCoord(MyGUI::IntCoord(356, 158, 53, 23));
|
int backButtonWidth = backButton->getTextSize().width + 24;
|
||||||
okButton->setCoord(MyGUI::IntCoord(417, 158, 42, 23));
|
int descriptionButtonWidth = descriptionButton->getTextSize().width + 24;
|
||||||
}
|
|
||||||
|
okButton->setCoord(459 - okButtonWidth, 158, okButtonWidth, 23);
|
||||||
|
backButton->setCoord(459 - okButtonWidth - backButtonWidth - 6, 158, backButtonWidth, 23);
|
||||||
|
descriptionButton->setCoord(459 - okButtonWidth - backButtonWidth - descriptionButtonWidth - 12, 158, descriptionButtonWidth, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateClassDialog::open()
|
void CreateClassDialog::open()
|
||||||
|
@ -681,11 +674,12 @@ SelectSpecializationDialog::SelectSpecializationDialog(WindowManager& parWindowM
|
||||||
specialization2->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSpecializationDialog::onSpecializationClicked);
|
specialization2->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSpecializationDialog::onSpecializationClicked);
|
||||||
specializationId = ESM::Class::Combat;
|
specializationId = ESM::Class::Combat;
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr cancelButton;
|
MyGUI::ButtonPtr cancelButton;
|
||||||
getWidget(cancelButton, "CancelButton");
|
getWidget(cancelButton, "CancelButton");
|
||||||
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
||||||
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSpecializationDialog::onCancelClicked);
|
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSpecializationDialog::onCancelClicked);
|
||||||
|
int buttonWidth = cancelButton->getTextSize().width + 24;
|
||||||
|
cancelButton->setCoord(216 - buttonWidth, 90, buttonWidth, 21);
|
||||||
}
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
@ -730,11 +724,12 @@ SelectAttributeDialog::SelectAttributeDialog(WindowManager& parWindowManager)
|
||||||
attribute->eventClicked += MyGUI::newDelegate(this, &SelectAttributeDialog::onAttributeClicked);
|
attribute->eventClicked += MyGUI::newDelegate(this, &SelectAttributeDialog::onAttributeClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr cancelButton;
|
MyGUI::ButtonPtr cancelButton;
|
||||||
getWidget(cancelButton, "CancelButton");
|
getWidget(cancelButton, "CancelButton");
|
||||||
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
||||||
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectAttributeDialog::onCancelClicked);
|
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectAttributeDialog::onCancelClicked);
|
||||||
|
int buttonWidth = cancelButton->getTextSize().width + 24;
|
||||||
|
cancelButton->setCoord(186 - buttonWidth, 180, buttonWidth, 21);
|
||||||
}
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
@ -819,11 +814,12 @@ SelectSkillDialog::SelectSkillDialog(WindowManager& parWindowManager)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr cancelButton;
|
MyGUI::ButtonPtr cancelButton;
|
||||||
getWidget(cancelButton, "CancelButton");
|
getWidget(cancelButton, "CancelButton");
|
||||||
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
|
||||||
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSkillDialog::onCancelClicked);
|
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSkillDialog::onCancelClicked);
|
||||||
|
int buttonWidth = cancelButton->getTextSize().width + 24;
|
||||||
|
cancelButton->setCoord(447 - buttonWidth, 218, buttonWidth, 21);
|
||||||
}
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
|
@ -849,11 +845,12 @@ DescriptionDialog::DescriptionDialog(WindowManager& parWindowManager)
|
||||||
|
|
||||||
getWidget(textEdit, "TextEdit");
|
getWidget(textEdit, "TextEdit");
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::ButtonPtr okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked);
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sInputMenu1", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sInputMenu1", ""));
|
||||||
|
int buttonWidth = okButton->getTextSize().width + 24;
|
||||||
|
okButton->setCoord(234 - buttonWidth, 214, buttonWidth, 24);
|
||||||
|
|
||||||
// Make sure the edit box has focus
|
// Make sure the edit box has focus
|
||||||
MyGUI::InputManager::getInstance().setKeyFocusWidget(textEdit);
|
MyGUI::InputManager::getInstance().setKeyFocusWidget(textEdit);
|
||||||
|
|
|
@ -29,6 +29,9 @@ MapWindow::MapWindow(WindowManager& parWindowManager) :
|
||||||
|
|
||||||
getWidget(mButton, "WorldButton");
|
getWidget(mButton, "WorldButton");
|
||||||
mButton->eventMouseButtonClick += MyGUI::newDelegate(this, &MapWindow::onWorldButtonClicked);
|
mButton->eventMouseButtonClick += MyGUI::newDelegate(this, &MapWindow::onWorldButtonClicked);
|
||||||
|
mButton->setCaption(mWindowManager.getGameSettingString("sWorld", ""));
|
||||||
|
int width = mButton->getTextSize().width + 24;
|
||||||
|
mButton->setCoord(mMainWidget->getSize().width - width - 22, mMainWidget->getSize().height - 64, width, 22);
|
||||||
|
|
||||||
MyGUI::Button* eventbox;
|
MyGUI::Button* eventbox;
|
||||||
getWidget(eventbox, "EventBox");
|
getWidget(eventbox, "EventBox");
|
||||||
|
@ -97,7 +100,10 @@ void MapWindow::onWorldButtonClicked(MyGUI::Widget* _sender)
|
||||||
mGlobalMap->setVisible(mGlobal);
|
mGlobalMap->setVisible(mGlobal);
|
||||||
mLocalMap->setVisible(!mGlobal);
|
mLocalMap->setVisible(!mGlobal);
|
||||||
|
|
||||||
mButton->setCaption( mGlobal ? "Local" : "World" );
|
mButton->setCaption( mGlobal ? mWindowManager.getGameSettingString("sWorld", "") :
|
||||||
|
mWindowManager.getGameSettingString("sLocal", ""));
|
||||||
|
int width = mButton->getTextSize().width + 24;
|
||||||
|
mButton->setCoord(mMainWidget->getSize().width - width - 22, mMainWidget->getSize().height - 64, width, 22);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapWindow::onPinToggled()
|
void MapWindow::onPinToggled()
|
||||||
|
|
|
@ -69,7 +69,6 @@ RaceDialog::RaceDialog(WindowManager& parWindowManager)
|
||||||
setText("SpellPowerT", mWindowManager.getGameSettingString("sRaceMenu7", "Specials"));
|
setText("SpellPowerT", mWindowManager.getGameSettingString("sRaceMenu7", "Specials"));
|
||||||
getWidget(spellPowerList, "SpellPowerList");
|
getWidget(spellPowerList, "SpellPowerList");
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::ButtonPtr backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->setCaption(mWindowManager.getGameSettingString("sBack", ""));
|
backButton->setCaption(mWindowManager.getGameSettingString("sBack", ""));
|
||||||
|
@ -93,18 +92,16 @@ void RaceDialog::setNextButtonShow(bool shown)
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::ButtonPtr okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
// TODO: All hardcoded coords for buttons are temporary, will be replaced with a dynamic system.
|
|
||||||
if (shown)
|
if (shown)
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
|
||||||
// Adjust back button when next is shown
|
|
||||||
backButton->setCoord(MyGUI::IntCoord(471 - 18, 397, 53, 23));
|
|
||||||
okButton->setCoord(MyGUI::IntCoord(532 - 18, 397, 42 + 18, 23));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
backButton->setCoord(MyGUI::IntCoord(471, 397, 53, 23));
|
|
||||||
okButton->setCoord(MyGUI::IntCoord(532, 397, 42, 23));
|
int okButtonWidth = okButton->getTextSize().width + 24;
|
||||||
}
|
int backButtonWidth = backButton->getTextSize().width + 24;
|
||||||
|
|
||||||
|
okButton->setCoord(574 - okButtonWidth, 397, okButtonWidth, 23);
|
||||||
|
backButton->setCoord(574 - okButtonWidth - backButtonWidth - 6, 397, backButtonWidth, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RaceDialog::open()
|
void RaceDialog::open()
|
||||||
|
|
|
@ -90,7 +90,6 @@ ReviewDialog::ReviewDialog(WindowManager& parWindowManager)
|
||||||
|
|
||||||
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &ReviewDialog::onWindowResize);
|
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &ReviewDialog::onWindowResize);
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr backButton;
|
MyGUI::ButtonPtr backButton;
|
||||||
getWidget(backButton, "BackButton");
|
getWidget(backButton, "BackButton");
|
||||||
backButton->setCaption(mWindowManager.getGameSettingString("sBack", ""));
|
backButton->setCaption(mWindowManager.getGameSettingString("sBack", ""));
|
||||||
|
@ -100,6 +99,11 @@ ReviewDialog::ReviewDialog(WindowManager& parWindowManager)
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onOkClicked);
|
||||||
|
|
||||||
|
int backButtonWidth = backButton->getTextSize().width + 24;
|
||||||
|
int okButtonWidth = okButton->getTextSize().width + 24;
|
||||||
|
okButton->setCoord(502 - okButtonWidth, 372, okButtonWidth, 23);
|
||||||
|
backButton->setCoord(502 - okButtonWidth - backButtonWidth - 6, 372, backButtonWidth, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReviewDialog::open()
|
void ReviewDialog::open()
|
||||||
|
|
|
@ -12,7 +12,6 @@ TextInputDialog::TextInputDialog(WindowManager& parWindowManager)
|
||||||
getWidget(textEdit, "TextEdit");
|
getWidget(textEdit, "TextEdit");
|
||||||
textEdit->eventEditSelectAccept += newDelegate(this, &TextInputDialog::onTextAccepted);
|
textEdit->eventEditSelectAccept += newDelegate(this, &TextInputDialog::onTextAccepted);
|
||||||
|
|
||||||
// TODO: These buttons should be managed by a Dialog class
|
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::ButtonPtr okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &TextInputDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &TextInputDialog::onOkClicked);
|
||||||
|
@ -25,16 +24,15 @@ void TextInputDialog::setNextButtonShow(bool shown)
|
||||||
{
|
{
|
||||||
MyGUI::ButtonPtr okButton;
|
MyGUI::ButtonPtr okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
|
||||||
okButton->setCaption("Next");
|
|
||||||
okButton->setCoord(MyGUI::IntCoord(264 - 18, 60, 42 + 18, 23));
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
|
||||||
okButton->setCaption("OK");
|
|
||||||
okButton->setCoord(MyGUI::IntCoord(264, 60, 42, 23));
|
int okButtonWidth = okButton->getTextSize().width + 24;
|
||||||
}
|
|
||||||
|
okButton->setCoord(306 - okButtonWidth, 60, okButtonWidth, 23);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextInputDialog::setTextLabel(const std::string &label)
|
void TextInputDialog::setTextLabel(const std::string &label)
|
||||||
|
|
|
@ -9,6 +9,18 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
class WindowManager;
|
class WindowManager;
|
||||||
|
|
||||||
|
// Info about tooltip that is supplied by the MWWorld::Class object
|
||||||
|
// Not used yet, but it will replace the if-else-if blocks in tooltips.cpp
|
||||||
|
struct ToolTipInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
std::string caption;
|
||||||
|
std::string text;
|
||||||
|
std::string image;
|
||||||
|
|
||||||
|
/// \todo enchantments (armor, cloth, weapons), magic effects (potions, ingredients)
|
||||||
|
};
|
||||||
|
|
||||||
class ToolTips : public OEngine::GUI::Layout
|
class ToolTips : public OEngine::GUI::Layout
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,27 +1,29 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<MyGUI type="Layout">
|
<MyGUI type="Layout">
|
||||||
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 330 217" name="_Main">
|
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 330 256" name="_Main">
|
||||||
<!-- Class image -->
|
<!-- Class image -->
|
||||||
<Widget type="Widget" skin="MW_Box" position="32 10 265 138" align="ALIGN_LEFT ALIGN_TOP">
|
<Widget type="Widget" skin="MW_Box" position="32 10 265 138" align="ALIGN_LEFT ALIGN_TOP">
|
||||||
<Widget type="ImageBox" skin="ImageBox" position="2 2 261 134" name="ClassImage" align="ALIGN_LEFT ALIGN_TOP" />
|
<Widget type="ImageBox" skin="ImageBox" position="2 2 261 134" name="ClassImage" align="ALIGN_LEFT ALIGN_TOP" />
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<!-- Class text -->
|
<!-- Class text -->
|
||||||
<Widget type="TextBox" skin="SandText" position="32 152 265 18" name="ReflectT" align="ALIGN_LEFT ALIGN_TOP">
|
<Widget type="EditBox" skin="SandText" position="32 152 265 40" name="ReflectT" align="ALIGN_LEFT ALIGN_TOP">
|
||||||
<Property key="Caption" value="Your personality and past reflect a:"/>
|
<Property key="Caption" value="Your personality and past reflect a:"/>
|
||||||
<Property key="TextAlign" value="ALIGN_TOP ALIGN_HCENTER"/>
|
<Property key="TextAlign" value="ALIGN_TOP ALIGN_HCENTER"/>
|
||||||
|
<Property key="MultiLine" value="true"/>
|
||||||
|
<Property key="WordWrap" value="true"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget type="TextBox" skin="SandText" position="32 170 265 18" name="ClassName" align="ALIGN_LEFT ALIGN_TOP">
|
<Widget type="TextBox" skin="SandText" position="32 192 265 23" name="ClassName" align="ALIGN_LEFT ALIGN_TOP">
|
||||||
<Property key="Caption" value="[Class]"/>
|
<Property key="Caption" value="[Class]"/>
|
||||||
<Property key="TextAlign" value="ALIGN_TOP ALIGN_HCENTER"/>
|
<Property key="TextAlign" value="ALIGN_TOP ALIGN_HCENTER"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
||||||
<!-- Dialog buttons -->
|
<!-- Dialog buttons -->
|
||||||
<Widget type="Button" skin="MW_Button" position="220 184 53 23" name="BackButton">
|
<Widget type="Button" skin="MW_Button" position="220 219 53 23" name="BackButton">
|
||||||
<Property key="Caption" value="Back"/>
|
<Property key="Caption" value="Back"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
<Widget type="Button" skin="MW_Button" position="277 184 42 23" name="OKButton">
|
<Widget type="Button" skin="MW_Button" position="277 219 42 23" name="OKButton">
|
||||||
<Property key="Caption" value="OK"/>
|
<Property key="Caption" value="OK"/>
|
||||||
</Widget>
|
</Widget>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
|
|
@ -94,19 +94,19 @@
|
||||||
</Skin>
|
</Skin>
|
||||||
|
|
||||||
<Skin name = "MW_DynamicStat_Red" size = "204 18">
|
<Skin name = "MW_DynamicStat_Red" size = "204 18">
|
||||||
<Child type="TextBox" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
|
<Child type="TextBox" skin="SandText" offset = "0 0 100 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
|
||||||
<Child type="ProgressBar" skin="MW_Progress_Red" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
|
<Child type="ProgressBar" skin="MW_Progress_Red" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
|
||||||
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
|
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
|
||||||
</Skin>
|
</Skin>
|
||||||
|
|
||||||
<Skin name = "MW_DynamicStat_Blue" size = "204 18">
|
<Skin name = "MW_DynamicStat_Blue" size = "204 18">
|
||||||
<Child type="TextBox" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
|
<Child type="TextBox" skin="SandText" offset = "0 0 100 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
|
||||||
<Child type="ProgressBar" skin="MW_Progress_Blue" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
|
<Child type="ProgressBar" skin="MW_Progress_Blue" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
|
||||||
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
|
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
|
||||||
</Skin>
|
</Skin>
|
||||||
|
|
||||||
<Skin name = "MW_DynamicStat_Green" size = "204 18">
|
<Skin name = "MW_DynamicStat_Green" size = "204 18">
|
||||||
<Child type="TextBox" skin="SandText" offset = "0 0 70 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
|
<Child type="TextBox" skin="SandText" offset = "0 0 100 18" align = "ALIGN_LEFT ALIGN_TOP" name = "Text" />
|
||||||
<Child type="ProgressBar" skin="MW_Progress_Green" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
|
<Child type="ProgressBar" skin="MW_Progress_Green" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "Bar" />
|
||||||
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
|
<Child type="TextBox" skin="SandTextC" offset = "74 0 130 18" align = "ALIGN_RIGHT ALIGN_TOP" name = "BarText" />
|
||||||
</Skin>
|
</Skin>
|
||||||
|
|
Loading…
Reference in a new issue