Skip to content

Commit

Permalink
Fixed Textbox null text
Browse files Browse the repository at this point in the history
  • Loading branch information
Apostolique committed Feb 6, 2024
1 parent 2dc4645 commit 9a5117b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Textbox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public Textbox(int id, string text, int fontSize, Color c) : base(id) {
public string Text {
get => _text;
set {
value ??= "";
if (_text != value) {
_text = value;
_isDirty = true;
Expand Down Expand Up @@ -173,7 +174,7 @@ protected int MouseToCursor(float x, string text) {
return currentPosition;
}

protected string _text = null!;
protected string _text;
protected Vector2 _cachedSize;

protected int _fontSize;
Expand Down

0 comments on commit 9a5117b

Please sign in to comment.