Skip to content

Commit

Permalink
feat: classify menu item
Browse files Browse the repository at this point in the history
closes also #142
  • Loading branch information
TheLLspectre committed Mar 18, 2024
1 parent 63d1744 commit 253cca3
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package/Editor/CompositionEditor/CompositionEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class CompositionEditor : EditorWindow
internal RenderTexture renderTexture;
private Texture2D screenshot;

[MenuItem("Window/Scenario/Composition Editor")]
[MenuItem("Window/Scenario/Editor/Composition Editor", false,0)]
public static void ShowWindow()
{
var window = GetWindow<CompositionEditor>("Composition Editor");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/DataBuilder/DataBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ private enum ScreenshotType
private float cameraDistance = 2f;
private float lightDistance = 2f;

[MenuItem("Window/Scenario/3d Data Builder")]
[MenuItem("Window/Scenario/Builder/3d Data Builder", false, 0)]
public static void ShowWindow()
{
GetWindow<DataBuilder>("3d Data Builder");
Expand Down
8 changes: 0 additions & 8 deletions package/Editor/Fonts.meta

This file was deleted.

8 changes: 0 additions & 8 deletions package/Editor/Fonts/Poppins.meta

This file was deleted.

2 changes: 1 addition & 1 deletion package/Editor/ImageEditor/ImageEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ImageEditor : EditorWindow

private static float minimumWidth = 1775f;

[MenuItem("Window/Scenario/Image Editor")]
[MenuItem("Window/Scenario/Editor/Image Editor", false, 1)]
public static void ShowWindow()
{
ImageEditor window = GetWindow<ImageEditor>("Image Editor");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/Images/Images.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Images : EditorWindow

private static bool isVisible = false;

[MenuItem("Window/Scenario/Images")]
[MenuItem("Window/Scenario/Images", false, 10)]
public static void ShowWindow()
{
if (isVisible)
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/InpaintingEditor/InpaintingEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class InpaintingEditor : EditorWindow
private static InpaintingEditorUI inpaintingEditorUI;
private static Texture2D inpaintingTexture;

[MenuItem("Window/Scenario/Inpainting Editor")]
[MenuItem("Window/Scenario/Editor/Inpainting Editor", false, 2)]
public static void ShowWindow()
{
InpaintingEditor window = GetWindow<InpaintingEditor>("Inpainting Editor");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/LayerEditor/LayerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class LayerEditor : EditorWindow
private LayerEditorRightPanel rightPanel;
private ContextMenuActions contextMenuActions;

[MenuItem("Window/Layer Editor")]
[MenuItem("Window/Scenario/Editor/Layer Editor", false, 3)]
public static void ShowWindow()
{
GetWindow<LayerEditor>("Layer Editor");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/Models/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private void OnDestroy()

#region Public Methods

[MenuItem("Window/Scenario/Models")]
[MenuItem("Window/Scenario/Models", false, 11)]
public static void ShowWindow()
{
window = GetWindow<Models>("Models");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/PixelEditor/PixelEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class PixelEditor : EditorWindow
private static readonly float MinimumWidth = 1650f;
private PixelEditorUI pixelEditorUI = new();

[MenuItem("Window/Scenario/Pixel Editor")]
[MenuItem("Window/Scenario/Editor/Pixel Editor", false, 4)]
public static void ShowWindow()
{
var window = EditorWindow.GetWindow(typeof(PixelEditor), false, "Pixel Editor") as PixelEditor;
Expand Down
5 changes: 4 additions & 1 deletion package/Editor/Plugins/APIPricing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ public class APIPricingWindow : EditorWindow
{ "Generator training", "$5.00 per training" }
};

[MenuItem("Window/Scenario/API Pricing")]
/// <summary>
/// Using true on MenuItem parameter, allow us to keep it now without seeing it
/// </summary>
[MenuItem("Window/Scenario/API Pricing", true, 101)]
public static void ShowWindow()
{
GetWindow<APIPricingWindow>("API Pricing");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/PromptWindow/PromptBuilderWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class PromptBuilderWindow : EditorWindow
public static Action<string> onReturn;
public static PromptBuilderWindow Instance;

[MenuItem("Window/Scenario/Prompt Builder")]
[MenuItem("Window/Scenario/Builder/Prompt Builder", false, 1)]
public static void ShowWindow()
{
Instance = GetWindow<PromptBuilderWindow>("Prompt Builder");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/PromptWindow/PromptWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class PromptWindow : EditorWindow
private byte[] pngBytesUploadImage = null;
private string fileName;

[MenuItem("Window/Scenario/Prompt Window")]
[MenuItem("Window/Scenario/Prompt Window", false, 5)]
public static void ShowWindow()
{
GetWindow<PromptWindow>("Prompt Window");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/Settings/PluginSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private void OnEnable()
}


[MenuItem("Window/Scenario/Scenario Settings")]
[MenuItem("Window/Scenario/Scenario Settings", false, 100)]
public static void ShowWindow()
{
GetWindow<PluginSettings>("Scenario Settings");
Expand Down
2 changes: 1 addition & 1 deletion package/Editor/UpscaleEditor/UpscaleEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class UpscaleEditor : EditorWindow
private static readonly float MinimumWidth = 1650f;
private static readonly UpscaleEditorUI UpscaleEditorUI = new();

[MenuItem("Window/Scenario/Upscale Editor")]
[MenuItem("Window/Scenario/Editor/Upscale Editor", false, 5)]
public static void ShowWindow()
{
var window = EditorWindow.GetWindow(typeof(UpscaleEditor), false, "Upscale Editor") as UpscaleEditor;
Expand Down

0 comments on commit 253cca3

Please sign in to comment.