mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
Fix: Settings GUI sprite size.
This commit is contained in:
parent
123983743f
commit
61da064b82
@ -1933,7 +1933,6 @@ struct GameSettingsWindow : Window {
|
|||||||
this->filter.type_hides = false;
|
this->filter.type_hides = false;
|
||||||
this->settings_ptr = &GetGameSettings();
|
this->settings_ptr = &GetGameSettings();
|
||||||
|
|
||||||
_circle_size = maxdim(GetSpriteSize(SPR_CIRCLE_FOLDED), GetSpriteSize(SPR_CIRCLE_UNFOLDED));
|
|
||||||
GetSettingsTree().FoldAll(); // Close all sub-pages
|
GetSettingsTree().FoldAll(); // Close all sub-pages
|
||||||
|
|
||||||
this->valuewindow_entry = nullptr; // No setting entry for which a entry window is opened
|
this->valuewindow_entry = nullptr; // No setting entry for which a entry window is opened
|
||||||
@ -1954,6 +1953,11 @@ struct GameSettingsWindow : Window {
|
|||||||
this->InvalidateData();
|
this->InvalidateData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnInit() override
|
||||||
|
{
|
||||||
|
_circle_size = maxdim(GetSpriteSize(SPR_CIRCLE_FOLDED), GetSpriteSize(SPR_CIRCLE_UNFOLDED));
|
||||||
|
}
|
||||||
|
|
||||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||||
{
|
{
|
||||||
switch (widget) {
|
switch (widget) {
|
||||||
|
Loading…
Reference in New Issue
Block a user