You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Added hover_pressed style to CheckBox and CheckButton
Added hover_pressed style to CheckBox and CheckButton. If no style is defined for this property it will default to the pressed property.
This commit is contained in:
@@ -360,7 +360,9 @@ BaseButton::DrawMode BaseButton::get_draw_mode() const {
|
||||
return DRAW_DISABLED;
|
||||
};
|
||||
|
||||
if (status.press_attempt == false && status.hovering && !status.pressed) {
|
||||
if (status.press_attempt == false && status.hovering) {
|
||||
if (status.pressed)
|
||||
return DRAW_HOVER_PRESSED;
|
||||
|
||||
return DRAW_HOVER;
|
||||
} else {
|
||||
@@ -536,6 +538,7 @@ void BaseButton::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(DRAW_PRESSED);
|
||||
BIND_ENUM_CONSTANT(DRAW_HOVER);
|
||||
BIND_ENUM_CONSTANT(DRAW_DISABLED);
|
||||
BIND_ENUM_CONSTANT(DRAW_HOVER_PRESSED);
|
||||
|
||||
BIND_ENUM_CONSTANT(ACTION_MODE_BUTTON_PRESS);
|
||||
BIND_ENUM_CONSTANT(ACTION_MODE_BUTTON_RELEASE);
|
||||
|
||||
Reference in New Issue
Block a user