mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-17 07:44:09 +02:00
Minor IDE modifications
This commit is contained in:
parent
f8d4d0ded0
commit
908dbe1a6e
8 changed files with 97 additions and 31 deletions
|
@ -12,6 +12,12 @@ namespace IDE.ui
|
|||
public DarkButton mNextButton;
|
||||
public SettingHistoryManager mSettingHistoryManager;
|
||||
|
||||
public override void WindowCreated()
|
||||
{
|
||||
base.WindowCreated();
|
||||
gApp.SetupNewWindow(mWidgetWindow, false);
|
||||
}
|
||||
|
||||
public void CreatePrevNextButtons()
|
||||
{
|
||||
mPrevButton = new DarkButton();
|
||||
|
|
|
@ -1908,6 +1908,14 @@ namespace IDE.ui
|
|||
gApp.mWorkspace.SetChanged();
|
||||
}
|
||||
});
|
||||
|
||||
item = menu.AddItem("Rename");
|
||||
item.mOnMenuItemSelected.Add(new (item) =>
|
||||
{
|
||||
var projectItem = GetSelectedProjectItem();
|
||||
if (projectItem != null)
|
||||
RenameItem(projectItem);
|
||||
});
|
||||
|
||||
item = menu.AddItem("Refresh");
|
||||
item.mOnMenuItemSelected.Add(new (item) =>
|
||||
|
|
|
@ -908,10 +908,17 @@ namespace IDE.ui
|
|||
|
||||
protected override bool ApplyChanges()
|
||||
{
|
||||
if (mApplyButton.mDisabled)
|
||||
return true;
|
||||
|
||||
if (mProject.mLocked)
|
||||
{
|
||||
let dialog = gApp.Fail(
|
||||
"This project is locked because it may be a shared library, and editing shared libraries may have unwanted effects on other programs that use it.\n\nIf you are sure you want to edit this project then you can unlock it with the lock icon in the lower left of the",
|
||||
"""
|
||||
This project is locked because it may be a shared library, and editing shared libraries may have unwanted effects on other programs that use it.
|
||||
|
||||
If you are sure you want to edit this project then you can unlock it with the lock icon in the lower left of the properties dialog.
|
||||
""",
|
||||
null, mWidgetWindow);
|
||||
dialog.mWindowFlags |= .Modal;
|
||||
if (dialog != null)
|
||||
|
@ -1090,6 +1097,7 @@ namespace IDE.ui
|
|||
{
|
||||
mProject.mLocked = !mProject.mLocked;
|
||||
gApp.mWorkspace.SetChanged();
|
||||
gApp.mProjectPanel.MarkDirty();
|
||||
});
|
||||
if (mProject.mLocked)
|
||||
menuItem.mIconImage = DarkTheme.sDarkTheme.GetImage(.Check);
|
||||
|
|
|
@ -3057,7 +3057,11 @@ namespace IDE.ui
|
|||
|
||||
menuItem = menu.AddItem("Go to Definition");
|
||||
menuItem.SetDisabled(!hasText);
|
||||
menuItem.mOnMenuItemSelected.Add(new (evt) => IDEApp.sApp.GoToDefinition());
|
||||
menuItem.mOnMenuItemSelected.Add(new (evt) => gApp.GoToDefinition());
|
||||
|
||||
menuItem = menu.AddItem("Rename Symbol");
|
||||
menuItem.SetDisabled(!hasText);
|
||||
menuItem.mOnMenuItemSelected.Add(new (evt) => gApp.Cmd_RenameSymbol());
|
||||
|
||||
menuItem = menu.AddItem("Add Watch");
|
||||
menuItem.SetDisabled(!hasText);
|
||||
|
|
|
@ -24,8 +24,7 @@ namespace IDE.ui
|
|||
var editText = scope String();
|
||||
GetText(editText);
|
||||
|
||||
int cursorPos = doAutoComplete ? mEditWidgetContent.CursorTextPos - 1 : -1;
|
||||
#unwarn
|
||||
int cursorPos = doAutoComplete ? mEditWidgetContent.CursorTextPos : -1;
|
||||
|
||||
int editOffset = 0;
|
||||
if (cursorPos > 0)
|
||||
|
@ -54,8 +53,7 @@ namespace IDE.ui
|
|||
{
|
||||
mEditWidgetContent.mData.mText[editOffset + ofs].mDisplayTypeId = isValid ? 0 : 1;
|
||||
}
|
||||
//mColors[0] = isValid ? 0xFFFFFFFF : 0xFFFF8080;
|
||||
|
||||
|
||||
if (doAutoComplete)
|
||||
{
|
||||
String autocompleteInfo = scope String();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue