1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-19 00:20:25 +02:00

Improved cwd handling in comptime, generator file/folder edit

This commit is contained in:
Brian Fiete 2022-05-27 12:20:11 -07:00
parent 49716559e4
commit 087a129007
6 changed files with 130 additions and 32 deletions

View file

@ -548,6 +548,8 @@ namespace IDE.ui
if (mUIData != null)
{
Project project = gApp.mWorkspace.FindProject(mProjectName);
if (mOutputPanel != null)
{
mOutputPanel.RemoveSelf();
@ -587,6 +589,23 @@ namespace IDE.ui
AddWidget(editWidget);
mUIEntries.Add(uiEntry);
mTabWidgets.Add(editWidget);
case "addFilePath", "addFolderPath":
if (mSubmitting)
break;
UIEntry uiEntry = new UIEntry();
uiEntry.mName = partItr.GetNext().Value.UnQuoteString(.. new .());
uiEntry.mLabel = partItr.GetNext().Value.UnQuoteString(.. new .());
var defaultValue = partItr.GetNext().Value.UnQuoteString(.. scope .());
PathEditWidget editWidget = new PathEditWidget((kind == "addFilePath") ? .File : .Folder);
if (project != null)
editWidget.mDefaultFolderPath = new .(project.mProjectDir);
uiEntry.mWidget = editWidget;
editWidget.SetText(defaultValue);
editWidget.mEditWidgetContent.SelectAll();
editWidget.mOnSubmit.Add(new => EditSubmitHandler);
AddWidget(editWidget);
mUIEntries.Add(uiEntry);
mTabWidgets.Add(editWidget);
case "addCombo":
if (mSubmitting)
break;