コード例 #1
0
        protected void Draw()
        {
            Clear();

            foreach (var control in Controls)
            {
                control.Draw();
            }

            Footer.Draw();
        }
コード例 #2
0
        public override void DrawGame(float elapsed)
        {
            deltaTime = elapsed;

            background.Draw(spriteBatch);

            PaddleUI.Draw(spriteBatch, scene.Paddle);

            DrawGameEntities(deltaTime);

            header.Draw(spriteBatch);
            footer.Draw(spriteBatch);

            DrawScreens();
        }
コード例 #3
0
        private void OnGUI()
        {
            GUI.enabled = !EditorApplication.isPlaying;
            if (Skin == null)
            {
                Skin = AssetDatabase.LoadAssetAtPath <GUISkin>(Constants.ResourcesPath + "DNAI_EditorSkin.guiskin");
            }
            var old = GUI.skin;

            GUI.skin = DulyEditor.Skin;

            if (_settingsContent == null)
            {
                _settingsContent = EditorGUIUtility.IconContent("SettingsIcon", "|Settings");
            }

            if (SettingsDrawer == null)
            {
                SettingsDrawer = CreateInstance <SettingsDrawer>();
            }

            scrollPos = GUILayout.BeginScrollView(scrollPos);

            DrawPage();

            EditorGUILayout.Space();

            DrawToolsBar();

            EditorGUILayout.Space();

            DrawContent();

            _footer.Draw();

            GUILayout.EndScrollView();
            GUI.skin = old;
        }