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

Name All UI Elements #5963

Merged
merged 16 commits into from
Jul 15, 2023
Merged

Name All UI Elements #5963

merged 16 commits into from
Jul 15, 2023

Conversation

Noordfrees
Copy link
Member

Type of change
Refactoring

Issue(s) closed
This is part of the ongoing effort to make the Lua UI API more powerful. All panels are now named. The diff here is huge since all previously anonymous panels have to be given a name now. The only "actual" changes are very small and located in in panel.*.

Possible regressions
Bugs with creation of UI elements

Additional context
Note that names don't have to be unique; it is helpful if they are, but there are other ways for scripts to access panels if a panel's name is not known or not unique.
This branch will have merge conflicts with #5933 (and probably every other UI-related PR), but it doesn't really matter which one gets merged first.

@Noordfrees Noordfrees added cleanup & refactoring Improving our code quality ui User interface labels Jun 30, 2023
@Noordfrees Noordfrees added this to the v1.2 milestone Jun 30, 2023
@Noordfrees Noordfrees self-assigned this Jun 30, 2023
Copy link
Member

@matthiakl matthiakl left a comment

Choose a reason for hiding this comment

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

Looks good, just a few typos.
Naming the UI elements also helps me tracing the layouting for #6016 👍

src/editor/ui_menus/main_menu_load_or_save_map.cc Outdated Show resolved Hide resolved
src/wui/info_panel.cc Outdated Show resolved Hide resolved
src/wui/plot_area.h Outdated Show resolved Hide resolved
src/ui_basic/panel.h Outdated Show resolved Hide resolved
@matthiakl matthiakl enabled auto-merge (squash) July 15, 2023 09:00
@matthiakl matthiakl merged commit d47e294 into widelands:master Jul 15, 2023
33 checks passed
@Noordfrees Noordfrees deleted the name-all-panels branch July 15, 2023 11:21
@Noordfrees
Copy link
Member Author

Thanks for the review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup & refactoring Improving our code quality ui User interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants