コード例 #1
0
        private static void Header(DisplayData _display)
        {
            ICEEditorLayout.BeginHorizontal();

            string _global_info = " (local)";

            if (_display.UseGlobalAll)
            {
                _global_info = " (all global)";
            }
            else if (_display.UseGlobal)
            {
                _global_info = " (global)";
            }

            _display.DisplayOptions = (DisplayOptionType)ICEEditorLayout.EnumPopup("Display Options" + _global_info, "", _display.DisplayOptions);

            string _use_global_all_title = "ALL GLOBAL";

            if (_display.UseGlobalAll)
            {
                _use_global_all_title = "LOCAL";
            }

            if (_display.UseGlobalAll)
            {
                GUI.backgroundColor = Color.yellow;
            }

            if (GUILayout.Button(_use_global_all_title, ICEEditorStyle.ButtonLarge))
            {
                if (!_display.UseGlobalAll)
                {
                    _display.SetLocalToGlobal();
                }
                else
                {
                    _display.SetGlobalToLocal();
                }

                _display.UseGlobalAll = !_display.UseGlobalAll;
            }

            GUI.backgroundColor = ICEEditorLayout.DefaultBackgroundColor;

            ICEEditorLayout.EndHorizontal(Info.DISPLAY_OPTIONS);
            HandleQuickChange(_display);

            /*
             * EditorGUI.indentLevel++;
             *      if( ! _display.UseGlobalAll )
             *              _display.UseGlobal = EditorGUILayout.ToggleLeft( "Use Global Display Options", _display.UseGlobal );
             * EditorGUI.indentLevel--;
             */

            _display.ShowMissionsHome   = true;
            _display.ShowMissionsEscort = true;
            _display.ShowMissionsPatrol = true;

            _display.ShowBehaviourMove      = true;
            _display.ShowBehaviourAudio     = true;
            _display.ShowBehaviourInluences = true;
            _display.ShowBehaviourEffect    = true;
            _display.ShowBehaviourLink      = true;
        }