Update canvas size every frame when it is visible (bug 7603)

macos_ci_fix
Andrei Kortunov 8 months ago
parent 3ea14e904d
commit 1ac0a3b25b

@ -73,6 +73,7 @@
Bug #7553: Faction reaction loading is incorrect
Bug #7557: Terrain::ChunkManager::createChunk is called twice for the same position, lod on initial loading
Bug #7573: Drain Fatigue can't bring fatigue below zero by default
Bug #7603: Scripts menu size is not updated properly
Feature #3537: Shader-based water ripples
Feature #5492: Let rain and snow collide with statics
Feature #6149: Dehardcode Lua API_REVISION

@ -230,6 +230,16 @@ namespace MWGui
}
}
void SettingsWindow::onFrame(float duration)
{
if (mScriptView->getVisible())
{
const auto scriptsSize = mScriptAdapter->getSize();
if (mScriptView->getCanvasSize() != scriptsSize)
mScriptView->setCanvasSize(scriptsSize);
}
}
void SettingsWindow::updateSliderLabel(MyGUI::ScrollBar* scroller, const std::string& value)
{
std::string labelWidgetName = scroller->getUserString("SettingLabelWidget");
@ -1005,7 +1015,6 @@ namespace MWGui
mScriptDisabled->setVisible(disabled);
LuaUi::attachPageAt(mCurrentPage, mScriptAdapter);
mScriptView->setCanvasSize(mScriptAdapter->getSize());
}
void SettingsWindow::onScriptFilterChange(MyGUI::EditBox*)
@ -1022,7 +1031,6 @@ namespace MWGui
mCurrentPage = *mScriptList->getItemDataAt<size_t>(index);
LuaUi::attachPageAt(mCurrentPage, mScriptAdapter);
}
mScriptView->setCanvasSize(mScriptAdapter->getSize());
}
void SettingsWindow::onRebindAction(MyGUI::Widget* _sender)

@ -14,6 +14,8 @@ namespace MWGui
void onOpen() override;
void onFrame(float duration) override;
void updateControlsBox();
void updateLightSettings();

Loading…
Cancel
Save