-
-
Notifications
You must be signed in to change notification settings - Fork 385
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
Modified Button Layout to be similar to OG #9385
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/1)
d0c068e
to
9c8b94b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @felix642, I left two code style related comments.
Could you please take a look when you have time.
@felix642. Thanks for improving the UI. I'm wondering, have you checked these changes with other languages, especially Spanish and German? |
No, I did not realize the size of the buttons would change depending on the selected language. I just had a quick look and everything looks good IMO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This pull request will not be merged till 1.1.5 release as it touches many in-game dialogs which we need to test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @felix642 , I left several comments here. Could you please take a look at them?
case Dialog::YES | Dialog::NO: | ||
offset.x = area.x; | ||
case Dialog::YES | Dialog::NO: { | ||
const int32_t horizontalFreeSpace = area.width - AGG::GetICN( buttonYesIcnID, 0 ).width() - AGG::GetICN( buttonNoIcnID, 0 ).width(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please cache AGG::GetICN( buttonYesIcnID, 0 )
and AGG::GetICN( buttonNoIcnID, 0 )
calls as we have the same calls in the code below.
case Dialog::YES | Dialog::NO: | ||
offset.x = area.x; | ||
case Dialog::YES | Dialog::NO: { | ||
const int32_t horizontalFreeSpace = area.width - AGG::GetICN( buttonYesIcnID, 0 ).width() - AGG::GetICN( buttonNoIcnID, 0 ).width(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add an assertion that horizontalFreeSpace must be always be more than 0?
const int32_t horizontalFreeSpace = area.width - AGG::GetICN( buttonOkayIcnID, 0 ).width() - AGG::GetICN( buttonCancelIcnID, 0 ).width(); | ||
const int32_t padding = horizontalFreeSpace / 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comments as for line 429.
Relates to: #1355
The button layout has been changed for the button groups (YES/NO, OKAY/CANCEL)
The buttons are now closer to the center and some padding was added on each side.
Some layouts were not changed since they are already similar to the original game:
This one I'm not sure if we should update the position or not. It is already similar to the recruitment dialog so we might want to keep it as it.