Added TextBoxWidget.has_split_inside_word flag

Used by coverbrowser's Text covers to choose the best font size.
This commit is contained in:
poire-z
2017-08-18 16:40:48 +02:00
committed by Frans de Jonge
parent a8a7ebe1d4
commit b4e7dc947c
2 changed files with 3 additions and 4 deletions

View File

@@ -138,6 +138,9 @@ function TextBoxWidget:_splitCharWidthList()
-- either a very long english word ocuppying more than one line,
-- or the excessive char is itself splittable:
-- we let that excessive char for next line
if adjusted_idx == offset then -- let the fact a long word was splitted be known
self.has_split_inside_word = true
end
cur_line_text = table.concat(self.charlist, "", offset, idx - 1)
cur_line_width = cur_line_width - self.char_width_list[idx].width
elseif c == " " then