Total-RP / Total-RP-3

The best roleplaying add-on for World of Warcraft.
http://curse.totalrp.com
Apache License 2.0
35 stars 19 forks source link

Refactor menus/dropdowns and duplicate button #988

Closed Raenore closed 1 month ago

Raenore commented 1 month ago

This is a chonky one and the diff might be quite something. Check the changes per commit if that's easier for you.

Refactored dropdowns + More options dropdowns

This is quite big in scope, but it has the following uses:

This fixes a few things:

Other things:

[!NOTE] I am not entirely happy about onGlanceSlotClick dropdown rewrite due to how getGlanceMenuEntries is set up.

It is obviously still written for how the old dropdown table would receive its info. However currently all the displayDropDown() has been removed with all the output being the same or improved where possible.

Refactoring further underlying code should happen at some point, so that snippets like that don't have to exist.

[!IMPORTANT] Three new localization keys:

  • CM_OPTIONS
  • CM_OPTIONS_ADDITIONAL
  • CM_DUPLICATE

Add additional info + Personality traits duplicate button

https://github.com/Total-RP/Total-RP-3/assets/172234435/c8e819d4-01f4-4a7c-9634-23bb8cc82a4f

This ports over the "Remove" button that both of these options had into a dropdown button.

This dropdown has two options:

Duplicate will make a copy of the current additional info or personality trait line (including custom colors if set), adding it at the bottom of the list. Delete has been moved lower, and made red, as it is a destructive option. This will hopefully make it much harder to click by accident.

Finally the dropdown button for additional information has been moved a bit to the right so it is on the same horizontal location as the personality trait dropdown.

Raenore commented 1 month ago

Merged in both your suggestions, thanks for that.

Going to wait for Meow's bigger review, as having the dropdowns in will help a bit with the tooltip purge (as this PR changes all the action buttons).