Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: [GS] Allow non-question type windows to have no buttons #8638

merged 1 commit into from Feb 14, 2021


Copy link

@ldpl ldpl commented Feb 2, 2021

Motivation / Problem

3 out of 4 gs "question" window types (info, warning and error) aren't really questions and likely don't need any buttons but are forced by gs api to have at least one.


Screenshot from 2021-02-02 18-29-00

GS for testing:


It still looks somewhat different from the regular error because of how paddings are calculated but I decided to address it in a separate pr later.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

Copy link

@LC-Zorg LC-Zorg commented Feb 4, 2021


As you can see in the pictures above, you have a message confirmation button everywhere. :)
This is a natural layout that the vast majority are used to. The lack of this button is unnatural and a bit disturbing.
I don't know what the purpose of this change would be?

Copy link

@TrueBrain TrueBrain commented Feb 4, 2021


Let's compare oranges with oranges, not with a coffee mug.

Copy link

@LC-Zorg LC-Zorg commented Feb 4, 2021

Small-caliber news, frequent ones don't actually require it.
Removing this confirmation from any or all of more important messages doesn't feel good.

One problem with closing the window is also that closing by RMB (the best change of the last 6 years for me) is not the default. This is a very big improvement not available to beginners. Also for this reason, removing the larger closing space of the window will not be good in my opinion.

Generally, it is not important to me, but I am writing it with people starting their adventure with the game in mind.

@ldpl ldpl force-pushed the gs-no-buttons-popup branch from 8283b47 to cfdb937 Compare Feb 5, 2021
Copy link

@LordAro LordAro left a comment

TBH, I kinda agree with Zorg here. But precedent has been set, so.. sure. Why shouldn't GSes be able to create dialogs of the same form as the game itself?

src/script/api/script_goal.cpp Outdated Show resolved Hide resolved
@ldpl ldpl force-pushed the gs-no-buttons-popup branch from cfdb937 to fac3c53 Compare Feb 13, 2021
Copy link

@LordAro LordAro left a comment

Assuming CI is happy

Copy link
Contributor Author

@ldpl ldpl commented Feb 13, 2021

One reason to not have buttons for some errors is that OpenTTD spams more than enough windows as it is, no need to take even more screen space for utterly pointless buttons.

@glx22 glx22 merged commit 91cc414 into OpenTTD:master Feb 14, 2021
8 checks passed
Copy link

@auge8472 auge8472 commented Feb 17, 2021

I hope, this will not getting a boomerang UI-wise because the close-window-cross-button is in comparision to the now removed OK-button a really small sized click target.

When an overlay has a ok-button, one as a player has three choices to close the overlay window, waiting until the window disappears, pushing the small close-window-cross-button or pushing the much bigger OK-button. Without the OK-button only waiting or pushing the small sized close-window-cross-button left.

We will see.

Copy link

@LordAro LordAro commented Feb 17, 2021

It's not been removed, merely the option to have one has been removed. It's on the GS author whether they use it or not, as appropriate.

I agree that the close button is small, but there are 'workarounds' - increased UI size or there's a setting to close windows on right-click too

Copy link

@TrueBrain TrueBrain commented Feb 17, 2021

Also please remember that we have many windows without buttons already. This just brings GSes on-par with what OpenTTD does itself, being more consistent in UI, basically.

Copy link

@glx22 glx22 commented Feb 17, 2021

A right click anywhere on the window should also close it.

@ldpl ldpl deleted the gs-no-buttons-popup branch Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

6 participants