Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 26, 2010, 12:09:12 AM (14 years ago)
Author:
landauf
Message:

adapted all console commands to the new interface

Location:
code/branches/consolecommands3/src/modules
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/modules/designtools/ScreenshotManager.cc

    r7207 r7219  
    2020{
    2121    ManageScopedSingleton(ScreenshotManager, ScopeID::Graphics, false);
    22     SetConsoleCommandAlias(ScreenshotManager, makeScreenshot_s, "printScreenHD", true);
     22    _SetConsoleCommand("printScreenHD", &ScreenshotManager::makeScreenshot_s);
    2323
    2424    ScreenshotManager::ScreenshotManager()
  • code/branches/consolecommands3/src/modules/designtools/SkyboxGenerator.cc

    r7207 r7219  
    5050{
    5151
    52     SetConsoleCommand(SkyboxGenerator, createSkybox, true);
     52    _SetConsoleCommand("SkyboxGenerator", "createSkybox", &SkyboxGenerator::createSkybox).addShortcut();
    5353
    5454    ManageScopedSingleton(SkyboxGenerator, ScopeID::Graphics, false);
     
    7979            if(!this->captionsRemoved_)
    8080            {
    81                 CommandExecutor::execute("setGametypeStatus false");
     81                CommandExecutor::execute("GametypeStatus displayCaption false");
    8282                this->captionsRemoved_ = true;
    8383                return;
     
    145145                takeScreenshot_ = false;
    146146                CommandExecutor::execute("pause");
    147                 CommandExecutor::execute("setGametypeStatus true");
     147                CommandExecutor::execute("GametypeStatus displayCaption true");
    148148                this->captionsRemoved_ = false;
    149149            }
  • code/branches/consolecommands3/src/modules/objects/triggers/Trigger.cc

    r7204 r7219  
    3838{
    3939
    40   SetConsoleCommand(Trigger, debugFlares, false).defaultValues(false);
     40  _SetConsoleCommand("Trigger", "debugFlares", &Trigger::debugFlares).defaultValues(false);
    4141
    4242  CreateFactory(Trigger);
  • code/branches/consolecommands3/src/modules/overlays/hud/GametypeStatus.cc

    r7204 r7219  
    4141    CreateFactory(GametypeStatus);
    4242
    43     /*static*/ bool GametypeStatus::noCaption_s = false;
    44     SetConsoleCommand(GametypeStatus, setGametypeStatus, true);
     43    static const std::string __CC_GametypeStatus_name = "GametypeStatus";
     44    static const std::string __CC_displayCaption_name = "displayCaption";
     45
     46    _SetConsoleCommand(__CC_GametypeStatus_name, __CC_displayCaption_name, &GametypeStatus::setDisplayCaption);
    4547
    4648    GametypeStatus::GametypeStatus(BaseObject* creator) : OverlayText(creator)
     
    4951
    5052        this->owner_ = 0;
     53        this->bNoCaption_ = false;
     54
     55        _ModifyConsoleCommand(__CC_GametypeStatus_name, __CC_displayCaption_name).setObject(this);
    5156    }
    5257
    5358    GametypeStatus::~GametypeStatus()
    5459    {
     60        _ModifyConsoleCommand(__CC_GametypeStatus_name, __CC_displayCaption_name).setObject(0);
    5561    }
    5662
     
    6470            ControllableEntity* ce = this->owner_->getControllableEntity();
    6571
    66             if(GametypeStatus::noCaption_s) // No captions are displayed.
     72            if (this->bNoCaption_) // No captions are displayed.
    6773            {
    6874                this->setCaption("");
     
    105111        If true captions are displayed, if false, not.
    106112    */
    107     /*static*/ void GametypeStatus::setGametypeStatus(bool bValue)
     113    void GametypeStatus::setDisplayCaption(bool bValue)
    108114    {
    109         GametypeStatus::noCaption_s = !bValue;
     115        this->bNoCaption_ = !bValue;
    110116    }
    111117
  • code/branches/consolecommands3/src/modules/overlays/hud/GametypeStatus.h

    r7163 r7219  
    4646            virtual void changedOwner();
    4747
    48             static void setGametypeStatus(bool bValue); //!< Toggles whether the gametype status is displayed.
     48            void setDisplayCaption(bool bValue); //!< Toggles whether the gametype status is displayed.
    4949
    5050        private:
    5151            PlayerInfo* owner_;
    52             static bool noCaption_s;
     52            bool bNoCaption_;
    5353
    5454    };
Note: See TracChangeset for help on using the changeset viewer.