mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-26 19:48:01 +02:00
Right-click menu for statusbar error icon
This commit is contained in:
parent
dfdbe7440f
commit
ff96101806
1 changed files with 29 additions and 1 deletions
|
@ -590,7 +590,35 @@ namespace IDE.ui
|
|||
|
||||
if (Rect(GS!(6), 0, GS!(20), mHeight).Contains(x, y))
|
||||
{
|
||||
gApp.mErrorsPanel.ShowErrorNext();
|
||||
bool hasError = (gApp.mErrorsPanel.mErrorCount > 0);
|
||||
bool hasWarning = (gApp.mErrorsPanel.mWarningCount > 0);
|
||||
|
||||
if (btn == 0)
|
||||
{
|
||||
gApp.mErrorsPanel.ShowErrorNext();
|
||||
}
|
||||
else if ((btn == 1) && ((hasError || hasWarning)))
|
||||
{
|
||||
float useX = x;
|
||||
float useY = y;
|
||||
|
||||
Menu menu = new Menu();
|
||||
|
||||
var menuItem = menu.AddItem("Goto Next Error");
|
||||
menuItem.mOnMenuItemSelected.Add(new (evt) =>
|
||||
{
|
||||
gApp.mErrorsPanel.ShowErrorNext();
|
||||
});
|
||||
|
||||
menuItem = menu.AddItem("Clean Beef");
|
||||
menuItem.mOnMenuItemSelected.Add(new (evt) =>
|
||||
{
|
||||
gApp.Cmd_CleanBeef();
|
||||
});
|
||||
|
||||
MenuWidget menuWidget = DarkTheme.sDarkTheme.CreateMenuWidget(menu);
|
||||
menuWidget.Init(this, useX, useY);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue