mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-18 16:10:26 +02:00
Removed buttons during regen
This commit is contained in:
parent
cf7c5c3869
commit
8623f8f7e5
2 changed files with 22 additions and 9 deletions
|
@ -27,6 +27,7 @@ namespace System
|
||||||
public StringView WorkspaceName => mParams["WorkspaceName"];
|
public StringView WorkspaceName => mParams["WorkspaceName"];
|
||||||
public StringView WorkspaceDir => mParams["WorkspaceDir"];
|
public StringView WorkspaceDir => mParams["WorkspaceDir"];
|
||||||
public StringView DateTime => mParams["DateTime"];
|
public StringView DateTime => mParams["DateTime"];
|
||||||
|
public bool IsRegenererating => mParams.GetValueOrDefault("Regenerating") == "True";
|
||||||
|
|
||||||
public void Fail(StringView error)
|
public void Fail(StringView error)
|
||||||
{
|
{
|
||||||
|
|
|
@ -256,11 +256,14 @@ namespace IDE.ui
|
||||||
|
|
||||||
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable | .PopupPosition;
|
mWindowFlags = .ClientSized | .TopMost | .Caption | .Border | .SysMenu | .Resizable | .PopupPosition;
|
||||||
|
|
||||||
|
if (!mRegenerating)
|
||||||
|
{
|
||||||
AddOkCancelButtons(new (evt) =>
|
AddOkCancelButtons(new (evt) =>
|
||||||
{
|
{
|
||||||
Submit();
|
Submit();
|
||||||
evt.mCloseDialog = false;
|
evt.mCloseDialog = false;
|
||||||
}, null, 0, 1);
|
}, null, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
Title = "Generate File";
|
Title = "Generate File";
|
||||||
|
|
||||||
|
@ -399,6 +402,9 @@ namespace IDE.ui
|
||||||
return;
|
return;
|
||||||
using (gApp.mMonitor.Enter())
|
using (gApp.mMonitor.Enter())
|
||||||
{
|
{
|
||||||
|
if (mRegenerating)
|
||||||
|
args.Append("Regenerating\tTrue\n");
|
||||||
|
|
||||||
args.AppendF(
|
args.AppendF(
|
||||||
$"""
|
$"""
|
||||||
ProjectName\t{mProjectName}
|
ProjectName\t{mProjectName}
|
||||||
|
@ -496,6 +502,7 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
if (mOutputPanel == null)
|
if (mOutputPanel == null)
|
||||||
{
|
{
|
||||||
|
IDEApp.Beep(.Error);
|
||||||
mOutputPanel = new OutputPanel();
|
mOutputPanel = new OutputPanel();
|
||||||
AddWidget(mOutputPanel);
|
AddWidget(mOutputPanel);
|
||||||
ResizeComponents();
|
ResizeComponents();
|
||||||
|
@ -677,6 +684,11 @@ namespace IDE.ui
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((hadError) && (mRegenerating) && (mOutputPanel == null))
|
||||||
|
{
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
if (mPendingUIFocus)
|
if (mPendingUIFocus)
|
||||||
{
|
{
|
||||||
mPendingUIFocus = false;
|
mPendingUIFocus = false;
|
||||||
|
@ -695,8 +707,8 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
mSubmitting = false;
|
mSubmitting = false;
|
||||||
mSubmitQueued = false;
|
mSubmitQueued = false;
|
||||||
mDefaultButton.mDisabled = false;
|
mDefaultButton?.mDisabled = false;
|
||||||
mEscButton.mDisabled = false;
|
mEscButton?.mDisabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -802,7 +814,7 @@ namespace IDE.ui
|
||||||
if (mThreadWaitCount > 10)
|
if (mThreadWaitCount > 10)
|
||||||
{
|
{
|
||||||
using (g.PushColor(0x60505050))
|
using (g.PushColor(0x60505050))
|
||||||
g.FillRect(0, 0, mWidth, mHeight - GS!(40));
|
g.FillRect(0, 0, mWidth, mHeight - ((mDefaultButton != null) ? GS!(40) : GS!(0)));
|
||||||
IDEUtils.DrawWait(g, mWidth/2, mHeight/2, mUpdateCnt);
|
IDEUtils.DrawWait(g, mWidth/2, mHeight/2, mUpdateCnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -840,7 +852,7 @@ namespace IDE.ui
|
||||||
if (mOutputPanel != null)
|
if (mOutputPanel != null)
|
||||||
{
|
{
|
||||||
float startY = mKindBar.mVisible ? GS!(60) : GS!(36);
|
float startY = mKindBar.mVisible ? GS!(60) : GS!(36);
|
||||||
mOutputPanel.Resize(insetSize, startY, mWidth - insetSize - insetSize, Math.Max(mHeight - startY - GS!(44), GS!(32)));
|
mOutputPanel.Resize(insetSize, startY, mWidth - insetSize - insetSize, Math.Max(mHeight - startY - ((mDefaultButton != null) ? GS!(44) : GS!(12)), GS!(32)));
|
||||||
mUIHeight = Math.Max(mUIHeight, GS!(160));
|
mUIHeight = Math.Max(mUIHeight, GS!(160));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue