浏览代码

WelcomeScreen new Banner

/main
Thomas Iché 5 年前
当前提交
260c5deb
共有 5 个文件被更改,包括 3414 次插入131 次删除
  1. 35
      Editor/WelcomeScreen/WelcomeScreen.cs
  2. 809
      Editor/WelcomeScreen/welcome-title.png
  3. 1001
      Documentation~/Images/bg-source.jpg
  4. 1001
      Documentation~/Images/site-banner.png
  5. 699
      Documentation~/Images/wizard-banner.png

35
Editor/WelcomeScreen/WelcomeScreen.cs


class WelcomeScreen : EditorWindow
{
const string kShowOnStartupPreference = "GameplayIngredients.Welcome.ShowAtStartup";
const int WindowWidth = 640;
const int WindowHeight = 520;
static bool showOnStartup
{

private void OnEnable()
{
this.position = new Rect((Screen.width / 2.0f) - 320, (Screen.height / 2.0f) - 200, 640, 400);
this.minSize = new Vector2(640, 400);
this.maxSize = new Vector2(640, 400);
this.position = new Rect((Screen.width / 2.0f) - WindowWidth/2, (Screen.height / 2.0f) - WindowHeight/2, WindowWidth, WindowHeight);
this.minSize = new Vector2(WindowWidth, WindowHeight);
this.maxSize = new Vector2(WindowWidth, WindowHeight);
}
private enum WizardMode

private void OnGUI()
{
Rect headerRect = GUILayoutUtility.GetRect(640, 128);
Rect headerRect = GUILayoutUtility.GetRect(640, 215);
GUILayout.Space(8);
using (new GUILayout.HorizontalScope())
RectOffset headerButtonsOffset = new RectOffset(200, 200, 160, 16);
using (new GUILayout.AreaScope(new Rect(160, 180, 320, 32)))
GUILayout.FlexibleSpace();
if (GUILayout.Button("Tips", Styles.buttonLeft)) wizardMode = WizardMode.TipOfTheDay;
EditorGUI.BeginDisabledGroup(true);
if (GUILayout.Button("Setup", Styles.buttonMid)) wizardMode = WizardMode.FirstTimeSetup;
if (GUILayout.Button("Configuration", Styles.buttonRight)) wizardMode = WizardMode.Configuration;
EditorGUI.EndDisabledGroup();
GUILayout.FlexibleSpace();
using (new GUILayout.HorizontalScope())
{
GUILayout.FlexibleSpace();
if (GUILayout.Button(" Tips ", Styles.buttonLeft)) wizardMode = WizardMode.TipOfTheDay;
EditorGUI.BeginDisabledGroup(true);
if (GUILayout.Button(" Setup ", Styles.buttonMid)) wizardMode = WizardMode.FirstTimeSetup;
if (GUILayout.Button(" Configuration ", Styles.buttonRight)) wizardMode = WizardMode.Configuration;
EditorGUI.EndDisabledGroup();
GUILayout.FlexibleSpace();
}
}
GUILayout.Space(8);

EditorGUI.DrawRect(line, Color.black);
using (new GUILayout.HorizontalScope())
{
showOnStartup = GUILayout.Toggle(showOnStartup, "Show this window on startup");
showOnStartup = GUILayout.Toggle(showOnStartup, " Show this window on startup");
GUILayout.FlexibleSpace();
if (GUILayout.Button("Close"))
{

void FirstTimeSetupGUI()
{
GUILayout.Label("First Time Setup", EditorStyles.boldLabel);
GUILayout.FlexibleSpace();
GUILayout.FlexibleSpace();
}
struct Tip

809
Editor/WelcomeScreen/welcome-title.png

之前 之后
宽度: 640  |  高度: 213  |  大小: 172 KiB

1001
Documentation~/Images/bg-source.jpg
文件差异内容过多而无法显示
查看文件

1001
Documentation~/Images/site-banner.png
文件差异内容过多而无法显示
查看文件

699
Documentation~/Images/wizard-banner.png

之前 之后
宽度: 640  |  高度: 213  |  大小: 172 KiB
正在加载...
取消
保存