replaced everything with the new method

actorid
scrawl 12 years ago
parent b66c8099eb
commit bc6a1979b0

@ -48,14 +48,6 @@ namespace MWGui
mIngredient3->eventMouseButtonClick += MyGUI::newDelegate(this, &AlchemyWindow::onIngredientSelected);
mIngredient4->eventMouseButtonClick += MyGUI::newDelegate(this, &AlchemyWindow::onIngredientSelected);
MyGUI::Widget* buttonBox = mCancelButton->getParent();
int cancelButtonWidth = mCancelButton->getTextSize().width + 24;
mCancelButton->setCoord(buttonBox->getWidth() - cancelButtonWidth,
mCancelButton->getTop(), cancelButtonWidth, mCancelButton->getHeight());
int createButtonWidth = mCreateButton->getTextSize().width + 24;
mCreateButton->setCoord(buttonBox->getWidth() - createButtonWidth - cancelButtonWidth - 4,
mCreateButton->getTop(), createButtonWidth, mCreateButton->getHeight());
mCreateButton->eventMouseButtonClick += MyGUI::newDelegate(this, &AlchemyWindow::onCreateButtonClicked);
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &AlchemyWindow::onCancelButtonClicked);

@ -45,9 +45,6 @@ BirthDialog::BirthDialog(MWBase::WindowManager& parWindowManager)
void BirthDialog::setNextButtonShow(bool shown)
{
MyGUI::ButtonPtr backButton;
getWidget(backButton, "BackButton");
MyGUI::ButtonPtr okButton;
getWidget(okButton, "OKButton");
@ -55,12 +52,6 @@ void BirthDialog::setNextButtonShow(bool shown)
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
else
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
int okButtonWidth = okButton->getTextSize().width + 24;
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()

@ -39,11 +39,6 @@ GenerateClassResultDialog::GenerateClassResultDialog(MWBase::WindowManager& parW
getWidget(okButton, "OKButton");
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
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);
}
std::string GenerateClassResultDialog::getClassId() const
@ -116,9 +111,6 @@ PickClassDialog::PickClassDialog(MWBase::WindowManager& parWindowManager)
void PickClassDialog::setNextButtonShow(bool shown)
{
MyGUI::ButtonPtr backButton;
getWidget(backButton, "BackButton");
MyGUI::ButtonPtr okButton;
getWidget(okButton, "OKButton");
@ -126,12 +118,6 @@ void PickClassDialog::setNextButtonShow(bool shown)
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
else
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
int okButtonWidth = okButton->getTextSize().width + 24;
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()
@ -422,7 +408,6 @@ CreateClassDialog::CreateClassDialog(MWBase::WindowManager& parWindowManager)
MyGUI::ButtonPtr descriptionButton;
getWidget(descriptionButton, "DescriptionButton");
descriptionButton->setCaption(mWindowManager.getGameSettingString("sCreateClassMenu1", ""));
descriptionButton->eventMouseButtonClick += MyGUI::newDelegate(this, &CreateClassDialog::onDescriptionClicked);
MyGUI::ButtonPtr backButton;
@ -519,27 +504,13 @@ std::vector<ESM::Skill::SkillEnum> CreateClassDialog::getMinorSkills() const
void CreateClassDialog::setNextButtonShow(bool shown)
{
MyGUI::ButtonPtr backButton;
getWidget(backButton, "BackButton");
MyGUI::ButtonPtr okButton;
getWidget(okButton, "OKButton");
MyGUI::ButtonPtr descriptionButton;
getWidget(descriptionButton, "DescriptionButton");
if (shown)
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
else
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
int okButtonWidth = okButton->getTextSize().width + 24;
int backButtonWidth = backButton->getTextSize().width + 24;
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);
}
// widget controls
@ -713,8 +684,6 @@ SelectSpecializationDialog::SelectSpecializationDialog(MWBase::WindowManager& pa
getWidget(cancelButton, "CancelButton");
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSpecializationDialog::onCancelClicked);
int buttonWidth = cancelButton->getTextSize().width + 24;
cancelButton->setCoord(216 - buttonWidth, 90, buttonWidth, 21);
}
SelectSpecializationDialog::~SelectSpecializationDialog()
@ -768,8 +737,6 @@ SelectAttributeDialog::SelectAttributeDialog(MWBase::WindowManager& parWindowMan
getWidget(cancelButton, "CancelButton");
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectAttributeDialog::onCancelClicked);
int buttonWidth = cancelButton->getTextSize().width + 24;
cancelButton->setCoord(186 - buttonWidth, 180, buttonWidth, 21);
}
SelectAttributeDialog::~SelectAttributeDialog()
@ -863,9 +830,6 @@ SelectSkillDialog::SelectSkillDialog(MWBase::WindowManager& parWindowManager)
getWidget(cancelButton, "CancelButton");
cancelButton->setCaption(mWindowManager.getGameSettingString("sCancel", ""));
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SelectSkillDialog::onCancelClicked);
int buttonWidth = cancelButton->getTextSize().width + 24;
cancelButton->setCoord(447 - buttonWidth, 218, buttonWidth, 21);
}
SelectSkillDialog::~SelectSkillDialog()
@ -899,8 +863,6 @@ DescriptionDialog::DescriptionDialog(MWBase::WindowManager& parWindowManager)
getWidget(okButton, "OKButton");
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked);
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
MyGUI::InputManager::getInstance().setKeyFocusWidget(mTextEdit);

@ -31,18 +31,6 @@ namespace MWGui
mMessage->setSize(mMessage->getWidth(), mMessage->getTextSize().height+24);
center();
int okButtonWidth = mOkButton->getTextSize().width + 24;
mOkButton->setCoord(mMainWidget->getWidth() - 30 - okButtonWidth,
mOkButton->getTop(),
okButtonWidth,
mOkButton->getHeight());
int cancelButtonWidth = mCancelButton->getTextSize().width + 24;
mCancelButton->setCoord(mMainWidget->getWidth() - 30 - okButtonWidth - cancelButtonWidth - 8,
mCancelButton->getTop(),
cancelButtonWidth,
mCancelButton->getHeight());
}
void ConfirmationDialog::onCancelButtonClicked(MyGUI::Widget* _sender)

@ -607,12 +607,6 @@ ContainerWindow::ContainerWindow(MWBase::WindowManager& parWindowManager,DragAnd
mCloseButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ContainerWindow::onCloseButtonClicked);
mTakeButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ContainerWindow::onTakeAllButtonClicked);
// adjust buttons size to fit text
int closeButtonWidth = mCloseButton->getTextSize().width+24;
int takeButtonWidth = mTakeButton->getTextSize().width+24;
mCloseButton->setCoord(600-20-closeButtonWidth, mCloseButton->getCoord().top, closeButtonWidth, mCloseButton->getCoord().height);
mTakeButton->setCoord(600-20-closeButtonWidth-takeButtonWidth-8, mTakeButton->getCoord().top, takeButtonWidth, mTakeButton->getCoord().height);
static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &ContainerWindow::onWindowResize);
setCoord(200,0,600,300);

@ -44,18 +44,6 @@ namespace MWGui
mSlider->setScrollPosition(maxCount-1);
mItemEdit->setCaption(boost::lexical_cast<std::string>(maxCount));
int okButtonWidth = mOkButton->getTextSize().width + 24;
mOkButton->setCoord(width - 30 - okButtonWidth,
mOkButton->getTop(),
okButtonWidth,
mOkButton->getHeight());
int cancelButtonWidth = mCancelButton->getTextSize().width + 24;
mCancelButton->setCoord(width - 30 - okButtonWidth - cancelButtonWidth - 8,
mCancelButton->getTop(),
cancelButtonWidth,
mCancelButton->getHeight());
}
void CountDialog::onCancelButtonClicked(MyGUI::Widget* _sender)

@ -23,12 +23,6 @@ namespace MWGui
getWidget(cancelButton, "CancelButton");
cancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ItemSelectionDialog::onCancelButtonClicked);
int dx = (cancelButton->getTextSize().width + 24) - cancelButton->getWidth();
cancelButton->setCoord(cancelButton->getLeft() - dx,
cancelButton->getTop(),
cancelButton->getTextSize ().width + 24,
cancelButton->getHeight());
center();
}

@ -259,8 +259,6 @@ MapWindow::MapWindow(MWBase::WindowManager& parWindowManager) :
getWidget(mButton, "WorldButton");
mButton->eventMouseButtonClick += MyGUI::newDelegate(this, &MapWindow::onWorldButtonClicked);
mButton->setCaptionWithReplacing("#{sWorld}");
int width = mButton->getTextSize().width + 24;
mButton->setCoord(mMainWidget->getSize().width - width - 22, mMainWidget->getSize().height - 64, width, 22);
MyGUI::Button* eventbox;
getWidget(eventbox, "EventBox");
@ -303,8 +301,6 @@ void MapWindow::onWorldButtonClicked(MyGUI::Widget* _sender)
mButton->setCaptionWithReplacing( mGlobal ? "#{sLocal}" :
"#{sWorld}");
int width = mButton->getTextSize().width + 24;
mButton->setCoord(mMainWidget->getSize().width - width - 22, mMainWidget->getSize().height - 64, width, 22);
}
void MapWindow::onPinToggled()

@ -52,13 +52,8 @@ namespace MWGui
mMainWidget->setSize(mMainWidget->getWidth(),
mMainWidget->getHeight() + (mInstructionLabel->getTextSize().height - mInstructionLabel->getHeight()));
int okButtonWidth = mOkButton->getTextSize ().width + 24;
mOkButton->setCoord(mOkButton->getLeft() - (okButtonWidth - mOkButton->getWidth()),
mOkButton->getTop(),
okButtonWidth,
mOkButton->getHeight());
mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &QuickKeysMenu::onOkButtonClicked);
std::cout << "real ok button is : " << mOkButton->getName() << std::endl;
center();
@ -72,7 +67,6 @@ namespace MWGui
unassign(button, i);
mQuickKeyButtons.push_back(button);
}
}
@ -407,12 +401,6 @@ namespace MWGui
getWidget(mMagicList, "MagicList");
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &MagicSelectionDialog::onCancelButtonClicked);
int dx = (mCancelButton->getTextSize().width + 24) - mCancelButton->getWidth();
mCancelButton->setCoord(mCancelButton->getLeft() - dx,
mCancelButton->getTop(),
mCancelButton->getTextSize ().width + 24,
mCancelButton->getHeight());
center();
}

@ -90,9 +90,6 @@ RaceDialog::RaceDialog(MWBase::WindowManager& parWindowManager)
void RaceDialog::setNextButtonShow(bool shown)
{
MyGUI::ButtonPtr backButton;
getWidget(backButton, "BackButton");
MyGUI::ButtonPtr okButton;
getWidget(okButton, "OKButton");
@ -100,12 +97,6 @@ void RaceDialog::setNextButtonShow(bool shown)
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
else
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
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()

@ -77,12 +77,8 @@ ReviewDialog::ReviewDialog(MWBase::WindowManager& parWindowManager)
}
// Setup skills
getWidget(mSkillAreaWidget, "Skills");
getWidget(mSkillClientWidget, "SkillClient");
getWidget(mSkillScrollerWidget, "SkillScroller");
mSkillClientWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
mSkillScrollerWidget->eventScrollChangePosition += MyGUI::newDelegate(this, &ReviewDialog::onScrollChangePosition);
updateScroller();
getWidget(mSkillView, "SkillView");
mSkillView->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
for (int i = 0; i < ESM::Skill::Length; ++i)
{
@ -90,21 +86,13 @@ ReviewDialog::ReviewDialog(MWBase::WindowManager& parWindowManager)
mSkillWidgetMap.insert(std::make_pair(i, static_cast<MyGUI::TextBox*> (0)));
}
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &ReviewDialog::onWindowResize);
MyGUI::ButtonPtr backButton;
getWidget(backButton, "BackButton");
backButton->eventMouseButtonClick += MyGUI::newDelegate(this, &ReviewDialog::onBackClicked);
MyGUI::ButtonPtr okButton;
getWidget(okButton, "OKButton");
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
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()
@ -112,26 +100,6 @@ void ReviewDialog::open()
updateSkillArea();
}
void ReviewDialog::onScrollChangePosition(MyGUI::ScrollBar* scroller, size_t pos)
{
int diff = mLastPos - pos;
// Adjust position of all widget according to difference
if (diff == 0)
return;
mLastPos = pos;
std::vector<MyGUI::WidgetPtr>::const_iterator end = mSkillWidgets.end();
for (std::vector<MyGUI::WidgetPtr>::const_iterator it = mSkillWidgets.begin(); it != end; ++it)
{
(*it)->setCoord((*it)->getCoord() + MyGUI::IntPoint(0, diff));
}
}
void ReviewDialog::onWindowResize(MyGUI::Window* window)
{
updateScroller();
}
void ReviewDialog::setPlayerName(const std::string &name)
{
mNameWidget->setCaption(name);
@ -239,7 +207,7 @@ void ReviewDialog::configureSkills(const std::vector<int>& major, const std::vec
void ReviewDialog::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::ImageBox* separator = mSkillClientWidget->createWidget<MyGUI::ImageBox>("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default);
MyGUI::ImageBox* separator = mSkillView->createWidget<MyGUI::ImageBox>("MW_HLine", MyGUI::IntCoord(10, coord1.top, coord1.width + coord2.width - 4, 18), MyGUI::Align::Default);
separator->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
mSkillWidgets.push_back(separator);
@ -250,7 +218,7 @@ void ReviewDialog::addSeparator(MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2
void ReviewDialog::addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2)
{
MyGUI::TextBox* groupWidget = mSkillClientWidget->createWidget<MyGUI::TextBox>("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default);
MyGUI::TextBox* groupWidget = mSkillView->createWidget<MyGUI::TextBox>("SandBrightText", MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default);
groupWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
groupWidget->setCaption(label);
mSkillWidgets.push_back(groupWidget);
@ -264,11 +232,11 @@ MyGUI::TextBox* ReviewDialog::addValueItem(const std::string& text, const std::s
MyGUI::TextBox* skillNameWidget;
MyGUI::TextBox* skillValueWidget;
skillNameWidget = mSkillClientWidget->createWidget<MyGUI::TextBox>("SandText", coord1, MyGUI::Align::Default);
skillNameWidget = mSkillView->createWidget<MyGUI::TextBox>("SandText", coord1, MyGUI::Align::Default);
skillNameWidget->setCaption(text);
skillNameWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
skillValueWidget = mSkillClientWidget->createWidget<MyGUI::TextBox>("SandTextRight", coord2, MyGUI::Align::Top | MyGUI::Align::Right);
skillValueWidget = mSkillView->createWidget<MyGUI::TextBox>("SandTextRight", coord2, MyGUI::Align::Top | MyGUI::Align::Right);
skillValueWidget->setCaption(value);
skillValueWidget->_setWidgetState(state);
skillValueWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
@ -286,7 +254,7 @@ void ReviewDialog::addItem(const std::string& text, MyGUI::IntCoord &coord1, MyG
{
MyGUI::TextBox* skillNameWidget;
skillNameWidget = mSkillClientWidget->createWidget<MyGUI::TextBox>("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default);
skillNameWidget = mSkillView->createWidget<MyGUI::TextBox>("SandText", coord1 + MyGUI::IntSize(coord2.width, 0), MyGUI::Align::Default);
skillNameWidget->setCaption(text);
skillNameWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
@ -343,7 +311,7 @@ void ReviewDialog::updateSkillArea()
mSkillWidgets.clear();
const int valueSize = 40;
MyGUI::IntCoord coord1(10, 0, mSkillClientWidget->getWidth() - (10 + valueSize), 18);
MyGUI::IntCoord coord1(10, 0, mSkillView->getWidth() - (10 + valueSize) - 24, 18);
MyGUI::IntCoord coord2(coord1.left + coord1.width, coord1.top, valueSize, coord1.height);
if (!mMajorSkills.empty())
@ -356,15 +324,8 @@ void ReviewDialog::updateSkillArea()
addSkills(mMiscSkills, "sSkillClassMisc", "Misc Skills", coord1, coord2);
mClientHeight = coord1.top;
updateScroller();
}
void ReviewDialog::updateScroller()
{
mSkillScrollerWidget->setScrollRange(std::max(mClientHeight - mSkillClientWidget->getHeight(), 0));
mSkillScrollerWidget->setScrollPage(std::max(mSkillClientWidget->getHeight() - sLineHeight, 0));
if (mClientHeight != 0)
mSkillScrollerWidget->setTrackSize( (mSkillAreaWidget->getHeight() / float(mClientHeight)) * mSkillScrollerWidget->getLineSize() );
mSkillView->setCanvasSize (mSkillView->getWidth(), std::max(mSkillView->getHeight(), mClientHeight));
}
// widget controls
@ -401,12 +362,8 @@ void ReviewDialog::onBirthSignClicked(MyGUI::Widget* _sender)
void ReviewDialog::onMouseWheel(MyGUI::Widget* _sender, int _rel)
{
if (mSkillScrollerWidget->getScrollPosition() - _rel*0.3 < 0)
mSkillScrollerWidget->setScrollPosition(0);
else if (mSkillScrollerWidget->getScrollPosition() - _rel*0.3 > mSkillScrollerWidget->getScrollRange()-1)
mSkillScrollerWidget->setScrollPosition(mSkillScrollerWidget->getScrollRange()-1);
if (mSkillView->getViewOffset().top + _rel*0.3 > 0)
mSkillView->setViewOffset(MyGUI::IntPoint(0, 0));
else
mSkillScrollerWidget->setScrollPosition(mSkillScrollerWidget->getScrollPosition() - _rel*0.3);
onScrollChangePosition(mSkillScrollerWidget, mSkillScrollerWidget->getScrollPosition());
mSkillView->setViewOffset(MyGUI::IntPoint(0, mSkillView->getViewOffset().top + _rel*0.3));
}

@ -74,17 +74,12 @@ namespace MWGui
void addGroup(const std::string &label, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
MyGUI::TextBox* addValueItem(const std::string& text, const std::string &value, const std::string& state, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
void addItem(const std::string& text, MyGUI::IntCoord &coord1, MyGUI::IntCoord &coord2);
void updateScroller();
void updateSkillArea();
void onScrollChangePosition(MyGUI::ScrollBar* scroller, size_t pos);
void onWindowResize(MyGUI::Window* window);
static const int sLineHeight;
MyGUI::TextBox *mNameWidget, *mRaceWidget, *mClassWidget, *mBirthSignWidget;
MyGUI::WidgetPtr mSkillAreaWidget, mSkillClientWidget;
MyGUI::ScrollBar* mSkillScrollerWidget;
MyGUI::ScrollView* mSkillView;
int mLastPos, mClientHeight;
Widgets::MWDynamicStatPtr mHealth, mMagicka, mFatigue;

@ -160,11 +160,6 @@ namespace MWGui
center();
int okSize = mOkButton->getTextSize().width + 24;
mOkButton->setCoord(mMainWidget->getWidth()-16-okSize, mOkButton->getTop(),
okSize, mOkButton->getHeight());
mResetControlsButton->setSize (mResetControlsButton->getTextSize ().width + 24, mResetControlsButton->getHeight());
mResetControlsButton->eventMouseButtonClick += MyGUI::newDelegate(this, &SettingsWindow::onResetDefaultBindings);
// fill resolution list

@ -30,10 +30,6 @@ void TextInputDialog::setNextButtonShow(bool shown)
okButton->setCaption(mWindowManager.getGameSettingString("sNext", ""));
else
okButton->setCaption(mWindowManager.getGameSettingString("sOK", ""));
int okButtonWidth = okButton->getTextSize().width + 24;
okButton->setCoord(306 - okButtonWidth, 60, okButtonWidth, 23);
}
void TextInputDialog::setTextLabel(const std::string &label)

@ -42,26 +42,6 @@ namespace MWGui
getWidget(mTotalBalanceLabel, "TotalBalanceLabel");
getWidget(mBottomPane, "BottomPane");
// adjust size of buttons to fit text
int curX = 0;
mFilterAll->setSize( mFilterAll->getTextSize().width + 24, mFilterAll->getSize().height );
curX += mFilterAll->getTextSize().width + 24 + 4;
mFilterWeapon->setPosition(curX, mFilterWeapon->getPosition().top);
mFilterWeapon->setSize( mFilterWeapon->getTextSize().width + 24, mFilterWeapon->getSize().height );
curX += mFilterWeapon->getTextSize().width + 24 + 4;
mFilterApparel->setPosition(curX, mFilterApparel->getPosition().top);
mFilterApparel->setSize( mFilterApparel->getTextSize().width + 24, mFilterApparel->getSize().height );
curX += mFilterApparel->getTextSize().width + 24 + 4;
mFilterMagic->setPosition(curX, mFilterMagic->getPosition().top);
mFilterMagic->setSize( mFilterMagic->getTextSize().width + 24, mFilterMagic->getSize().height );
curX += mFilterMagic->getTextSize().width + 24 + 4;
mFilterMisc->setPosition(curX, mFilterMisc->getPosition().top);
mFilterMisc->setSize( mFilterMisc->getTextSize().width + 24, mFilterMisc->getSize().height );
mFilterAll->setStateSelected(true);
mFilterAll->eventMouseButtonClick += MyGUI::newDelegate(this, &TradeWindow::onFilterChanged);
@ -73,20 +53,6 @@ namespace MWGui
mCancelButton->eventMouseButtonClick += MyGUI::newDelegate(this, &TradeWindow::onCancelButtonClicked);
mOfferButton->eventMouseButtonClick += MyGUI::newDelegate(this, &TradeWindow::onOfferButtonClicked);
mMaxSaleButton->setSize(MyGUI::IntSize(mMaxSaleButton->getTextSize().width + 24, mMaxSaleButton->getHeight()));
int cancelButtonWidth = mCancelButton->getTextSize().width + 24;
mCancelButton->setCoord(mBottomPane->getWidth()-cancelButtonWidth,
mCancelButton->getTop(),
cancelButtonWidth,
mCancelButton->getHeight());
int offerButtonWidth = mOfferButton->getTextSize().width + 24;
mOfferButton->setCoord(mBottomPane->getWidth()-cancelButtonWidth-offerButtonWidth-8,
mOfferButton->getTop(),
offerButtonWidth,
mOfferButton->getHeight());
setCoord(400, 0, 400, 300);
static_cast<MyGUI::Window*>(mMainWidget)->eventWindowChangeCoord += MyGUI::newDelegate(this, &TradeWindow::onWindowResize);

@ -803,6 +803,15 @@ void AutoSizedWidget::notifySizeChange (MyGUI::Widget* w)
Box* b = dynamic_cast<Box*>(w->getParent());
if (b)
b->notifyChildrenSizeChanged ();
else
{
if (mExpandDirection == MyGUI::Align::Left)
{
int hdiff = getRequestedSize ().width - w->getSize().width;
w->setPosition(w->getPosition() - MyGUI::IntPoint(hdiff, 0));
}
w->setSize(getRequestedSize ());
}
}
}
@ -819,10 +828,24 @@ void AutoSizedTextBox::setCaption(const MyGUI::UString& _value)
notifySizeChange (this);
}
void AutoSizedTextBox::setPropertyOverride(const std::string& _key, const std::string& _value)
{
if (_key == "ExpandDirection")
{
mExpandDirection = MyGUI::Align::parse (_value);
}
else
{
TextBox::setPropertyOverride (_key, _value);
}
}
MyGUI::IntSize AutoSizedButton::getRequestedSize()
{
return getTextSize() + MyGUI::IntSize(24,0);
MyGUI::IntSize size = getTextSize() + MyGUI::IntSize(24,0);
size.height = std::max(24, size.height);
return size;
}
void AutoSizedButton::setCaption(const MyGUI::UString& _value)
@ -832,6 +855,17 @@ void AutoSizedButton::setCaption(const MyGUI::UString& _value)
notifySizeChange (this);
}
void AutoSizedButton::setPropertyOverride(const std::string& _key, const std::string& _value)
{
if (_key == "ExpandDirection")
{
mExpandDirection = MyGUI::Align::parse (_value);
}
else
{
Button::setPropertyOverride (_key, _value);
}
}
Box::Box()
: mSpacing(4)
@ -870,11 +904,15 @@ void HBox::align ()
{
sizes.push_back(std::make_pair(aw->getRequestedSize (), hstretch));
total_width += aw->getRequestedSize ().width;
if (i != count-1)
total_width += mSpacing;
}
else
sizes.push_back (std::make_pair(MyGUI::IntSize(0,0), hstretch));
{
if (!hstretch) h_stretched_count ++;
sizes.push_back (std::make_pair(MyGUI::IntSize(0,0), true));
}
if (i != count-1)
total_width += mSpacing;
}
int curX = 0;
@ -883,11 +921,11 @@ void HBox::align ()
MyGUI::Widget* w = getChildAt(i);
MyGUI::IntCoord widgetCoord;
widgetCoord.left = curX;
widgetCoord.top = 0; /// \todo
widgetCoord.top = (getSize().height - sizes[i].first.height) / 2;
int width = sizes[i].second ? sizes[i].first.width + (getSize().width - total_width)/h_stretched_count
: sizes[i].first.width;
widgetCoord.width = width;
widgetCoord.height = getSize().height; /// \todo
widgetCoord.height = sizes[i].first.height;
w->setCoord(widgetCoord);
curX += width;
@ -925,7 +963,7 @@ MyGUI::IntSize HBox::getRequestedSize ()
void VBox::align ()
{
// not yet implemented
}
void VBox::setSize (const MyGUI::IntSize& _value)

@ -315,6 +315,8 @@ namespace MWGui
protected:
void notifySizeChange(MyGUI::Widget* w);
MyGUI::Align mExpandDirection;
};
class AutoSizedTextBox : public AutoSizedWidget, public MyGUI::TextBox
@ -324,6 +326,9 @@ namespace MWGui
public:
virtual MyGUI::IntSize getRequestedSize();
virtual void setCaption(const MyGUI::UString& _value);
protected:
virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
};
class AutoSizedButton : public AutoSizedWidget, public MyGUI::Button
@ -333,6 +338,9 @@ namespace MWGui
public:
virtual MyGUI::IntSize getRequestedSize();
virtual void setCaption(const MyGUI::UString& _value);
protected:
virtual void setPropertyOverride(const std::string& _key, const std::string& _value);
};
/**

@ -76,11 +76,13 @@
</Widget>
<!-- Buttons -->
<Widget type="Widget" skin="" position="270 370 270 24">
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="CreateButton">
<Widget type="HBox" skin="" position="160 370 380 24">
<Widget type="Widget"/> <!-- spacer -->
<Widget type="AutoSizedButton" skin="MW_Button" name="CreateButton">
<Property key="Caption" value="#{sCreate}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="CancelButton">
<Widget type="AutoSizedButton" skin="MW_Button" name="CancelButton">
<Property key="Caption" value="#{sCancel}"/>
</Widget>
</Widget>

@ -14,11 +14,14 @@
</Widget>
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="375 340 53 23" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="431 340 42 23" name="OKButton">
<Property key="Caption" value="OK"/>
<Widget type="HBox" position="0 340 473 24">
<Widget type="Widget"/> <!-- spacer -->
<Widget type="AutoSizedButton" skin="MW_Button" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="OKButton">
<Property key="Caption" value="OK"/>
</Widget>
</Widget>
</Widget>
</MyGUI>

@ -60,11 +60,14 @@
</Widget>
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="382 265 53 23" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="434 265 42 23" name="OKButton">
<Property key="Caption" value="#{sOK}"/>
<Widget type="HBox" position="0 265 476 24">
<Widget type="Widget"/> <!-- spacer -->
<Widget type="AutoSizedButton" skin="MW_Button" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="OKButton">
<Property key="Caption" value="#{sOK}"/>
</Widget>
</Widget>
</Widget>
</MyGUI>

@ -11,7 +11,8 @@
</Widget>
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="177 214 57 24" name="OKButton">
<Widget type="AutoSizedButton" skin="MW_Button" position="177 214 57 24" name="OKButton">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="Enter"/>
</Widget>
</Widget>

@ -58,14 +58,17 @@
</Widget>
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="207 158 143 23" name="DescriptionButton">
<Property key="Caption" value="Class Description"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="356 158 53 23" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="417 158 42 23" name="OKButton">
<Property key="Caption" value="#{sOK}"/>
<Widget type="HBox" position="0 158 459 24">
<Widget type="Widget"/> <!-- spacer -->
<Widget type="AutoSizedButton" skin="MW_Button" name="DescriptionButton">
<Property key="Caption" value="#{sCreateClassMenu1}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="OKButton">
<Property key="Caption" value="#{sOK}"/>
</Widget>
</Widget>
</Widget>
</MyGUI>

@ -20,11 +20,14 @@
</Widget>
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="220 219 53 23" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="277 219 42 23" name="OKButton">
<Property key="Caption" value="#{sOK}"/>
<Widget type="HBox" position="0 219 319 24">
<Widget type="Widget"/> <!-- spacer -->
<Widget type="AutoSizedButton" skin="MW_Button" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="OKButton">
<Property key="Caption" value="#{sOK}"/>
</Widget>
</Widget>
</Widget>
</MyGUI>

@ -54,11 +54,14 @@
<Widget type="Widget" skin="" position="403 59 159 360" name="SkillList" />
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="471 397 53 23" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="532 397 42 23" name="OKButton">
<Property key="Caption" value="OK"/>
<Widget type="HBox" position="0 397 574 24">
<Widget type="Widget"/>
<Widget type="AutoSizedButton" skin="MW_Button" position="471 397 53 23" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="532 397 42 23" name="OKButton">
<Property key="Caption" value="#{sOK]"/>
</Widget>
</Widget>
</Widget>
</MyGUI>

@ -107,16 +107,18 @@
<!-- Player skills, factions, birthsign and reputation -->
<Widget type="Widget" skin="MW_Box" position="258 12 244 356" align="ALIGN_LEFT ALIGN_VSTRETCH" name="Skills">
<Widget type="Widget" skin="" position="4 4 218 346" align="ALIGN_STRETCH" name="SkillClient" />
<Widget type="ScrollBar" skin="MW_VScroll" position="226 4 14 346" align="ALIGN_RIGHT ALIGN_VSTRETCH" name="SkillScroller" />
<Widget type="ScrollView" skin="MW_ScrollView" position="4 4 236 346" align="ALIGN_STRETCH" name="SkillView" />
</Widget>
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="400 372 53 23" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="460 372 42 23" name="OKButton">
<Property key="Caption" value="#{sOK}"/>
<Widget type="HBox" position="0 372 502 24">
<Widget type="Widget"/>
<Widget type="AutoSizedButton" skin="MW_Button" name="BackButton">
<Property key="Caption" value="#{sBack}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="OKButton">
<Property key="Caption" value="#{sOK}"/>
</Widget>
</Widget>
</Widget>
</MyGUI>

@ -20,7 +20,8 @@
<Widget type="MWAttribute" skin="MW_StatNameButtonC" position="0 154 186 18" name="Attribute7" align="ALIGN_LEFT ALIGN_TOP" />
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="120 180 66 21" name="CancelButton">
<Widget type="AutoSizedButton" skin="MW_Button" position="120 180 66 21" name="CancelButton">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="Cancel"/>
</Widget>

@ -55,7 +55,8 @@
<Widget type="MWSkill" skin="MW_StatNameButton" position="316 194 131 18" name="StealthSkill8" align="ALIGN_LEFT ALIGN_TOP" />
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="381 218 66 21" name="CancelButton">
<Widget type="AutoSizedButton" skin="MW_Button" position="381 218 66 21" name="CancelButton">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="Cancel"/>
</Widget>

@ -22,7 +22,8 @@
</Widget>
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="150 90 66 21" name="CancelButton">
<Widget type="AutoSizedButton" skin="MW_Button" position="150 90 66 21" name="CancelButton">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="Cancel"/>
</Widget>

@ -13,11 +13,14 @@
<Property key="MultiLine" value="true" />
</Widget>
<Widget type="Button" skin="MW_Button" position="212 84 60 24" name="OkButton" align="Right Bottom">
<Property key="Caption" value="#{sOk}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="117 84 60 24" name="CancelButton" align="Right Bottom">
<Property key="Caption" value="#{sCancel}"/>
<Widget type="HBox" position="0 84 272 24">
<Widget type="Widget"/> <!-- spacer -->
<Widget type="AutoSizedButton" skin="MW_Button" name="CancelButton" align="Right Bottom">
<Property key="Caption" value="#{sCancel}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="OkButton" align="Right Bottom">
<Property key="Caption" value="#{sOk}"/>
</Widget>
</Widget>
</Widget>

@ -11,12 +11,14 @@
</Widget>
</Widget>
<!-- buttons position adjusted at runtime to fit text -->
<Widget type="Button" skin="MW_Button" position="0 235 75 24" name="TakeButton" align="Right Bottom">
<Property key="Caption" value="#{sTakeAll}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 235 60 24" name="CloseButton" align="Right Bottom">
<Property key="Caption" value="#{sClose}"/>
<Widget type="HBox" position="0 235 580 24" align="Right Bottom">
<Widget type="Widget"/>
<Widget type="AutoSizedButton" skin="MW_Button" name="TakeButton" align="Right Bottom">
<Property key="Caption" value="#{sTakeAll}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="CloseButton" align="Right Bottom">
<Property key="Caption" value="#{sClose}"/>
</Widget>
</Widget>
</Widget>

@ -20,11 +20,15 @@
<Property key="MoveToClick" value="true"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="512 90 60 24" name="OkButton" align="Right Top">
<Property key="Caption" value="#{sOk}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="417 90 60 24" name="CancelButton" align="Right Top">
<Property key="Caption" value="#{sCancel}"/>
<Widget type="HBox" position="0 90 572 24">
<Widget type="Widget"/> <!-- spacer -->
<Widget type="AutoSizedButton" skin="MW_Button" position="417 90 60 24" name="CancelButton" align="Right Top">
<Property key="Caption" value="#{sCancel}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" position="512 90 60 24" name="OkButton" align="Right Top">
<Property key="Caption" value="#{sOk}"/>
</Widget>
</Widget>
</Widget>

@ -11,7 +11,8 @@
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="340 110 24 24" name="CancelButton">
<Widget type="AutoSizedButton" skin="MW_Button" position="340 110 24 24" name="CancelButton">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sCancel}"/>
</Widget>

@ -11,7 +11,8 @@
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" name="CancelButton" position="284 330 32 24" align="Right Bottom">
<Widget type="AutoSizedButton" skin="MW_Button" name="CancelButton" position="284 330 32 24" align="Right Bottom">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sCancel}"/>
</Widget>

@ -19,7 +19,9 @@
</Widget>
<!-- World button -->
<Widget type="Button" skin="MW_Button" position="213 233 61 22" align="ALIGN_BOTTOM ALIGN_RIGHT" name="WorldButton"/>
<Widget type="AutoSizedButton" skin="MW_Button" position="213 233 61 22" align="ALIGN_BOTTOM ALIGN_RIGHT" name="WorldButton">
<Property key="ExpandDirection" value="Left"/>
</Widget>
</Widget>
</MyGUI>

@ -30,7 +30,8 @@
</Widget>
<Widget type="Button" skin="MW_Button" name="OKButton" position="315 190 32 24" align="Right Bottom">
<Widget type="AutoSizedButton" skin="MW_Button" name="OKButton" position="315 190 32 24" align="Right Bottom">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sOK}"/>
</Widget>

@ -103,16 +103,17 @@
<Widget type="ScrollView" skin="MW_ScrollView" name="ControlsBox" position="4 4 336 142"/>
</Widget>
<Widget type="Button" skin="MW_Button" name="ResetControlsButton" position="4 162 100 24">
<Widget type="AutoSizedButton" skin="MW_Button" name="ResetControlsButton" position="4 162 100 24">
<Property key="Caption" value="#{sControlsMenu1}"/>
</Widget>
<Widget type="Button" skin="MW_Button" name="InvertYButton" position="4 192 32 24"/>
<Widget type="TextBox" skin="SandText" position="40 192 200 24">
<Property key="Caption" value="#{sMouseFlip}"/>
<Widget type="HBox" position="4 192 300 24">
<Widget type="AutoSizedButton" skin="MW_Button" name="InvertYButton"/>
<Widget type="AutoSizedTextBox" skin="SandText">
<Property key="Caption" value="#{sMouseFlip}"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="NormalText" position="4 228 160 18" align="Left Top">
<Property key="Caption" value="UI cursor sensitivity"/>
</Widget>
@ -157,26 +158,35 @@
<Property key="Caption" value=" Video "/>
<Widget type="ListBox" skin="MW_List" position="4 4 200 150" align="Left Top" name="ResolutionList"/>
<Widget type="TextBox" skin="SandText" position="252 4 120 24" align="Left Top">
<Property key="Caption" value="Fullscreen"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="212 4 34 24" align="Left Top" name="FullscreenButton"/>
<Widget type="TextBox" skin="SandText" position="252 34 120 24" align="Left Top">
<Property key="Caption" value="VSync"/>
<Widget type="HBox" position="212 4 300 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="FullscreenButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Fullscreen"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="212 34 34 24" align="Left Top" name="VSyncButton"/>
<Widget type="TextBox" skin="SandText" position="262 104 120 24" align="Left Top">
<Property key="Caption" value="Shaders"/>
<Widget type="HBox" position="212 34 300 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="VSyncButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="VSync"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="212 104 44 24" align="Left Top" name="ShadersButton"/>
<Widget type="HBox" position="212 104 300 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ShadersButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Shaders"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="SandText" position="74 163 250 24" align="Left Top">
<Property key="Caption" value="Show frames per second"/>
<Widget type="HBox" position="4 163 300 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="FPSButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Show frames per second"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 163 64 24" align="Left Top" name="FPSButton"/>
<Widget type="TextBox" skin="NormalText" position="4 198 329 18" align="Left Top" name="FovText">
<Property key="Caption" value="Field of View"/>
@ -200,7 +210,7 @@
<Widget type="TextBox" skin="NormalText" position="4 4 300 24" align="Left Top">
<Property key="Caption" value="Texture filtering"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="18 28 140 24" align="Left Top" name="TextureFilteringButton"/>
<Widget type="AutoSizedButton" skin="MW_Button" position="18 28 140 24" align="Left Top" name="TextureFilteringButton"/>
<Widget type="Widget" skin="" position="184 4 300 50" align="Left Top" name="AnisotropyBox">
<Widget type="TextBox" skin="SandText" position="0 0 300 24" align="Left Top" name="AnisotropyLabel">
@ -230,74 +240,99 @@
<Widget type="TabItem" skin="" position="4 28 344 272">
<Property key="Caption" value=" Water "/>
<Widget type="TextBox" skin="SandText" position="42 4 120 24" align="Left Top">
<Property key="Caption" value="Reflection"/>
<Widget type="HBox" position="4 4 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" position="4 4 34 24" align="Left Top" name="WaterShaderButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" position="42 4 120 24" align="Left Top">
<Property key="Caption" value="Reflection"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 4 34 24" align="Left Top" name="WaterShaderButton"/>
<Widget type="Widget" skin="" position="24 32 300 230">
<Widget type="TextBox" skin="SandText" position="42 0 120 24" align="Left Top">
<Property key="Caption" value="Reflect actors"/>
<Widget type="HBox" position="4 0 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ReflectActorsButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Reflect actors"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 0 34 24" align="Left Top" name="ReflectActorsButton"/>
<Widget type="TextBox" skin="SandText" position="42 28 120 24" align="Left Top">
<Property key="Caption" value="Reflect objects"/>
<Widget type="HBox" position="4 28 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ReflectObjectsButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Reflect objects"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 28 34 24" align="Left Top" name="ReflectObjectsButton"/>
<Widget type="TextBox" skin="SandText" position="42 56 120 24" align="Left Top">
<Property key="Caption" value="Reflect terrain"/>
<Widget type="HBox" position="4 56 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ReflectTerrainButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Reflect terrain"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 56 34 24" align="Left Top" name="ReflectTerrainButton"/>
</Widget>
<Widget type="TextBox" skin="SandText" position="42 135 300 24" align="Left Top">
<Property key="Caption" value="Underwater effects (caustics, fog)"/>
<Widget type="HBox" position="4 135 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="UnderwaterButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Underwater effects (caustics, fog)"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 135 34 24" align="Left Top" name="UnderwaterButton"/>
</Widget>
<Widget type="TabItem" skin="" position="4 28 344 272">
<Property key="Caption" value=" Shadows "/>
<Widget type="TextBox" skin="SandText" position="42 4 120 24" align="Left Top">
<Property key="Caption" value="Enabled"/>
<Widget type="HBox" position="4 4 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ShadowsEnabledButton"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Enabled"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 4 34 24" align="Left Top" name="ShadowsEnabledButton"/>
<Widget type="Widget" skin="" position="24 32 300 230">
<Widget type="TextBox" skin="SandText" position="42 0 300 24" align="Left Top">
<Property key="Caption" value="Large distance (PSSM3)"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 0 34 24" align="Left Top" name="ShadowsLargeDistance"/>
<Widget type="TextBox" skin="SandText" position="72 28 120 24" align="Left Top">
<Property key="Caption" value="Texture size"/>
<Widget type="HBox" position="4 0 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ShadowsLargeDistance"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Large distance (PSSM3)"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 28 64 24" align="Left Top" name="ShadowsTextureSize"/>
<Widget type="TextBox" skin="SandText" position="42 56 120 24" align="Left Top">
<Property key="Caption" value="Actor shadows"/>
<Widget type="HBox" position="4 28 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ShadowsTextureSize"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Texture size"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 56 34 24" align="Left Top" name="ActorShadows"/>
<Widget type="TextBox" skin="SandText" position="42 84 120 24" align="Left Top">
<Property key="Caption" value="World shadows"/>
<Widget type="HBox" position="4 56 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ActorShadows"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Actor shadows"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 84 34 24" align="Left Top" name="StaticsShadows"/>
<Widget type="TextBox" skin="SandText" position="42 112 120 24" align="Left Top">
<Property key="Caption" value="Misc shadows"/>
<Widget type="HBox" position="4 84 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="StaticsShadows"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="World shadows"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 112 34 24" align="Left Top" name="MiscShadows"/>
<Widget type="TextBox" skin="SandText" position="42 172 120 24" align="Left Top">
<Property key="Caption" value="Debug overlay"/>
<Widget type="HBox" position="4 112 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="MiscShadows"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Misc shadows"/>
</Widget>
</Widget>
<Widget type="HBox" position="4 172 350 24">
<Widget type="AutoSizedButton" skin="MW_Button" align="Left Top" name="ShadowsDebug"/>
<Widget type="AutoSizedTextBox" skin="SandText" align="Left Top">
<Property key="Caption" value="Debug overlay"/>
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="4 172 34 24" align="Left Top" name="ShadowsDebug"/>
</Widget>
@ -307,8 +342,9 @@
</Widget>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 351 60 24" name="OkButton" align="Right Bottom">
<Property key="Caption" value="#{sOk}"/>
<Widget type="AutoSizedButton" skin="MW_Button" position="317 351 60 24" name="OkButton" align="Right Bottom">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="#{sOK}"/>
</Widget>
</Widget>

@ -10,7 +10,8 @@
<Widget type="EditBox" skin="MW_TextEdit" position="6 28 300 30" name="TextEdit" align="ALIGN_LEFT ALIGN_TOP"/>
<!-- Dialog buttons -->
<Widget type="Button" skin="MW_Button" position="264 60 42 23" name="OKButton">
<Widget type="AutoSizedButton" skin="MW_Button" position="264 60 42 23" name="OKButton">
<Property key="ExpandDirection" value="Left"/>
<Property key="Caption" value="OK"/>
</Widget>
</Widget>

@ -5,20 +5,20 @@
<Property key="Visible" value="false"/>
<!-- Categories -->
<Widget type="Widget" position="8 8 566 24" align="Left Top HStretch" name="Categories">
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="AllButton">
<Widget type="HBox" position="8 8 566 24" align="Left Top HStretch" name="Categories">
<Widget type="AutoSizedButton" skin="MW_Button" name="AllButton">
<Property key="Caption" value="#{sAllTab}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="WeaponButton">
<Widget type="AutoSizedButton" skin="MW_Button" name="WeaponButton">
<Property key="Caption" value="#{sWeaponTab}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="ApparelButton">
<Widget type="AutoSizedButton" skin="MW_Button" name="ApparelButton">
<Property key="Caption" value="#{sApparelTab}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="MagicButton">
<Widget type="AutoSizedButton" skin="MW_Button" name="MagicButton">
<Property key="Caption" value="#{sMagicTab}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 0 60 24" name="MiscButton">
<Widget type="AutoSizedButton" skin="MW_Button" name="MiscButton">
<Property key="Caption" value="#{sMiscTab}"/>
</Widget>
</Widget>
@ -51,14 +51,18 @@
<Property key="TextAlign" value="Center"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 60 60 24" name="MaxSaleButton" align="Left Top">
<Widget type="AutoSizedButton" skin="MW_Button" position="0 60 60 24" name="MaxSaleButton" align="Left Top">
<Property key="Caption" value="Max. Sale"/> <!-- GMST sMaxSale doesn't work -->
</Widget>
<Widget type="Button" skin="MW_Button" position="0 60 60 24" name="CancelButton" align="Right Top">
<Property key="Caption" value="#{sCancel}"/>
</Widget>
<Widget type="Button" skin="MW_Button" position="0 60 60 24" name="OfferButton" align="Right Top">
<Property key="Caption" value="#{sBarterDialog8}"/>
<Widget type="HBox" position="0 60 566 24" align="Right Bottom">
<Widget type="Widget"/>
<Widget type="AutoSizedButton" skin="MW_Button" name="OfferButton" align="Right Top">
<Property key="Caption" value="#{sBarterDialog8}"/>
</Widget>
<Widget type="AutoSizedButton" skin="MW_Button" name="CancelButton" align="Right Top">
<Property key="Caption" value="#{sCancel}"/>
</Widget>
</Widget>
</Widget>

Loading…
Cancel
Save