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

Change: Add some style to GameScript question windows depending on the type #8422

Merged
merged 1 commit into from Dec 28, 2020

Conversation

ldpl
Copy link
Contributor

@ldpl ldpl commented Dec 23, 2020

Motivation / Problem

Goal questions have a type parameter but it does nothing but changing the window title. It's impossible for the gamescript to show error that matches the style of openttd own errors.

Description

PR changes the visual style of GT_ERROR and GT_WARNING messages to make them visually more catchy and, in error case, match the appearance of regular game errors.
Screenshot from 2020-12-23 21-22-34

GS for testing:
testquestionstyle.zip

Limitations

  • Couldn't find if the game uses something similar to a warning style already.
  • GT_QUESTION and GT_INFO look the same. Couldn't think of a good analogy in default messages.
  • Had to make 4 widget layouts since there doesn't seem to be a way to change colors after the declaration and even if there was it won't make it much better as that will make it so window style is basically defined in two places instead of one.
  • Had to add colors to language strings, not sure if that's a problem

@TrueBrain
Copy link
Member

It really annoys me that the title "center" is not the text "center". Completely unrelated to your PR, I am sure, but boy, that is annoying.

@TrueBrain TrueBrain added candidate: needs considering This Pull Request needs more opinions size: small This Pull Request is small, and should be relative easy to process labels Dec 24, 2020
@ldpl
Copy link
Contributor Author

ldpl commented Dec 24, 2020

@TrueBrain yeah, centering is broken on all windows, it's just easier to notice on these. Very annoying but I've no idea how to fix it prooperly.

@TrueBrain TrueBrain added candidate: yes This Pull Request is a candidate for being merged and removed candidate: needs considering This Pull Request needs more opinions labels Dec 24, 2020
src/goal_gui.cpp Show resolved Hide resolved
@LordAro LordAro merged commit 94057e9 into OpenTTD:master Dec 28, 2020
@ldpl ldpl deleted the goal-question-style branch September 19, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate: yes This Pull Request is a candidate for being merged size: small This Pull Request is small, and should be relative easy to process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants