Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 19, 2008, 8:12:15 PM (16 years ago)
Author:
rgrieder
Message:
  • Changed static Executor/Functor in ConsoleCommand to generic one that enables console commands for member functions. (This is more of a temporary solution, but can be made permanent with right adjustments)
  • The whole GameState thing seems to works so far. But I there's only standalone mode at the moment
  • Console now shows in GUI too. I will have to implement a master InputState in the InputManager (little bit of a break with the concept, but probably necessary)
Location:
code/branches/gui/src/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/core/ConsoleCommand.cc

    r1505 r1662  
    3131namespace orxonox
    3232{
    33     ConsoleCommand::ConsoleCommand(FunctorStatic* functor, const std::string& name) : ExecutorStatic(functor, name)
     33    ConsoleCommand::ConsoleCommand(Functor* functor, const std::string& name) : Executor(functor, name)
    3434    {
    3535        this->accessLevel_ = AccessLevel::None;
  • code/branches/gui/src/core/ConsoleCommand.h

    r1549 r1662  
    7070    }
    7171
    72     class _CoreExport ConsoleCommand : public ExecutorStatic
     72    class _CoreExport ConsoleCommand : public Executor
    7373    {
    7474        public:
    75             ConsoleCommand(FunctorStatic* functor, const std::string& name = "");
     75            ConsoleCommand(Functor* functor, const std::string& name = "");
    7676
    7777            inline ConsoleCommand& setDescription(const std::string& description)
    78                 { this->ExecutorStatic::setDescription(description); return (*this); }
     78                { this->Executor::setDescription(description); return (*this); }
    7979            inline ConsoleCommand& setDescriptionParam(int param, const std::string& description)
    80                 { this->ExecutorStatic::setDescriptionParam(param, description); return (*this); }
     80                { this->Executor::setDescriptionParam(param, description); return (*this); }
    8181            inline ConsoleCommand& setDescriptionReturnvalue(const std::string& description)
    82                 { this->ExecutorStatic::setDescriptionReturnvalue(description); return (*this); }
     82                { this->Executor::setDescriptionReturnvalue(description); return (*this); }
    8383            inline ConsoleCommand& setDefaultValues(const MultiTypeMath& param1)
    84                 { this->ExecutorStatic::setDefaultValues(param1); return (*this); }
     84                { this->Executor::setDefaultValues(param1); return (*this); }
    8585            inline ConsoleCommand& setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2)
    86                 { this->ExecutorStatic::setDefaultValues(param1, param2); return (*this); }
     86                { this->Executor::setDefaultValues(param1, param2); return (*this); }
    8787            inline ConsoleCommand& setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3)
    88                 { this->ExecutorStatic::setDefaultValues(param1, param2, param3); return (*this); }
     88                { this->Executor::setDefaultValues(param1, param2, param3); return (*this); }
    8989            inline ConsoleCommand& setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4)
    90                 { this->ExecutorStatic::setDefaultValues(param1, param2, param3, param4); return (*this); }
     90                { this->Executor::setDefaultValues(param1, param2, param3, param4); return (*this); }
    9191            inline ConsoleCommand& setDefaultValues(const MultiTypeMath& param1, const MultiTypeMath& param2, const MultiTypeMath& param3, const MultiTypeMath& param4, const MultiTypeMath& param5)
    92                 { this->ExecutorStatic::setDefaultValues(param1, param2, param3, param4, param5); return (*this); }
     92                { this->Executor::setDefaultValues(param1, param2, param3, param4, param5); return (*this); }
    9393            inline ConsoleCommand& setDefaultValue(unsigned int index, const MultiTypeMath& param)
    94                 { this->ExecutorStatic::setDefaultValue(index, param); return (*this); }
     94                { this->Executor::setDefaultValue(index, param); return (*this); }
    9595
    9696            inline ConsoleCommand& setAccessLevel(AccessLevel::Level level)
     
    135135    };
    136136
    137     inline ConsoleCommand* createConsoleCommand(FunctorStatic* functor, const std::string& name = "")
     137    inline ConsoleCommand* createConsoleCommand(Functor* functor, const std::string& name = "")
    138138    {
    139139        return new ConsoleCommand(functor, name);
Note: See TracChangeset for help on using the changeset viewer.