particles/MainMenu.cs

28 lines
577 B
C#
Raw Normal View History

2022-01-17 23:52:42 -05:00
using Godot;
using System;
public class MainMenu : Control
{
private Main _main;
public override void _Ready()
{
_main = GetTree().Root.GetNode<Main>("Main");
}
public void _on_Button_pressed()
{
var nParticles = GetNode<VBoxContainer>("MenuButtons").GetNode<TextEdit>("TextEdit").Text.ToInt();
_main.StartSimulation(nParticles);
}
public void _on_ToggleFullscreen_pressed()
{
if (OS.WindowFullscreen)
OS.WindowFullscreen = false;
else
OS.WindowFullscreen = true;
}
}