From a548b15d69bcf2a5be4c83912d1c46be96d5c8d6 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Wed, 21 Dec 2022 20:52:26 +0530 Subject: [PATCH] text selection color fix --- src/gui/EnterNameDlg.hx | 3 +++ src/gui/GuiTextInput.hx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/EnterNameDlg.hx b/src/gui/EnterNameDlg.hx index 57e5143e..a38f9ac0 100644 --- a/src/gui/EnterNameDlg.hx +++ b/src/gui/EnterNameDlg.hx @@ -58,6 +58,9 @@ class EnterNameDlg extends GuiControl { this.addChild(dlg); var enterNameEdit = new GuiTextInput(domcasual32); + enterNameEdit.text.textColor = 0; + enterNameEdit.text.selectionColor.setColor(0xFFFFFFFF); + enterNameEdit.text.selectionTile = h2d.Tile.fromColor(0x808080, 0, hxd.Math.ceil(enterNameEdit.text.font.lineHeight)); enterNameEdit.position = new Vector(87, 136); enterNameEdit.extent = new Vector(255, 36); enterNameEdit.text.text = Settings.highscoreName; diff --git a/src/gui/GuiTextInput.hx b/src/gui/GuiTextInput.hx index 75b76146..c54b293c 100644 --- a/src/gui/GuiTextInput.hx +++ b/src/gui/GuiTextInput.hx @@ -18,7 +18,7 @@ class GuiTextInput extends GuiControl { public function new(font:h2d.Font) { super(); this.text = new TextInput(font); - this.text.textColor = 0; + // this.text.textColor = 0; } public override function render(scene2d:Scene) {