Fix text highlighting again
This commit is contained in:
parent
dabc7548fe
commit
ca4caf7991
|
@ -6,7 +6,7 @@ Button < UIButton
|
||||||
image-source: /images/ui/button_rounded
|
image-source: /images/ui/button_rounded
|
||||||
image-color: white
|
image-color: white
|
||||||
image-clip: 0 0 20 20
|
image-clip: 0 0 20 20
|
||||||
image-border: 2
|
image-border: 3
|
||||||
padding: 5 10 5 10
|
padding: 5 10 5 10
|
||||||
|
|
||||||
$hover !disabled:
|
$hover !disabled:
|
||||||
|
@ -24,7 +24,7 @@ TabButton < UIButton
|
||||||
image-source: /images/ui/tabbutton_rounded
|
image-source: /images/ui/tabbutton_rounded
|
||||||
image-color: white
|
image-color: white
|
||||||
image-clip: 0 0 20 20
|
image-clip: 0 0 20 20
|
||||||
image-border: 1
|
image-border: 3
|
||||||
icon-color: white
|
icon-color: white
|
||||||
color: #aaaaaa
|
color: #aaaaaa
|
||||||
|
|
||||||
|
|
|
@ -401,7 +401,7 @@ function addTabText(text, speaktype, tab, creatureName)
|
||||||
label:setText(text)
|
label:setText(text)
|
||||||
|
|
||||||
-- Calculate the positions of the highlighted text and fill with string.char(127) [Width: 1]
|
-- 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 = ""
|
local tmpText = ""
|
||||||
for i = 1, #highlightData / 3 do
|
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] }
|
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;
|
return;
|
||||||
|
|
||||||
std::string text = getDisplayedText();
|
std::string text = getDisplayedText();
|
||||||
|
m_drawText = text;
|
||||||
int textLength = text.length();
|
int textLength = text.length();
|
||||||
|
|
||||||
// prevent glitches
|
// prevent glitches
|
||||||
|
|
Loading…
Reference in New Issue