コード例 #1
0
        }   // end of Render()

        #endregion Public

        #region Internal

        private void SetUpMenus()
        {
            //
            // GroundMenu
            //

            groundMenu.DeleteAll();
            groundMenu.AddText(Strings.Localize("mouseEdit.addNodePlain"));
            groundMenu.AddText(Strings.Localize("mouseEdit.addNodeWall"));
            groundMenu.AddText(Strings.Localize("mouseEdit.addNodeRoad"));
            groundMenu.AddText(Strings.Localize("mouseEdit.addNodeFlora"));
            groundMenu.OnSelect = GroundOnSelect;
            groundMenu.OnCancel = OnCancel;

            //
            // NodeMenu
            //

            nodeMenu.DeleteAll();

            //add more is not supported in this fashion when in touch mode - instead, just use add mode, select the starting point, and then start
            //adding
            if (GamePadInput.ActiveMode != GamePadInput.InputMode.Touch)
            {
                nodeMenu.AddText(Strings.Localize("mouseEdit.addMore"));
            }

            nodeMenu.AddText(Strings.Localize("mouseEdit.height"));
            if (mouseOver.ActOnPath)
            {
                nodeMenu.AddText(Strings.Localize("mouseEdit.rotate"));
            }
            nodeMenu.AddText(Strings.Localize("mouseEdit.type"));
            nodeMenu.AddText(Strings.Localize("mouseEdit.delete"));
            nodeMenu.OnSelect = NodeOnSelect;
            nodeMenu.OnCancel = OnCancel;

            //
            // EdgeMenu
            //

            edgeMenu.DeleteAll();
            edgeMenu.AddText(Strings.Localize("mouseEdit.directions"));
            edgeMenu.AddText(Strings.Localize("mouseEdit.split"));
            edgeMenu.AddText(Strings.Localize("mouseEdit.delete"));
            edgeMenu.OnSelect = EdgeOnSelect;
            edgeMenu.OnCancel = OnCancel;
        }   // end of SetUpMenus();
コード例 #2
0
        }   // end of Render()

        #endregion Public

        #region Internal

        private void SetUpMenus()
        {
            //
            // NoActorMenu
            //

            noActorMenu.DeleteAll();
            noActorMenu.AddText(Strings.Localize("mouseEdit.addObject"));
            noActorMenu.AddText(Strings.Localize("mouseEdit.worldTweak"));
            // TODO (mouse) Only if paste buffer contains something.  Note this means calling SetUpMenus if this changes.
            // Also: Try and get bot's name and tack it on to the end of the paste.

            pasteMenuString = Strings.Localize("mouseEdit.paste");
            GameActor actor = inGame.editObjectUpdateObj.CutPasteObject as GameActor;

            if (actor == null)
            {
                pasteMenuString += " (" + Strings.Localize("mouseEdit.empty") + ")";
            }
            else
            {
                pasteMenuString += " (" + actor.DisplayNameNumber + ")";
            }

            noActorMenu.AddText(pasteMenuString);
            noActorMenu.OnSelect = NoActorOnSelect;
            noActorMenu.OnCancel = OnCancel;

            //
            // ActorMenu
            //

            actorMenu.DeleteAll();
            actorMenu.AddText(Strings.Localize("mouseEdit.program"));
            actorMenu.AddText(Strings.Localize("mouseEdit.objectTweak"));
            actorMenu.AddText(Strings.Localize("mouseEdit.rename"));
            actorMenu.AddText(Strings.Localize("mouseEdit.cut"));
            actorMenu.AddText(Strings.Localize("mouseEdit.copy"));
            actorMenu.AddText(Strings.Localize("mouseEdit.size"));
            actorMenu.AddText(Strings.Localize("mouseEdit.rotate"));
            actorMenu.AddText(Strings.Localize("mouseEdit.height"));
            actorMenu.OnSelect = ActorOnSelect;
            actorMenu.OnCancel = OnCancel;
        }   // end of SetUpMenus();