Merchant repair and travel window scroll fix

0.6.1
Andrei Kortunov 8 years ago
parent bc9080d9d7
commit c2706ac3e7

@ -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);

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

@ -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);

Loading…
Cancel
Save