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:
Port over all dropdowns using displayDropDown() to the new TRP3_MenuUtil.
Create some consistency for the "More options" dropdowns.
To mimic Blizzard, we use onMouseDown instead of onClick to access these dropdowns.
Toolbar and TargetFrame buttons can now have an onMouseDown property.
This fixes a few things:
Additive/Creation lines in dropdowns are colored in green.
Destructive/Remove lines in dropdowns are colored in red.
Right-click on RP status toolbar (IC/OOC) now has the profile list in alphabetical order.
Other things:
The icon copy dropdown buttons have been simplified a bit (thanks Meorawr).
[!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
This ports over the "Remove" button that both of these options had into a dropdown button.
This dropdown has two options:
Duplicate
Delete
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.
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:
displayDropDown()
to the newTRP3_MenuUtil
.onMouseDown
property.This fixes a few things:
Other things:
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.