Separate GetTextSize and GetWrappedTextSize functions for clarity. Fix sizing comparisons for wrapping text. Fixed issue with menu destinations not properly being assigned on certain buttons.

This commit is contained in:
2023-12-21 10:26:18 -06:00
parent d29f7d47bd
commit a26d86d0b0
11 changed files with 99 additions and 40 deletions
+6 -6
View File
@@ -47,12 +47,12 @@ enum class ButtonAttr{
};
enum class ComponentAttr{
NONE= 0b00000,
LEFT_ALIGN= 0b00001, //Labels are centered by default.
SHADOW= 0b00010, //Adds shadows to the label text.
OUTLINE= 0b00100, //Adds an outline around the component.
BACKGROUND= 0b01000, //Renders the background of the menu theme for this component.
FIT_TO_LABEL= 0b10000, //Scales the text horizontally to fit the label if the text takes up more space rather than wrapping.
NONE= 0b000000,
LEFT_ALIGN= 0b000001, //Labels are centered by default.
SHADOW= 0b000010, //Adds shadows to the label text.
OUTLINE= 0b000100, //Adds an outline around the component.
BACKGROUND= 0b001000, //Renders the background of the menu theme for this component.
FIT_TO_LABEL= 0b010000, //Scales the text horizontally to fit the label if the text takes up more space rather than wrapping.
};
enum class SelectionType{