Make tab's close button responsive to touch taps

This commit is contained in:
Fredia Huya-Kouadio 2023-04-05 10:00:23 -07:00 committed by Fredia Huya-Kouadio
parent 24cb43a874
commit 7325ffdd46
1 changed files with 2 additions and 0 deletions

View File

@ -255,12 +255,14 @@ void TabBar::gui_input(const Ref<InputEvent> &p_event) {
if (tabs[i].rb_rect.has_point(pos)) {
rb_pressing = true;
_update_hover();
queue_redraw();
return;
}
if (tabs[i].cb_rect.has_point(pos) && (cb_displaypolicy == CLOSE_BUTTON_SHOW_ALWAYS || (cb_displaypolicy == CLOSE_BUTTON_SHOW_ACTIVE_ONLY && i == current))) {
cb_pressing = true;
_update_hover();
queue_redraw();
return;
}