Skip to content

Commit

Permalink
disallow non-left aligned input text (heaps doesnt like it)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Aug 6, 2024
1 parent 00fa39f commit 9d7c4cf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions haxe/ui/backend/TextInputImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ class TextInputImpl extends TextDisplayImpl {
return textInput;
}

// we're actually going to override this function so that it always returns
// h2d.Text.Align.Left - this is because heaps text input doesnt seem to like
// center aligned text (or right aligned), for now will simply turn it off
private override function getAlign(align:String):h2d.Text.Align {
return h2d.Text.Align.Left;
}

public override function focus() {
Toolkit.callLater(function() {
textInput.focus();
Expand Down

0 comments on commit 9d7c4cf

Please sign in to comment.