1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
Brian Fiete 2025-02-22 09:56:44 -08:00
commit 7182e167a8
2 changed files with 6 additions and 3 deletions

View file

@ -63,7 +63,7 @@ namespace System
mCmdInfo.Append("\n");
}
public void AddEdit(StringView dataName, StringView label, StringView defaultValue)
public void AddEdit(StringView dataName, StringView label, StringView defaultValue, bool focus = false)
{
mCmdInfo.AppendF($"addEdit\t");
dataName.QuoteString(mCmdInfo);
@ -71,7 +71,7 @@ namespace System
label.QuoteString(mCmdInfo);
mCmdInfo.Append("\t");
defaultValue.QuoteString(mCmdInfo);
mCmdInfo.Append("\n");
mCmdInfo.AppendF($"\t{focus}\n");
}
public void AddFilePath(StringView dataName, StringView label, StringView defaultValue)
@ -216,7 +216,7 @@ namespace System
public override void InitUI()
{
AddEdit("name", "Class Name", "");
AddEdit("name", "Class Name", "", true);
}
public override void Generate(String outFileName, String outText, ref Flags generateFlags)

View file

@ -581,12 +581,15 @@ namespace IDE.ui
uiEntry.mName = partItr.GetNext().Value.UnQuoteString(.. new .());
uiEntry.mLabel = partItr.GetNext().Value.UnQuoteString(.. new .());
var defaultValue = partItr.GetNext().Value.UnQuoteString(.. scope .());
var focus = partItr.GetNext().Value;
DarkEditWidget editWidget = new DarkEditWidget();
uiEntry.mWidget = editWidget;
editWidget.SetText(defaultValue);
editWidget.mEditWidgetContent.SelectAll();
editWidget.mOnSubmit.Add(new => EditSubmitHandler);
AddWidget(editWidget);
if (focus == "True")
editWidget.SetFocus();
mUIEntries.Add(uiEntry);
mTabWidgets.Add(editWidget);
case "addFilePath", "addFolderPath":