Example #1
0
        /// <summary>
        /// ヘッダー描画
        /// </summary>
        private void DrawHeader()
        {
            //using (var v = new GUILayout.VerticalScope())
            {
                // ボタン一覧
                using (var h = new GUILayout.HorizontalScope())
                {
                    float buttonSize = 30f;

                    // 戻る
                    using (var d = new DisabledScope(hasPageHistory == false))
                    {
                        if (GUILayout.Button("←", GUILayout.Width(buttonSize), GUILayout.Height(buttonSize)))
                        {
                            OpenPage(PageBack);
                        }
                    }

                    // スペース
                    GUILayout.FlexibleSpace();

                    // 閉じる
                    if (GUILayout.Button("×", GUILayout.Width(buttonSize), GUILayout.Height(buttonSize)))
                    {
                        this.Close();
                    }
                }
            }
        }
Example #2
0
        void IDebuggeable.Draw(Window window)
        {
            foreach (var page in DebugManager.Instance.Pages)
            {
                // トップが自分なので除外
                if (page == Window.PageTop)
                {
                    continue;
                }

                var draw = DebugManager.Instance.GetDrawer(page);
                using (var d = new DisabledScope(draw == null))
                {
                    if (GUILayout.Button($"{page}"))
                    {
                        DebugManager.Instance.OpenWindow(page);
                    }
                }
            }
        }