Merge pull request #1396 from MathemanFlo/ImproveTextTool

Improve text tool
This commit is contained in:
Lubos Lenco
2022-05-09 10:15:39 +02:00
committed by GitHub
+8 -1
View File
@@ -313,7 +313,14 @@ class UIHeader {
if (Context.tool == ToolText) {
var h = Id.handle();
h.text = Context.textToolText;
Context.textToolText = ui.textInput(h, "");
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();