release
This commit is contained in:
@@ -6,45 +6,22 @@ namespace BITKit;
|
||||
|
||||
public partial class UXContainer:Control
|
||||
{
|
||||
[Export] public Label label;
|
||||
[Export] public RichTextLabel richTextLabel;
|
||||
[Export] public Label titleLabel;
|
||||
[Export] public TextureRect icon;
|
||||
[Export] public Node contextContainer;
|
||||
|
||||
[ExportCategory(nameof(Label))]
|
||||
[Export] public Array<Label> labels;
|
||||
|
||||
|
||||
public Label label => labels[0];
|
||||
|
||||
[ExportCategory(nameof(Button))]
|
||||
[Export] public Button button;
|
||||
[Export] public Array<Button> buttons;
|
||||
public Button button => buttons[0];
|
||||
|
||||
[ExportCategory(nameof(TextEdit))]
|
||||
[Export] public LineEdit lineEdit;
|
||||
[Export] public Array<LineEdit> lineEdits;
|
||||
|
||||
[ExportCategory(nameof(OptionButton))]
|
||||
[Export] public OptionButton optionButton;
|
||||
[Export] public Array<OptionButton> optionButtons;
|
||||
public LineEdit lineEdit => lineEdits[0];
|
||||
|
||||
[ExportCategory(nameof(OptionButton))]
|
||||
[Export] public Array<OptionButton> optionButtons;
|
||||
public OptionButton optionButton=>optionButtons[0];
|
||||
|
||||
public string Text
|
||||
{
|
||||
get =>label is not null ? label.Text : richTextLabel.Text;
|
||||
set
|
||||
{
|
||||
switch (label, richTextLabel)
|
||||
{
|
||||
case (not null, null):
|
||||
label.Text = value;
|
||||
break;
|
||||
case (null, not null):
|
||||
richTextLabel.Text = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
public void SetText(string text)
|
||||
{
|
||||
Text=text;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user