Storyline+Dialog初步

This commit is contained in:
SoulliesOfficial
2026-07-05 16:08:23 -04:00
parent afa8a56e1d
commit d031afd075
464 changed files with 25716 additions and 4209 deletions

View File

@@ -0,0 +1,37 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
namespace SubAssetsToolbox.Editor
{
public class WelcomeScreen : EditorWindow
{
[SerializeField] private VisualTreeAsset _visualTreeAsset;
private static WelcomeScreen _window;
[MenuItem(Constants.MenuItemBaseName + "Welcome screen", false, 0)]
public static void Init()
{
_window = GetWindow<WelcomeScreen>(true);
_window.titleContent = new GUIContent("SubAssets Toolbox");
_window.minSize = new Vector2(300f, 400f);
_window.maxSize = new Vector2(300f, 400f);
_window.Show();
}
private void CreateGUI()
{
VisualElement root = rootVisualElement;
VisualElement templateWindow = _visualTreeAsset.Instantiate();
templateWindow.style.flexGrow = 1f;
templateWindow.Q<Button>("DocsBtn").clicked += () => Application.OpenURL(Constants.DocumentationUrl);
templateWindow.Q<Button>("EmailBtn").clicked += () => Application.OpenURL(Constants.SupportEmail);
templateWindow.Q<Button>("DiscordBtn").clicked += () => Application.OpenURL(Constants.DiscordUrl);
templateWindow.Q<Button>("OtherToolsBtn").clicked += () => Application.OpenURL(Constants.OtherToolsUrl);
templateWindow.Q<Button>("ReviewBtn").clicked += () => Application.OpenURL(Constants.ReviewUrl);
root.Add(templateWindow);
}
}
}