mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #103670 from dugramen/inspector-section-hover
Redraw inspector section when cursor enters and exits header to update hover state
This commit is contained in:
commit
cf68b5f6eb
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()) {
|
} else if (mb.is_valid() && !mb->is_pressed()) {
|
||||||
queue_redraw();
|
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 {
|
String EditorInspectorSection::get_section() const {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue