添加了部分界面

This commit is contained in:
CortexCore
2023-07-08 00:02:32 +08:00
parent f4e85d4f9b
commit a2da9039f8
23 changed files with 768 additions and 48 deletions

46
Temp/CollectionTest.cs Normal file
View File

@@ -0,0 +1,46 @@
using Godot;
using System;
using System.ComponentModel;
using Godot.Collections;
namespace BITKit;
[Tool]
public partial class CollectionTest : Node
{
[Export] private Array<Node> nodes;
[Export] private Dictionary<string, Node> Dictionary;
[Export] private ProgressBar progressBar;
[Export(PropertyHint.Range, "0,1")]
private float progress
{
get => _progress;
set
{
if (Engine.IsEditorHint())
{
RequestReady();
}
if (progressBar is null) return;
_progress = value;
var newProgress = Mathf.Lerp(progressBar.MinValue, progressBar.MaxValue, value);
progressBar.Value = newProgress;
}
}
private float _progress;
[Export] private Label label;
[Export]
public string Text
{
get => label?.Text;
set
{
if (label is not null)
label.Text = value;
}
}
}