コード例 #1
0
        static void AddTumbleStyleCommand(string commandName, TumbleBase tumbler)
        {
            tumblers.Add(commandName, tumbler);
            Command command = Command.Create(commandName);

            //		command.Tag = tumbler;
            command.Text       = "Change Tumble Style";
            command.Executing += TumbleStyle_Executing;
        }
コード例 #2
0
        public static void Initialize()
        {
            Command command;

            command            = Command.Create(tumbleCommandName);
            command.Text       = "Tumble";
            command.Hint       = "Tumble my part on screen for the general viewing pleasure of all";
            command.Executing += Tumble_Executing;
            command.Updating  += Tumble_Updating;

            command      = Command.Create(tumbleSpeedCommandName);
            command.Text = "Set Tumble Speed";
            command.Hint = "Change the tumble speed to a specific RPM";

            foreach (string tumbleSpeedCommandNameSuffix in tumbleSpeedCommandNameSuffices)
            {
                command            = Command.Create(tumbleSpeedCommandName + tumbleSpeedCommandNameSuffix);
                command.Hint       = "Sets the tumble speed, in RPM";
                command.Executing += TumbleSpeed_Executing;
            }
            tumbleSpeed = 5;

            command      = Command.Create(tumbleStylesCommandName);
            command.Hint = "Sets the tumble style";

            AddTumbleStyleCommand(tumbleStyleSpinYCommandName, activeTumbler   = new SpinYTumbler(tumbleSpeed, tumbleIsCenteredOnSelection));
            AddTumbleStyleCommand(tumbleStyleSpinY30CommandName, activeTumbler = new SpinY30Tumbler(tumbleSpeed, tumbleIsCenteredOnSelection));
            AddTumbleStyleCommand(tumbleStyleGazeCommandName, new GazeTumbler(tumbleSpeed, tumbleIsCenteredOnSelection));
            AddTumbleStyleCommand(tumbleStyleFreeFallCommandName, new FreeFallTumbler(tumbleSpeed, tumbleIsCenteredOnSelection));
            AddTumbleStyleCommand(tumbleStyleDizzyCommandName, new DizzyTumbler(tumbleSpeed, tumbleIsCenteredOnSelection));
            activeTumbler = tumblers[tumbleStyleSpinYCommandName];

            command            = Command.Create(tumbleColorsCommandName);
            command.Text       = "Tumble Colors";
            command.Hint       = "Changes the colors during tumbling.  Will permanately recolor your world.  You have been warned.";
            command.Executing += TumbleColors_Executing;
            command.Updating  += TumbleColors_Updating;

            command            = Command.Create(tumbleAboutCenterCommandName);
            command.Text       = "Use Selection Center";
            command.Hint       = "Spin about the center of the selection.";
            command.Executing += TumbleAboutCenter_Executing;
            command.Updating  += TumbleAboutCenter_Updating;

            command            = Command.Create(tumbleSaveImagesCommandName);
            command.Text       = "Save Images";
            command.Hint       = "Save an image in your temp directory for every frame.  Slows speed by 1/4.  Should be working even if SpaceClaim appears unresponsive.";
            command.Executing += TumbleSaveImages_Executing;
            command.Updating  += TumbleSaveImages_Updating;
        }