From aac78d29a4e15a9bccef329cee85fe380d2a9311 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sat, 15 Apr 2017 15:54:42 +0400 Subject: [PATCH 1/3] Service menus layout fixes --- apps/openmw/mwgui/spellbuyingwindow.cpp | 4 +-- apps/openmw/mwgui/travelwindow.cpp | 2 -- files/mygui/openmw_alchemy_window.layout | 6 +++-- files/mygui/openmw_enchanting_dialog.layout | 26 +++++++++++-------- files/mygui/openmw_merchantrepair.layout | 10 +++---- files/mygui/openmw_scroll.skin.xml | 4 +-- files/mygui/openmw_spell_buying_window.layout | 14 +++++----- .../mygui/openmw_spellcreation_dialog.layout | 1 + files/mygui/openmw_travel_window.layout | 18 ++++++------- 9 files changed, 44 insertions(+), 41 deletions(-) diff --git a/apps/openmw/mwgui/spellbuyingwindow.cpp b/apps/openmw/mwgui/spellbuyingwindow.cpp index 843731cff..7de4e326e 100644 --- a/apps/openmw/mwgui/spellbuyingwindow.cpp +++ b/apps/openmw/mwgui/spellbuyingwindow.cpp @@ -26,8 +26,6 @@ namespace MWGui , mLastPos(0) , mCurrentY(0) { - setCoord(0, 0, 450, 300); - getWidget(mCancelButton, "CancelButton"); getWidget(mPlayerGold, "PlayerGold"); getWidget(mSpellsView, "SpellsView"); @@ -68,7 +66,7 @@ namespace MWGui toAdd->setUserData(price); toAdd->setCaptionWithReplacing(spell->mName+" - "+MyGUI::utility::toString(price)+"#{sgp}"); - toAdd->setSize(toAdd->getTextSize().width,sLineHeight); + toAdd->setSize(mSpellsView->getWidth(),sLineHeight); toAdd->eventMouseWheel += MyGUI::newDelegate(this, &SpellBuyingWindow::onMouseWheel); toAdd->setUserString("ToolTipType", "Spell"); toAdd->setUserString("Spell", spellId); diff --git a/apps/openmw/mwgui/travelwindow.cpp b/apps/openmw/mwgui/travelwindow.cpp index 3063b3268..90d3f857a 100644 --- a/apps/openmw/mwgui/travelwindow.cpp +++ b/apps/openmw/mwgui/travelwindow.cpp @@ -28,8 +28,6 @@ namespace MWGui WindowBase("openmw_travel_window.layout") , mCurrentY(0) { - setCoord(0, 0, 450, 300); - getWidget(mCancelButton, "CancelButton"); getWidget(mPlayerGold, "PlayerGold"); getWidget(mSelect, "Select"); diff --git a/files/mygui/openmw_alchemy_window.layout b/files/mygui/openmw_alchemy_window.layout index ef8296980..d578f5506 100644 --- a/files/mygui/openmw_alchemy_window.layout +++ b/files/mygui/openmw_alchemy_window.layout @@ -6,12 +6,14 @@ - + - + + + diff --git a/files/mygui/openmw_enchanting_dialog.layout b/files/mygui/openmw_enchanting_dialog.layout index 88e0ec247..63638418c 100644 --- a/files/mygui/openmw_enchanting_dialog.layout +++ b/files/mygui/openmw_enchanting_dialog.layout @@ -1,9 +1,10 @@ - + - + + @@ -14,6 +15,7 @@ + @@ -23,7 +25,7 @@ - + @@ -35,7 +37,9 @@ - + + + @@ -49,7 +53,7 @@ - + @@ -95,29 +99,29 @@ - + - + - + - - + + - + diff --git a/files/mygui/openmw_merchantrepair.layout b/files/mygui/openmw_merchantrepair.layout index de5d0e316..fc85dc7ae 100644 --- a/files/mygui/openmw_merchantrepair.layout +++ b/files/mygui/openmw_merchantrepair.layout @@ -4,25 +4,25 @@ - + - + - + - + - + diff --git a/files/mygui/openmw_scroll.skin.xml b/files/mygui/openmw_scroll.skin.xml index b0b9dca17..415c2479a 100644 --- a/files/mygui/openmw_scroll.skin.xml +++ b/files/mygui/openmw_scroll.skin.xml @@ -4,12 +4,12 @@ - + - + diff --git a/files/mygui/openmw_spell_buying_window.layout b/files/mygui/openmw_spell_buying_window.layout index 73fb6e869..3481575de 100644 --- a/files/mygui/openmw_spell_buying_window.layout +++ b/files/mygui/openmw_spell_buying_window.layout @@ -1,28 +1,28 @@ - + - + - + - - + + - + - + diff --git a/files/mygui/openmw_spellcreation_dialog.layout b/files/mygui/openmw_spellcreation_dialog.layout index e14674ad6..ba72c6541 100644 --- a/files/mygui/openmw_spellcreation_dialog.layout +++ b/files/mygui/openmw_spellcreation_dialog.layout @@ -13,6 +13,7 @@ + diff --git a/files/mygui/openmw_travel_window.layout b/files/mygui/openmw_travel_window.layout index 2d6b1324a..7dd9df4eb 100644 --- a/files/mygui/openmw_travel_window.layout +++ b/files/mygui/openmw_travel_window.layout @@ -1,29 +1,29 @@ - + - + - - - + + + - - + + - + - + From bc9080d9d731cd9557f3fb02560a781e3f2ef5d0 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 23 Apr 2017 08:56:54 +0400 Subject: [PATCH 2/3] Removed 31 symbols cap from service menus --- files/mygui/openmw_alchemy_window.layout | 1 - files/mygui/openmw_enchanting_dialog.layout | 1 - files/mygui/openmw_spellcreation_dialog.layout | 1 - 3 files changed, 3 deletions(-) diff --git a/files/mygui/openmw_alchemy_window.layout b/files/mygui/openmw_alchemy_window.layout index d578f5506..8a1bf1347 100644 --- a/files/mygui/openmw_alchemy_window.layout +++ b/files/mygui/openmw_alchemy_window.layout @@ -12,7 +12,6 @@ - diff --git a/files/mygui/openmw_enchanting_dialog.layout b/files/mygui/openmw_enchanting_dialog.layout index 63638418c..ce9429c67 100644 --- a/files/mygui/openmw_enchanting_dialog.layout +++ b/files/mygui/openmw_enchanting_dialog.layout @@ -15,7 +15,6 @@ - diff --git a/files/mygui/openmw_spellcreation_dialog.layout b/files/mygui/openmw_spellcreation_dialog.layout index ba72c6541..e14674ad6 100644 --- a/files/mygui/openmw_spellcreation_dialog.layout +++ b/files/mygui/openmw_spellcreation_dialog.layout @@ -13,7 +13,6 @@ - From c2706ac3e7e6e040693827b042c1547b7ee7fb04 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 23 Apr 2017 09:14:32 +0400 Subject: [PATCH 3/3] Merchant repair and travel window scroll fix --- apps/openmw/mwgui/merchantrepair.cpp | 7 ++++--- apps/openmw/mwgui/merchantrepair.hpp | 1 + apps/openmw/mwgui/travelwindow.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwgui/merchantrepair.cpp b/apps/openmw/mwgui/merchantrepair.cpp index c4639d602..f3a3e94ed 100644 --- a/apps/openmw/mwgui/merchantrepair.cpp +++ b/apps/openmw/mwgui/merchantrepair.cpp @@ -21,6 +21,7 @@ namespace MWGui { +const int MerchantRepair::sLineHeight = 18; MerchantRepair::MerchantRepair() : WindowBase("openmw_merchantrepair.layout") @@ -79,16 +80,16 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor) 0, currentY, 0, - 18, + sLineHeight, MyGUI::Align::Default ); - currentY += 18; + currentY += sLineHeight; button->setUserString("Price", MyGUI::utility::toString(price)); button->setUserData(MWWorld::Ptr(*iter)); button->setCaptionWithReplacing(name); - button->setSize(button->getTextSize().width,18); + button->setSize(mList->getWidth(),sLineHeight); button->eventMouseWheel += MyGUI::newDelegate(this, &MerchantRepair::onMouseWheel); button->setUserString("ToolTipType", "ItemPtr"); button->eventMouseButtonClick += MyGUI::newDelegate(this, &MerchantRepair::onRepairButtonClick); diff --git a/apps/openmw/mwgui/merchantrepair.hpp b/apps/openmw/mwgui/merchantrepair.hpp index 231d11089..8dcdfee12 100644 --- a/apps/openmw/mwgui/merchantrepair.hpp +++ b/apps/openmw/mwgui/merchantrepair.hpp @@ -30,6 +30,7 @@ protected: void onRepairButtonClick(MyGUI::Widget* sender); void onOkButtonClick(MyGUI::Widget* sender); + static const int sLineHeight; }; } diff --git a/apps/openmw/mwgui/travelwindow.cpp b/apps/openmw/mwgui/travelwindow.cpp index 90d3f857a..59d139e20 100644 --- a/apps/openmw/mwgui/travelwindow.cpp +++ b/apps/openmw/mwgui/travelwindow.cpp @@ -94,7 +94,7 @@ namespace MWGui toAdd->setUserString("price",oss.str()); toAdd->setCaptionWithReplacing("#{sCell=" + name + "} - " + MyGUI::utility::toString(price)+"#{sgp}"); - toAdd->setSize(toAdd->getTextSize().width,sLineHeight); + toAdd->setSize(mDestinationsView->getWidth(),sLineHeight); toAdd->eventMouseWheel += MyGUI::newDelegate(this, &TravelWindow::onMouseWheel); toAdd->setUserString("Destination", name); toAdd->setUserData(pos);