mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix caret color
This commit is contained in:
parent
0c003189e7
commit
936564befc
3 changed files with 7 additions and 0 deletions
|
|
@ -51,6 +51,7 @@ class EnterNameDlg extends GuiImage {
|
|||
textInput.horizSizing = Width;
|
||||
textInput.vertSizing = Height;
|
||||
textInput.text.textColor = 0xEBEBEB;
|
||||
textInput.setCaretColor(0xEBEBEB);
|
||||
textInput.text.selectionColor.setColor(0x8DFF8D);
|
||||
textInput.text.selectionTile = h2d.Tile.fromColor(0x88BCEE, 0, hxd.Math.ceil(textInput.text.font.lineHeight));
|
||||
textFrame.addChild(textInput);
|
||||
|
|
|
|||
|
|
@ -77,4 +77,9 @@ class GuiTextInput extends GuiControl {
|
|||
text.focus();
|
||||
#end
|
||||
}
|
||||
|
||||
public function setCaretColor(col:Int) {
|
||||
text.cursorTile = h2d.Tile.fromColor(col, Std.int(1 / hxd.Window.getInstance().windowToPixelRatio), text.font.size);
|
||||
text.cursorTile.dy = 2 / hxd.Window.getInstance().windowToPixelRatio;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ class ReplayNameDlg extends GuiImage {
|
|||
textInput.horizSizing = Width;
|
||||
textInput.vertSizing = Height;
|
||||
textInput.text.textColor = 0xEBEBEB;
|
||||
textInput.setCaretColor(0xEBEBEB);
|
||||
textInput.text.selectionColor.setColor(0x8DFF8D);
|
||||
textInput.text.selectionTile = h2d.Tile.fromColor(0x88BCEE, 0, hxd.Math.ceil(textInput.text.font.lineHeight));
|
||||
textFrame.addChild(textInput);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue