something

This commit is contained in:
2025-06-17 23:39:51 +02:00
parent 76b2c8c1bf
commit 518fd29d75
29 changed files with 118 additions and 101 deletions

View File

@@ -12,16 +12,16 @@ namespace RebootKitEditor.RebootWindow {
public VisualElement container;
}
readonly List<Tab> m_Tabs = new();
readonly List<VisualElement> m_TabContents = new();
readonly List<Button> m_TabButtons = new();
readonly List<Tab> m_Tabs = new List<Tab>();
readonly List<VisualElement> m_TabContents = new List<VisualElement>();
readonly List<Button> m_TabButtons = new List<Button>();
int m_CurrentTabIndex = -1;
public void Dispose() {
}
public VisualElement Build() {
VisualElement rootContainer = new() {
VisualElement rootContainer = new VisualElement {
style = {
flexDirection = FlexDirection.Row,
flexGrow = 1,
@@ -31,7 +31,7 @@ namespace RebootKitEditor.RebootWindow {
}
};
VisualElement tabContainer = new() {
VisualElement tabContainer = new VisualElement {
style = {
flexDirection = FlexDirection.Row,
width = new StyleLength(new Length(100, LengthUnit.Percent)),
@@ -39,7 +39,7 @@ namespace RebootKitEditor.RebootWindow {
};
rootContainer.Add(tabContainer);
VisualElement tabButtonsContainer = new() {
VisualElement tabButtonsContainer = new VisualElement {
style = {
flexDirection = FlexDirection.Column,
borderRightWidth = 1,
@@ -51,7 +51,7 @@ namespace RebootKitEditor.RebootWindow {
};
tabContainer.Add(tabButtonsContainer);
VisualElement contentContainer = new() {
VisualElement contentContainer = new VisualElement {
style = {
flexGrow = 1,
paddingLeft = 4,
@@ -66,7 +66,7 @@ namespace RebootKitEditor.RebootWindow {
Tab tab = m_Tabs[i];
int index = i;
Button button = new(() => SetActiveTab(index)) {
Button button = new Button(() => SetActiveTab(index)) {
text = tab.name,
style = {
paddingLeft = 8,
@@ -94,7 +94,7 @@ namespace RebootKitEditor.RebootWindow {
}
public void AddTab(string name, IView view) {
VisualElement tabContainer = new() {
VisualElement tabContainer = new VisualElement {
name = "rr_tab__container",
style = {
flexGrow = 1