ini
This commit is contained in:
35
Scenes/StringLoader.cs
Normal file
35
Scenes/StringLoader.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Godot;
|
||||
using VirtualChemistry.Chemistry.Mixtures.Implements;
|
||||
using VirtualChemistry.Chemistry.Mixtures.Resolver;
|
||||
|
||||
public partial class StringLoader : Window
|
||||
{
|
||||
|
||||
public TextEdit Input { get; set; }
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
Input = GetNode<TextEdit>("Input");
|
||||
GlobalScene.StringLoader = this;
|
||||
}
|
||||
|
||||
private void Load()
|
||||
{
|
||||
string expression = Input.Text;
|
||||
HeterogeneousMixture mixture = HeterogeneousMixtureResolver.Resolve(expression);
|
||||
GlobalScene.Demo.SelectedBottle.Content = mixture;
|
||||
mixture.Container = GlobalScene.Demo.SelectedBottle;
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
private void Cancel()
|
||||
{
|
||||
Visible = false;
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user