Fix text highlighting again

This commit is contained in:
Eduardo Bart 2013-01-22 18:29:18 -02:00
parent dabc7548fe
commit ca4caf7991
3 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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] }

View File

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