1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-02 06:45:33 +00:00

fixed mygui leaking some stuff resulting in lower fps after looking at tooltips and low-quality text

This commit is contained in:
scrawl 2012-04-30 21:07:25 +02:00
parent cc365c5bcb
commit 6d21fe3115

View file

@ -31,13 +31,10 @@ void ToolTips::onFrame(float frameDuration)
{ {
/// \todo Store a MWWorld::Ptr in the widget user data, retrieve it here and construct a tooltip dynamically /// \todo Store a MWWorld::Ptr in the widget user data, retrieve it here and construct a tooltip dynamically
/// \todo we are destroying/creating the tooltip widgets every frame here, MyGUI::Gui::getInstance().destroyWidget(mDynamicToolTipBox);
/// because the tooltip might change (e.g. when trap is activated) mDynamicToolTipBox = mMainWidget->createWidget<Widget>("HUD_Box",
/// is there maybe a better way (listener when the object changes)? IntCoord(0, 0, mMainWidget->getCoord().width, mMainWidget->getCoord().height),
for (size_t i=0; i<mDynamicToolTipBox->getChildCount(); ++i) Align::Stretch, "DynamicToolTipBox");
{
mDynamicToolTipBox->_destroyChildWidget(mDynamicToolTipBox->getChildAt(i));
}
const IntSize &viewSize = RenderManager::getInstance().getViewSize(); const IntSize &viewSize = RenderManager::getInstance().getViewSize();