Merge pull request #117011 from bruvzg/rtl_tab_off
[RTL] Fix character click offsets after the table.
This commit is contained in:
commit
c646b57c27
2 changed files with 4 additions and 1 deletions
|
|
@ -229,7 +229,8 @@ RichTextLabel::Item *RichTextLabel::_get_item_at_pos(RichTextLabel::Item *p_item
|
|||
}
|
||||
} break;
|
||||
case ITEM_TABLE: {
|
||||
offset += 1;
|
||||
ItemTable *table = static_cast<ItemTable *>(it);
|
||||
offset += table->char_count;
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -817,6 +818,7 @@ float RichTextLabel::_shape_line(ItemFrame *p_frame, int p_line, const Ref<Font>
|
|||
}
|
||||
idx++;
|
||||
}
|
||||
table->char_count = t_char_count;
|
||||
|
||||
// Compute width for each column.
|
||||
const int available_width = p_width - l.offset.x - theme_cache.table_h_separation * col_count;
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ private:
|
|||
int align_to_row = -1;
|
||||
int total_width = 0;
|
||||
int total_height = 0;
|
||||
int char_count = 0;
|
||||
InlineAlignment inline_align = INLINE_ALIGNMENT_TOP;
|
||||
ItemTable() { type = ITEM_TABLE; }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue