28 lines
577 B
C#
28 lines
577 B
C#
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;
|
|
}
|
|
}
|