GUI: Generate ExtraGuiOptions dynamically in a scrollable container (#2783)
This allows for the removal of hardcoded extra GUI options from the theme files, and lifts restrictions related to the maximum number of allowed ExtraGuiOptions
This commit is contained in:
parent
a7b776cab5
commit
f9f7d0eb10
21 changed files with 30 additions and 337 deletions
|
@ -941,7 +941,7 @@ OptionsContainerWidget::OptionsContainerWidget(GuiObject *boss, const Common::St
|
|||
_scrollContainer(nullptr) {
|
||||
|
||||
if (scrollable) {
|
||||
_scrollContainer = new ScrollContainerWidget(this, 0, 0, 0, 0, kReflowCmd);
|
||||
_scrollContainer = new ScrollContainerWidget(this, name, _dialogLayout, kReflowCmd);
|
||||
_scrollContainer->setTarget(this);
|
||||
_scrollContainer->setBackgroundType(GUI::ThemeEngine::kWidgetBackgroundNo);
|
||||
}
|
||||
|
@ -958,7 +958,9 @@ void OptionsContainerWidget::reflowLayout() {
|
|||
defineLayout(*g_gui.xmlEval(), _dialogLayout, _name);
|
||||
}
|
||||
|
||||
g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);
|
||||
if (!_scrollContainer) {
|
||||
g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);
|
||||
}
|
||||
}
|
||||
|
||||
if (_scrollContainer) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue