Beispiel #1
0
        public void InitBHAV(BHAV bhav, EditorScope scope, VMEntity debugEnt, VMStackFrame debugFrame, BHAVPrimSelect callback)
        {
            if (FSOUI == null)
            {
                var mainCont = new UIExternalContainer(1024, 768);
                Editor = new UIBHAVEditor(bhav, scope, debugEnt);
                mainCont.Add(Editor);
                GameFacade.Screens.AddExternal(mainCont);

                SetUI(mainCont);
                Editor.BHAVView.OnSelectedChanged += callback;
            }
            else
            {
                //reuse existing
                lock (FSOUI)
                {
                    Editor.QueueCommand(new ChangeBHAVCommand(bhav, scope, debugFrame, callback));
                }
            }
        }
Beispiel #2
0
        public VarScopeSelect(EditorScope scope, byte source, short data) : this()
        {
            Scope = scope;

            CategorisedScopes = new List <List <ScopeDefinition> >();
            for (int i = 0; i < 5; i++)
            {
                CategorisedScopes.Add(new List <ScopeDefinition>());
            }
            SourceIDToDef = new Dictionary <int, ScopeDefinition>();
            foreach (var def in Definitions)
            {
                if (def.ID == source)
                {
                    SelectedDef = def;
                }
                SourceIDToDef.Add(def.ID, def);
                CategorisedScopes[(int)(def.Group + 1)].Add(def);
            }

            RefreshScopeTree();
            SelectedData = data;
        }