From 5b0bce7a6371aa8a5d0bed17fb75639ebbb2cbb0 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Mon, 10 Jul 2023 16:45:03 -0600 Subject: [PATCH] fix xText not highlighting --- src/kiss_flixel/SimpleWindow.kiss | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/kiss_flixel/SimpleWindow.kiss b/src/kiss_flixel/SimpleWindow.kiss index 52e5d34..c1ffc45 100644 --- a/src/kiss_flixel/SimpleWindow.kiss +++ b/src/kiss_flixel/SimpleWindow.kiss @@ -514,11 +514,15 @@ (controls.forEach ->text (whenLet [onClick (dictGet _actions text)] (let [color (dictGet _colors text)] - (when (and !otherIsSelected (.containsPoint (text.getScreenBounds controlCamera) mousePos)) - (when FlxG.mouse.justPressed - (onClick text)) - (set otherIsSelected true) - (set selectedIndex (columnControls.indexOf text)))))) + (if (and !otherIsSelected (.containsPoint (text.getScreenBounds controlCamera) mousePos)) + { + (when FlxG.mouse.justPressed + (onClick text)) + (set otherIsSelected true) + (set text.color (getHighlighted (dictGet _colors text))) + (set selectedIndex (columnControls.indexOf text)) + } + (set text.color (dictGet _colors text)))))) // Click on text boxes to focus them (inputTexts.forEach ->text (when FlxG.mouse.justPressed