Make tab's close button responsive to touch taps
This commit is contained in:
parent
3943de2e6c
commit
de20011cbe
1 changed files with 2 additions and 0 deletions
|
@ -193,12 +193,14 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) {
|
||||||
for (int i = offset; i <= max_drawn_tab; i++) {
|
for (int i = offset; i <= max_drawn_tab; i++) {
|
||||||
if (tabs[i].rb_rect.has_point(pos)) {
|
if (tabs[i].rb_rect.has_point(pos)) {
|
||||||
rb_pressing = true;
|
rb_pressing = true;
|
||||||
|
_update_hover();
|
||||||
update();
|
update();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tabs[i].cb_rect.has_point(pos) && (cb_displaypolicy == CLOSE_BUTTON_SHOW_ALWAYS || (cb_displaypolicy == CLOSE_BUTTON_SHOW_ACTIVE_ONLY && i == current))) {
|
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;
|
cb_pressing = true;
|
||||||
|
_update_hover();
|
||||||
update();
|
update();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue