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

@@ -11,14 +11,14 @@ namespace RebootKitEditor.RebootWindow {
}
public VisualElement Build() {
VisualElement rootContainer = new() {
VisualElement rootContainer = new VisualElement {
style = {
flexGrow = 1,
fontSize = 14
}
};
Label label = new($"{Application.productName} {Application.version}") {
Label label = new Label($"{Application.productName} {Application.version}") {
style = {
fontSize = 18,
unityFontStyleAndWeight = FontStyle.Bold
@@ -26,7 +26,7 @@ namespace RebootKitEditor.RebootWindow {
};
rootContainer.Add(label);
VisualElement persistentPathContainer = new() {
VisualElement persistentPathContainer = new VisualElement {
style = {
marginTop = 8,
marginBottom = 8,
@@ -40,7 +40,7 @@ namespace RebootKitEditor.RebootWindow {
}
};
Label persistentPathLabel = new($"Persistent Path: {Application.persistentDataPath}") {
Label persistentPathLabel = new Label($"Persistent Path: {Application.persistentDataPath}") {
style = {
fontSize = 12,
color = new Color(0.7f, 0.9f, 0.9f)
@@ -48,7 +48,9 @@ namespace RebootKitEditor.RebootWindow {
};
persistentPathContainer.Add(persistentPathLabel);
Button openPersistentPathButton = new(() => { Application.OpenURL(Application.persistentDataPath); }) {
Button openPersistentPathButton = new Button(() => {
Application.OpenURL(Application.persistentDataPath);
}) {
style = {
fontSize = 12,
width = 48
@@ -59,7 +61,7 @@ namespace RebootKitEditor.RebootWindow {
rootContainer.Add(persistentPathContainer);
Label onGameRunScriptLabel = new("On Game Run Script (User):") {
Label onGameRunScriptLabel = new Label("On Game Run Script (User):") {
style = {
fontSize = 12,
color = new Color(0.7f, 0.9f, 0.9f)
@@ -67,7 +69,7 @@ namespace RebootKitEditor.RebootWindow {
};
rootContainer.Add(onGameRunScriptLabel);
TextField onGameRunScriptTextField = new() {
TextField onGameRunScriptTextField = new TextField {
style = {
fontSize = 12,
},
@@ -80,7 +82,7 @@ namespace RebootKitEditor.RebootWindow {
});
rootContainer.Add(onGameRunScriptTextField);
Label consoleCommandsLabel = new("Console Commands:") {
Label consoleCommandsLabel = new Label("Console Commands:") {
style = {
fontSize = 12,
color = new Color(0.7f, 0.9f, 0.9f)
@@ -90,7 +92,7 @@ namespace RebootKitEditor.RebootWindow {
ConsoleService.ConsoleCommand[] consoleCommands = ConsoleService.GenerateCommandsToRegister();
foreach (ConsoleService.ConsoleCommand consoleCommand in consoleCommands) {
VisualElement commandContainer = new() {
VisualElement commandContainer = new VisualElement {
style = {
flexDirection = FlexDirection.Row,
marginTop = 4,
@@ -101,7 +103,7 @@ namespace RebootKitEditor.RebootWindow {
paddingBottom = 4,
}
};
Label commandLabel = new(consoleCommand.name) {
Label commandLabel = new Label(consoleCommand.name) {
style = {
fontSize = 12,
color = new Color(0.7f, 0.9f, 0.9f)
@@ -109,7 +111,7 @@ namespace RebootKitEditor.RebootWindow {
};
commandContainer.Add(commandLabel);
Label descriptionLabel = new(consoleCommand.description) {
Label descriptionLabel = new Label(consoleCommand.description) {
style = {
fontSize = 12,
color = new Color(0.5f, 0.7f, 0.7f)