public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
        {
            if (pguidCmdGroup == SQLiteCommandHandler.guidSQLiteCmdSet)
            {
                switch ((cmdid)nCmdID)
                {
                case cmdid.Triggers:
                    ViewHolder holder = new ViewHolder(_view);
                    _pg.SelectedObject   = holder;
                    _pg.SelectedGridItem = _pg.SelectedGridItem.Parent.GridItems[0];
                    CommitQueryBuilder();
                    TriggerEditor ted = new TriggerEditor(_view);
                    ted.EditValue((ITypeDescriptorContext)_pg.SelectedGridItem, (System.IServiceProvider)_pg.SelectedGridItem, _pg.SelectedGridItem.Value);
                    return(VSConstants.S_OK);
                }
            }


            if (_qbole != null)
            {
                return(_qbole.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut));
            }

            return((int)(Microsoft.VisualStudio.OLE.Interop.Constants.OLECMDERR_E_NOTSUPPORTED));
        }
Example #2
0
    public void OnGUI()
    {
        // First launch
        if (nodes == null)
        {
            nodes         = new List <Node>();
            triggerEditor = new TriggerEditor();
            Node.guiStyle = new GUIStyle {
                fontSize = 15, alignment = TextAnchor.MiddleCenter
            };
            selectedNode = -1;
        }


        if (selectedQuest != null)
        {
            if (nodes.Count == 0)
            {
                Node.LoadNodes(selectedQuest);
                foreach (Node node in nodes)
                {
                    node.CreateConnections();
                }
            }
            DisplayQuestEditor();
        }
        else
        {
            nodes.Clear();
            DisplayQuests();
        }
    }
Example #3
0
    public static void ShowWindow()
    {
        GetWindow <QuestEditor>().Show();

        nodes         = new List <Node>();
        triggerEditor = new TriggerEditor();
        Node.guiStyle = new GUIStyle {
            fontSize = 15, alignment = TextAnchor.MiddleCenter
        };
        selectedNode = -1;
    }
Example #4
0
        public TrigEditPlus(MapEditor mapEditor, TriggerEditor triggerEditor)
        {
            InitializeComponent();

            this.mapEditor     = mapEditor;
            this.triggerEditor = triggerEditor;
            this.IsTrigger     = true;
            //Title = mapEditor.mapdata.FilePath;

            StringBuilder stringBuilder = new StringBuilder();

            for (int i = 0; i < mapEditor.mapdata.Triggers.Count; i++)
            {
                mapEditor.mapdata.Triggers[i].GetTEPText(stringBuilder);
            }


            CodeEditor.Text = stringBuilder.ToString();
        }
    public void OnSceneGUI()
    {
        VmodMonkeMapLoader.Behaviours.MapDescriptor targetDescriptor = (VmodMonkeMapLoader.Behaviours.MapDescriptor)target;
        GameObject gameObject = targetDescriptor.gameObject;

        Handles.BeginGUI();
        GUILayout.BeginVertical(MapDescriptorConfig.textStyle, GUILayout.Width(MapDescriptorConfig.guiWidth));

        GUILayout.Label(targetDescriptor.MapName, EditorStyles.boldLabel);

        MapDescriptorConfig.DisplayTeleporters     = GUILayout.Toggle(MapDescriptorConfig.DisplayTeleporters, "Display Teleporters");
        MapDescriptorConfig.DisplaySpawnPoints     = GUILayout.Toggle(MapDescriptorConfig.DisplaySpawnPoints, "Display Spawn Points");
        MapDescriptorConfig.DisplayTagZones        = GUILayout.Toggle(MapDescriptorConfig.DisplayTagZones, "Display Tag Zones");
        MapDescriptorConfig.DisplayObjectTriggers  = GUILayout.Toggle(MapDescriptorConfig.DisplayObjectTriggers, "Display Object Triggers");
        MapDescriptorConfig.DisplaySurfaceSettings = GUILayout.Toggle(MapDescriptorConfig.DisplaySurfaceSettings, "Display Surface Settings");
        MapDescriptorConfig.DisplayRoundEndActions = GUILayout.Toggle(MapDescriptorConfig.DisplayRoundEndActions, "Display Round End Action Objects");

        GUILayout.Space(5.0f);
        MapDescriptorConfig.DisplayNames = GUILayout.Toggle(MapDescriptorConfig.DisplayNames, "Display Object Names");

        GUILayout.EndVertical();
        Handles.EndGUI();

        if (MapDescriptorConfig.DisplaySpawnPoints)
        {
            targetDescriptor.SpawnPoints = GetAllSpawnPoints(gameObject).ToArray();
            foreach (var point in targetDescriptor.SpawnPoints)
            {
                DrawSpawnPoint(point);
            }
        }

        if (MapDescriptorConfig.DisplayTeleporters)
        {
            foreach (var tele in gameObject.GetComponentsInChildren <VmodMonkeMapLoader.Behaviours.Teleporter>(true))
            {
                TeleporterEditor.DrawTeleport(tele);
            }
        }

        if (MapDescriptorConfig.DisplayTagZones)
        {
            foreach (var zone in gameObject.GetComponentsInChildren <VmodMonkeMapLoader.Behaviours.TagZone>(true))
            {
                TagZoneEditor.DrawTagZone(zone);
            }
        }

        if (MapDescriptorConfig.DisplayObjectTriggers)
        {
            foreach (var trigger in gameObject.GetComponentsInChildren <VmodMonkeMapLoader.Behaviours.ObjectTrigger>(true))
            {
                TriggerEditor.DrawTrigger(trigger);
            }
        }

        if (MapDescriptorConfig.DisplaySurfaceSettings)
        {
            foreach (var surface in gameObject.GetComponentsInChildren <VmodMonkeMapLoader.Behaviours.SurfaceClimbSettings>(true))
            {
                SurfaceClimbSettingsEditor.DrawSurface(surface);
            }
        }

        if (MapDescriptorConfig.DisplayRoundEndActions)
        {
            foreach (var roundEndActions in gameObject.GetComponentsInChildren <VmodMonkeMapLoader.Behaviours.RoundEndActions>(true))
            {
                RoundEndActionsEditor.DrawRoundEnd(roundEndActions);
            }
        }
    }