Redraw inspector section when cursor enters and exits header to update hover state
This commit is contained in:
parent
134da37497
commit
5fc93617b3
1 changed files with 9 additions and 0 deletions
|
|
@ -1888,6 +1888,15 @@ void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) {
|
|||
} else if (mb.is_valid() && !mb->is_pressed()) {
|
||||
queue_redraw();
|
||||
}
|
||||
|
||||
Ref<InputEventMouseMotion> mm = p_event;
|
||||
if (mm.is_valid()) {
|
||||
int header_height = _get_header_height();
|
||||
Vector2 previous = mm->get_position() - mm->get_relative();
|
||||
if ((mm->get_position().y >= header_height) != (previous.y >= header_height)) {
|
||||
queue_redraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String EditorInspectorSection::get_section() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue