This commit is contained in:
h z
2024-06-21 20:57:19 +08:00
commit 7eed16cd02
48 changed files with 1599 additions and 0 deletions

35
Scenes/StringLoader.cs Normal file
View 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)
{
}
}