mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
fixed mygui leaking some stuff resulting in lower fps after looking at tooltips and low-quality text
This commit is contained in:
parent
cc365c5bcb
commit
6d21fe3115
1 changed files with 4 additions and 7 deletions
|
@ -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 we are destroying/creating the tooltip widgets every frame here,
|
||||
/// because the tooltip might change (e.g. when trap is activated)
|
||||
/// is there maybe a better way (listener when the object changes)?
|
||||
for (size_t i=0; i<mDynamicToolTipBox->getChildCount(); ++i)
|
||||
{
|
||||
mDynamicToolTipBox->_destroyChildWidget(mDynamicToolTipBox->getChildAt(i));
|
||||
}
|
||||
MyGUI::Gui::getInstance().destroyWidget(mDynamicToolTipBox);
|
||||
mDynamicToolTipBox = mMainWidget->createWidget<Widget>("HUD_Box",
|
||||
IntCoord(0, 0, mMainWidget->getCoord().width, mMainWidget->getCoord().height),
|
||||
Align::Stretch, "DynamicToolTipBox");
|
||||
|
||||
const IntSize &viewSize = RenderManager::getInstance().getViewSize();
|
||||
|
||||
|
|
Loading…
Reference in a new issue