restructured project
This commit is contained in:
27
MainMenu/MainMenu.cs
Normal file
27
MainMenu/MainMenu.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user