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
469 B
C#
20 lines
469 B
C#
using Godot;
|
|
|
|
namespace Pong.Scripts.Managers.UI.Menus;
|
|
|
|
public partial class MainMenu : BaseMenu
|
|
{
|
|
/// <summary>
|
|
/// code that executes when the start button is pressed. this loads the Pong scene to the root
|
|
/// of the scene tree.
|
|
/// </summary>
|
|
private void OnPlayButtonPressed()
|
|
{
|
|
GetTree().ChangeSceneToFile("res://Scenes/Pong.tscn");
|
|
}
|
|
|
|
private void OnSettingsButtonPressed()
|
|
{
|
|
GetTree().ChangeSceneToFile("res://Scenes/UI/Menus/Settings.tscn");
|
|
}
|
|
}
|