Fix text highlighting again

master
Eduardo Bart 11 years ago
parent dabc7548fe
commit ca4caf7991

@ -6,7 +6,7 @@ Button < UIButton
image-source: /images/ui/button_rounded
image-color: white
image-clip: 0 0 20 20
image-border: 2
image-border: 3
padding: 5 10 5 10
$hover !disabled:
@ -24,7 +24,7 @@ TabButton < UIButton
image-source: /images/ui/tabbutton_rounded
image-color: white
image-clip: 0 0 20 20
image-border: 1
image-border: 3
icon-color: white
color: #aaaaaa

@ -401,7 +401,7 @@ function addTabText(text, speaktype, tab, creatureName)
label:setText(text)
-- Calculate the positions of the highlighted text and fill with string.char(127) [Width: 1]
local drawText = label:getText()
local drawText = label:getDrawText()
local tmpText = ""
for i = 1, #highlightData / 3 do
local dataBlock = { _start = highlightData[(i-1)*3+1], _end = highlightData[(i-1)*3+2], words = highlightData[(i-1)*3+3] }

@ -123,6 +123,7 @@ void UITextEdit::update(bool focusCursor)
return;
std::string text = getDisplayedText();
m_drawText = text;
int textLength = text.length();
// prevent glitches

Loading…
Cancel
Save