mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
Add more visual feedback for button states (#8916)
- Add style properties for overriding the the hovered/pressed state - By default, hovered buttons are a lighter version of the base color - By default, pressed buttons are a darker version of the base color - Add hovered bg image support for image buttons (style property)
This commit is contained in:
parent
894008ce6f
commit
69a2099c04
10 changed files with 151 additions and 39 deletions
|
@ -29,9 +29,12 @@ public:
|
|||
{
|
||||
TEXTCOLOR,
|
||||
BGCOLOR,
|
||||
BGCOLOR_HOVERED,
|
||||
BGCOLOR_PRESSED,
|
||||
NOCLIP,
|
||||
BORDER,
|
||||
BGIMG,
|
||||
BGIMG_HOVERED,
|
||||
BGIMG_PRESSED,
|
||||
ALPHA,
|
||||
NUM_PROPERTIES,
|
||||
|
@ -49,12 +52,18 @@ public:
|
|||
return TEXTCOLOR;
|
||||
} else if (name == "bgcolor") {
|
||||
return BGCOLOR;
|
||||
} else if (name == "bgcolor_hovered") {
|
||||
return BGCOLOR_HOVERED;
|
||||
} else if (name == "bgcolor_pressed") {
|
||||
return BGCOLOR_PRESSED;
|
||||
} else if (name == "noclip") {
|
||||
return NOCLIP;
|
||||
} else if (name == "border") {
|
||||
return BORDER;
|
||||
} else if (name == "bgimg") {
|
||||
return BGIMG;
|
||||
} else if (name == "bgimg_hovered") {
|
||||
return BGIMG_HOVERED;
|
||||
} else if (name == "bgimg_pressed") {
|
||||
return BGIMG_PRESSED;
|
||||
} else if (name == "alpha") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue