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

Default Rename in Files to current document. Added Undo Replace button

This commit is contained in:
Brian Fiete 2020-10-11 06:33:13 -07:00
parent 196b9604c1
commit c337bee05c
4 changed files with 94 additions and 1 deletions

View file

@ -45,6 +45,40 @@ namespace IDE.ui
public int32 mLineChar;
}
public class OutputActionButton : DarkButton
{
public OutputPanel mPanel;
public int mLine;
public void Close()
{
RemoveSelf();
gApp.DeferDelete(this);
}
public override void RemovedFromParent(Widget previousParent, WidgetWindow window)
{
base.RemovedFromParent(previousParent, window);
var ewc = (OutputWidgetContent)mPanel.EditWidget.mEditWidgetContent;
ewc.mActionWidgets.Remove(this);
}
public override void Update()
{
base.Update();
var ewc = (OutputWidgetContent)mPanel.EditWidget.mEditWidgetContent;
if (mLine >= ewc.GetLineCount())
{
Close();
return;
}
var font = DarkTheme.sDarkTheme.mSmallFont;
ewc.GetTextCoordAtLineChar(mLine, 0, var x, var y);
Resize(GS!(4), y, font.GetWidth(mLabel) + GS!(32), GS!(24));
}
}
public OutputWidget mOutputWidget;
String mQueuedText = new String() ~ delete _;
List<QueuedDisplayChange> mQueuedDisplayChanges = new List<QueuedDisplayChange>() ~ delete _;