Merchant repair and travel window scroll fix

pull/209/head^2
Andrei Kortunov 8 years ago
parent bc9080d9d7
commit c2706ac3e7

@ -21,6 +21,7 @@
namespace MWGui namespace MWGui
{ {
const int MerchantRepair::sLineHeight = 18;
MerchantRepair::MerchantRepair() MerchantRepair::MerchantRepair()
: WindowBase("openmw_merchantrepair.layout") : WindowBase("openmw_merchantrepair.layout")
@ -79,16 +80,16 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor)
0, 0,
currentY, currentY,
0, 0,
18, sLineHeight,
MyGUI::Align::Default MyGUI::Align::Default
); );
currentY += 18; currentY += sLineHeight;
button->setUserString("Price", MyGUI::utility::toString(price)); button->setUserString("Price", MyGUI::utility::toString(price));
button->setUserData(MWWorld::Ptr(*iter)); button->setUserData(MWWorld::Ptr(*iter));
button->setCaptionWithReplacing(name); button->setCaptionWithReplacing(name);
button->setSize(button->getTextSize().width,18); button->setSize(mList->getWidth(),sLineHeight);
button->eventMouseWheel += MyGUI::newDelegate(this, &MerchantRepair::onMouseWheel); button->eventMouseWheel += MyGUI::newDelegate(this, &MerchantRepair::onMouseWheel);
button->setUserString("ToolTipType", "ItemPtr"); button->setUserString("ToolTipType", "ItemPtr");
button->eventMouseButtonClick += MyGUI::newDelegate(this, &MerchantRepair::onRepairButtonClick); button->eventMouseButtonClick += MyGUI::newDelegate(this, &MerchantRepair::onRepairButtonClick);

@ -30,6 +30,7 @@ protected:
void onRepairButtonClick(MyGUI::Widget* sender); void onRepairButtonClick(MyGUI::Widget* sender);
void onOkButtonClick(MyGUI::Widget* sender); void onOkButtonClick(MyGUI::Widget* sender);
static const int sLineHeight;
}; };
} }

@ -94,7 +94,7 @@ namespace MWGui
toAdd->setUserString("price",oss.str()); toAdd->setUserString("price",oss.str());
toAdd->setCaptionWithReplacing("#{sCell=" + name + "} - " + MyGUI::utility::toString(price)+"#{sgp}"); 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->eventMouseWheel += MyGUI::newDelegate(this, &TravelWindow::onMouseWheel);
toAdd->setUserString("Destination", name); toAdd->setUserString("Destination", name);
toAdd->setUserData(pos); toAdd->setUserData(pos);

Loading…
Cancel
Save