Example #1
0
        public BHAVEditor(BHAV bhav, EditorScope scope) : this()
        {
            DebugMode = false;
            MainTable.ColumnStyles[2].SizeType = SizeType.Absolute;
            MainTable.ColumnStyles[2].Width    = 0;

            Scope     = scope;
            this.bhav = bhav;

            Text = scope.GetFilename(scope.GetScopeFromID(bhav.ChunkID)) + "::" + bhav.ChunkLabel;
            EditorControl.InitBHAV(bhav, scope, null, null, SelectionChanged);
            Editor.DisableDebugger += DisableDebugger;

            PrimGroupChange(AllBtn, null);
        }
Example #2
0
        public BHAVEditor(BHAV bhav, EditorScope scope)
        {
            Scope = scope;
            this.bhav = bhav;
            InitializeComponent();

            Text = scope.GetFilename(scope.GetScopeFromID(bhav.ChunkID))+"::"+bhav.ChunkLabel.Trim('\0');
            EditorControl.InitBHAV(bhav, scope);

            PrimitiveList.Items.AddRange(scope.GetAllSubroutines(ScopeSource.Private).ToArray());

            /*PrimitiveList.Items.Add("Generic Sims Online Call");
            PrimitiveList.Items.Add("Sleep");
            PrimitiveList.Items.Add("Idle for Input");
            PrimitiveList.Items.Add("Notify Stack Object out of Idle");
            PrimitiveList.Items.Add("Push Interaction");
            PrimitiveList.Items.Add("Find Best Object For Function");
            PrimitiveList.Items.Add("Run Functional Tree");
            PrimitiveList.Items.Add("Run Tree By Name");
            PrimitiveList.Items.Add("Add / Change Action String");*/

            ButtonGroups = new Dictionary<Button, PrimitiveGroup>()
            {
                {SubroutineBtn, PrimitiveGroup.Subroutine},
                {ControlBtn, PrimitiveGroup.Control},
                {DebugBtn, PrimitiveGroup.Debug},
                {MathBtn, PrimitiveGroup.Math},
                {SimBtn, PrimitiveGroup.Sim},
                {ObjectBtn, PrimitiveGroup.Object},
                {LooksBtn, PrimitiveGroup.Looks},
                {PositionBtn, PrimitiveGroup.Position},
                {TSOBtn, PrimitiveGroup.TSO},
                {AllBtn, PrimitiveGroup.All }
            };

            ButtonColors = new Dictionary<PrimitiveGroup, Color>();
            foreach (var btn in ButtonGroups)
            {
                ButtonColors.Add(btn.Value, btn.Key.BackColor);
                btn.Key.Click += PrimGroupChange;
            }

            PrimGroupChange(AllBtn, null);
            EditorCont.OnSelectedChanged += SelectionChanged;
        }
Example #3
0
        public BHAVEditor(BHAV bhav, EditorScope scope)
            : this()
        {
            DebugMode = false;
            MainTable.ColumnStyles[2].SizeType = SizeType.Absolute;
            MainTable.ColumnStyles[2].Width = 0;

            Scope = scope;
            this.bhav = bhav;

            Text = scope.GetFilename(scope.GetScopeFromID(bhav.ChunkID))+"::"+bhav.ChunkLabel;
            EditorControl.InitBHAV(bhav, scope, null, null, SelectionChanged);
            Editor.DisableDebugger += DisableDebugger;

            PrimGroupChange(AllBtn, null);
        }