Thanks for the last post, finally saw my mistake.
I've updated the code above, now it works as desired.
I've updated the code above, now it works as desired.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote
The widget appears, a prompt is indicating and I can select the preset text.
But on keypress no character shows up and string text leaves unchanged.
class TabWindow : MainTabWindow
{
public string str = "";
public override void DoWindowContents(Rect rect)
{
base.DoWindowContents(rect);
GUI.BeginGroup(rect);
try {
string text = GUI.TextField(rect, this.str);
//validation etc.
this.str = text; // stores the value
}
catch (Exception e) {
Log.Message(e.StackTrace);
} finally {
GUI.EndGroup();
}
}
}
string text = Verse.Widgets.TextField(rect, "Enter text here");