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

Port DDA title screen update with BN-specific tweaks #2519

Merged
merged 46 commits into from
Apr 7, 2023

Conversation

olanti-p
Copy link
Member

@olanti-p olanti-p commented Mar 31, 2023

Summary

SUMMARY: Interface "Ported DDA title screen update with BN-specific tweaks"

Purpose of change

Supporting change for #2451
Title screen controls are a mess, you sometimes scroll with up/down arrows, sometimes with left/right; sometimes you select with up and sometimes with right.
It would be nice to have the controls somewhat consistent.

Describe the solution

Main source PR: CleverRaven/Cataclysm-DDA#57764
There were uncountable conflicts, so I had to grab along commits from various PRs that happened to contribute code before/after the change.
Mouse support had to be left out.

Additional changes:

  1. Get rid of "Special" tab, merge tutorial and defense mode into "New Game" tab
  2. Mute colors a bit, bright white seems too aggressive
  3. Increase amount of space reserved for tip of the day by 1 line because on small window sizes they always end up trimmed.
  4. Increase amount of space reserved for hints in "New Game" tab because they always end up trimmed, even with large window size.
  5. Fix sound when moving in list menus
  6. Change hotkey color in list menus to match the theme
  7. Add "<= Return" entries in list menus so people can return with arrow+enter combination or by pressing 'q' (inspired by Main menu overhaul (Part 1.5): mouse control fixes & improvements CleverRaven/Cataclysm-DDA#58142 )

TODO

  • Get rid of the "Special" category and merge it into "New Game"
  • Tweak the colors?
  • Hunt down for bugs

Describe alternatives you've considered

Rewriting the title screen from scratch.

Testing

image
image

@github-actions github-actions bot added data PRs related to datas. Won't crash game (probably) src PR changes related to source code. tests PR changes related to tests labels Mar 31, 2023
dseguin and others added 27 commits April 5, 2023 00:00
(cherry picked from commit 348d239ec08e1301b2f63477ec1351ed49b6e33b)
(cherry picked from commit 60b363d30853f94cde54e7f42a64791333b035ff)
(cherry picked from commit fdbe06d53a48e7a3191f7ffb23e5b49b6de7f146)
(cherry picked from commit aa08e09b1bd052a450d3f3986beae94f6a6259f1)
(cherry picked from commit a2510c6d12be5e4efebec3219239ae36ae797a83)
(cherry picked from commit 09ab0494dfed16fa77292b2cf5c60b46737c6b2e)
(cherry picked from commit f95326e8ad4dddc653f3e459d270f0947a61936a)
(cherry picked from commit c380afc798df064ab76645a0a2f66358d425e3bc)
* Fix bugprone-unused-return-value

Biggest change here was to mapbuffer, which now stores submaps via
unique_ptr rather than raw pointers, simplifying the destructor.

Unfortunately, we have to retain the strange pointer-based API for
mapbuffer, because the submap ownership logic in map is so convoluted.
That can be fixed another day.

Also, renamed mapbuffer::reset() to clear(), for consistency.

In trait_group, removed a couple of calls to reset() that this warning
was highlighting.  They didn't do anything anyway.

* Enable clang-tidy bugprone-unused-return-value

(cherry picked from commit 1c4f47adc95c9a7e87aec501113a310ffab18cc5)
(cherry picked from commit a8f17b497e3fe255daadcd04e331a2d1dbfc21b6)
(cherry picked from commit 8cc6378fc55bca9f7af06c623c70786de43df1ee)
(cherry picked from commit e067da4d920ab00662adc5319b8c2b4e37cb8d4a)
Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com>
Co-authored-by: Kevin Granade <kevin.granade@gmail.com>
(cherry picked from commit 159413daa279694aeaf7885edde67f496d61d473)
(cherry picked from commit e0ad76e03960df71797752d1120e23f476fef727)
(cherry picked from commit f0c2c3b123ae44f3b2a6d5d29fc18350be0c4dfd)
(cherry picked from commit 722b94b7207c114cc6a34cd140e0619d01f180fd)
(cherry picked from commit 369fc6fcf207ba30609eadd02ca4830950596c14)
Co-authored-by: David Seguin <davidseguin@live.ca>
(cherry picked from commit 293c808cb2c8d0891ca26e9580e17eabcab62e51)
(cherry picked from commit 5ac426dfe46f768910bf5354566393147e0a719a)
(cherry picked from commit b7142b23189354fa81a94e83920a0398f83af76b)
Co-authored-by: EI IKao <you@example.com>
(cherry picked from commit d291072370c32ea9027f4c40eaefce49dceec138)
@olanti-p olanti-p changed the title [WIP] Port new title screen [WIP] [DDA Port] Update title screen Apr 4, 2023
@olanti-p olanti-p changed the title [WIP] [DDA Port] Update title screen Port DDA title screen update with BN-specific tweaks Apr 6, 2023
@scarf005 scarf005 self-requested a review April 6, 2023 13:00
@olanti-p
Copy link
Member Author

olanti-p commented Apr 6, 2023

Ok, I think that's it.
Had to fix a bunch of related issues, e.g. starting_vehicle error when starting new character from template, and a few bugs in the original implementation (I think most of those were fixed in DDA later, in CleverRaven/Cataclysm-DDA#58142 or the dependent PRs, but it's not easily portable).

Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main_menu.webm
output.mp4

submenus work fine, could create a character from preset menu and play.

@olanti-p olanti-p mentioned this pull request Apr 6, 2023
5 tasks
@scarf005 scarf005 merged commit 09f67f8 into cataclysmbnteam:upload Apr 7, 2023
scarf005 added a commit to scarf005/Cataclysm-BN that referenced this pull request Apr 8, 2023
scarf005 added a commit to scarf005/Cataclysm-BN that referenced this pull request Apr 8, 2023
scarf005 added a commit that referenced this pull request Apr 8, 2023
@olanti-p olanti-p deleted the port-new-title branch August 17, 2023 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data PRs related to datas. Won't crash game (probably) src PR changes related to source code. tests PR changes related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet