Fries
425bf2ad27
i added more to the main menu, as it has a settings menu now, that stores its files with json. i also changed the font to atkinson hyperlegible and made a BaseMenu class that takes care of the screen scaling for menus. i also refactored the project folder structure to make it more organized.
20 lines
479 B
C#
20 lines
479 B
C#
#if TOOLS
|
|
using Godot;
|
|
|
|
namespace Pong.addons.BaseMenu;
|
|
|
|
[Tool]
|
|
public partial class BaseMenu : EditorPlugin
|
|
{
|
|
public override void _EnterTree()
|
|
{
|
|
var baseMenuScript = GD.Load<Script>("res://Scripts/Managers/UI/BaseMenu.cs");
|
|
AddCustomType("BaseMenu", "VBoxContainer", baseMenuScript, GetEditorIcon("VBoxContainer"));
|
|
}
|
|
|
|
private Texture2D GetEditorIcon(string iconName)
|
|
{
|
|
return GetEditorInterface().GetBaseControl().GetThemeIcon(iconName, "EditorIcons");
|
|
}
|
|
}
|
|
#endif
|