1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 17:59:56 +00:00

Merge branch 'menu_fix' into 'master'

Update canvas size every frame when it is visible

See merge request OpenMW/openmw!3463
This commit is contained in:
psi29a 2023-09-29 11:25:09 +00:00
commit 08ff69f199
3 changed files with 13 additions and 2 deletions

View file

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

View file

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

View file

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