Merge pull request #51322 from raulsntos/fix-msbuild-exception
Ensure MSBuildPanel buttons are instantiated
This commit is contained in:
commit
35b08b7cbc
@ -73,7 +73,7 @@ namespace GodotTools.Build
|
|||||||
GD.PushError("Failed to setup Godot NuGet Offline Packages: " + e.Message);
|
GD.PushError("Failed to setup Godot NuGet Offline Packages: " + e.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!BuildManager.BuildProjectBlocking("Debug", targets: new[] {"Rebuild"}))
|
if (!BuildManager.BuildProjectBlocking("Debug", targets: new[] { "Rebuild" }))
|
||||||
return; // Build failed
|
return; // Build failed
|
||||||
|
|
||||||
// Notify running game for hot-reload
|
// Notify running game for hot-reload
|
||||||
@ -92,7 +92,7 @@ namespace GodotTools.Build
|
|||||||
if (!File.Exists(GodotSharpDirs.ProjectSlnPath))
|
if (!File.Exists(GodotSharpDirs.ProjectSlnPath))
|
||||||
return; // No solution to build
|
return; // No solution to build
|
||||||
|
|
||||||
BuildManager.BuildProjectBlocking("Debug", targets: new[] {"Clean"});
|
BuildManager.BuildProjectBlocking("Debug", targets: new[] { "Clean" });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ViewLogToggled(bool pressed) => BuildOutputView.LogVisible = pressed;
|
private void ViewLogToggled(bool pressed) => BuildOutputView.LogVisible = pressed;
|
||||||
@ -129,10 +129,10 @@ namespace GodotTools.Build
|
|||||||
RectMinSize = new Vector2(0, 228) * EditorScale;
|
RectMinSize = new Vector2(0, 228) * EditorScale;
|
||||||
SizeFlagsVertical = (int)SizeFlags.ExpandFill;
|
SizeFlagsVertical = (int)SizeFlags.ExpandFill;
|
||||||
|
|
||||||
var toolBarHBox = new HBoxContainer {SizeFlagsHorizontal = (int)SizeFlags.ExpandFill};
|
var toolBarHBox = new HBoxContainer { SizeFlagsHorizontal = (int)SizeFlags.ExpandFill };
|
||||||
AddChild(toolBarHBox);
|
AddChild(toolBarHBox);
|
||||||
|
|
||||||
buildMenuBtn = new MenuButton {Text = "Build", Icon = GetThemeIcon("Play", "EditorIcons")};
|
buildMenuBtn = new MenuButton { Text = "Build", Icon = GetThemeIcon("Play", "EditorIcons") };
|
||||||
toolBarHBox.AddChild(buildMenuBtn);
|
toolBarHBox.AddChild(buildMenuBtn);
|
||||||
|
|
||||||
var buildMenu = buildMenuBtn.GetPopup();
|
var buildMenu = buildMenuBtn.GetPopup();
|
||||||
@ -183,10 +183,14 @@ namespace GodotTools.Build
|
|||||||
{
|
{
|
||||||
base._Notification(what);
|
base._Notification(what);
|
||||||
|
|
||||||
if (what == NotificationThemeChanged) {
|
if (what == NotificationThemeChanged)
|
||||||
buildMenuBtn.Icon = GetThemeIcon("Play", "EditorIcons");
|
{
|
||||||
errorsBtn.Icon = GetThemeIcon("StatusError", "EditorIcons");
|
if (buildMenuBtn != null)
|
||||||
warningsBtn.Icon = GetThemeIcon("NodeWarning", "EditorIcons");
|
buildMenuBtn.Icon = GetThemeIcon("Play", "EditorIcons");
|
||||||
|
if (errorsBtn != null)
|
||||||
|
errorsBtn.Icon = GetThemeIcon("StatusError", "EditorIcons");
|
||||||
|
if (warningsBtn != null)
|
||||||
|
warningsBtn.Icon = GetThemeIcon("NodeWarning", "EditorIcons");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user