Hide Control focus when given via mouse input

This commit is contained in:
Michael Alexsander
2025-09-03 20:39:18 -03:00
parent 2753d333f6
commit aeb3a45c97
53 changed files with 229 additions and 105 deletions

View File

@@ -56,7 +56,7 @@ void Slider::gui_input(const Ref<InputEvent> &p_event) {
if (mb->get_button_index() == MouseButton::LEFT) {
if (mb->is_pressed()) {
Ref<Texture2D> grabber;
if (mouse_inside || has_focus()) {
if (mouse_inside || has_focus(true)) {
grabber = theme_cache.grabber_hl_icon;
} else {
grabber = theme_cache.grabber_icon;
@@ -275,7 +275,7 @@ void Slider::_notification(int p_what) {
Ref<StyleBox> style = theme_cache.slider_style;
Ref<Texture2D> tick = theme_cache.tick_icon;
bool highlighted = editable && (mouse_inside || has_focus());
bool highlighted = editable && (mouse_inside || has_focus(true));
Ref<Texture2D> grabber;
if (editable) {
if (highlighted) {