From 24a455008cc1734e1e0f40a6f236aa79d1041b63 Mon Sep 17 00:00:00 2001 From: MathemanFlo Date: Wed, 4 May 2022 11:19:06 +0200 Subject: [PATCH 1/2] Live update tex tool text --- Sources/arm/ui/UIHeader.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/arm/ui/UIHeader.hx b/Sources/arm/ui/UIHeader.hx index 24829423..cc62ba67 100644 --- a/Sources/arm/ui/UIHeader.hx +++ b/Sources/arm/ui/UIHeader.hx @@ -313,7 +313,7 @@ class UIHeader { if (Context.tool == ToolText) { var h = Id.handle(); h.text = Context.textToolText; - Context.textToolText = ui.textInput(h, ""); + Context.textToolText = ui.textInput(h, "", Left, true, true); if (h.changed) { ui.g.end(); RenderUtil.makeTextPreview(); From d229c952caa828170e81689dc5ae775555a1a726 Mon Sep 17 00:00:00 2001 From: MathemanFlo Date: Wed, 4 May 2022 11:22:06 +0200 Subject: [PATCH 2/2] Widen text tool text input if active --- Sources/arm/ui/UIHeader.hx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/arm/ui/UIHeader.hx b/Sources/arm/ui/UIHeader.hx index cc62ba67..4bdc5b40 100644 --- a/Sources/arm/ui/UIHeader.hx +++ b/Sources/arm/ui/UIHeader.hx @@ -313,7 +313,14 @@ class UIHeader { if (Context.tool == ToolText) { var h = Id.handle(); h.text = Context.textToolText; + var w = ui._w; + if (ui.textSelectedHandle == h || ui.submitTextHandle == h) { + ui._w *= 3; + } + Context.textToolText = ui.textInput(h, "", Left, true, true); + ui._w = w; + if (h.changed) { ui.g.end(); RenderUtil.makeTextPreview();