Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1084 for code/trunk/src


Ignore:
Timestamp:
Apr 16, 2008, 9:22:50 PM (16 years ago)
Author:
rgrieder
Message:
  • updated VC++ files for tolua
  • minor CMLs changes
Location:
code/trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/CMakeLists.txt

    r1076 r1084  
    11#get the created files
    22AUX_SOURCE_DIRECTORY(tolua TOLUA_BIND_FILES)
    3 
    4 MESSAGE(STATUS "tolua sources: ${TOLUA_BIND_FILES}")
    53
    64SET( CORE_SRC_FILES
  • code/trunk/src/core/InputManager.cc

    r1066 r1084  
    3939#include "InputHandler.h"
    4040#include "InputBuffer.h"
     41#include "ConsoleCommand.h"
    4142
    4243namespace orxonox
    4344{
     45  ConsoleCommand(InputManager, setInputMode, AccessLevel::Admin, true).setDefaultValue(0, IM_INGAME);
     46
    4447  /**
    4548    @brief Constructor only resets the pointer values to 0.
     
    227230    @remark Only has an affect if the mode actually changes
    228231  */
    229   void InputManager::setInputMode(InputMode mode)
    230   {
    231     this->setMode_ = mode;
     232  void InputManager::setInputMode(int mode)
     233  {
     234    if (mode > 0 && mode < 4)
     235      getSingleton().setMode_ = (InputMode)mode;
    232236  }
    233237
  • code/trunk/src/core/InputManager.h

    r1066 r1084  
    7272    void tick(float dt);
    7373    void setWindowExtents(int width, int height);
    74     void setInputMode(InputMode mode);
    7574    InputMode getInputMode();
    7675
     
    8483    static InputManager& getSingleton();
    8584    static InputManager* getSingletonPtr() { return &getSingleton(); }
     85    static void setInputMode(int mode);
    8686
    8787  private:
  • code/trunk/src/orxonox/Orxonox.cc

    r1066 r1084  
    115115      {
    116116        this->ib_->removeLast();
     117      }
     118      void exit() const
     119      {
     120        CommandExecutor::execute("setInputMode 2");
    117121      }
    118122
     
    405409    ib->registerListener(console, &Testconsole::clear, '§', true);
    406410    ib->registerListener(console, &Testconsole::removeLast, '\b', true);
     411    ib->registerListener(console, &Testconsole::exit, (char)0x1B, true);
    407412
    408413    // first check whether ogre root object has been created
     
    452457      {
    453458        (it)->tick((float)evt.timeSinceLastFrame * this->timefactor_);
    454          it++;
    455      }
     459        it++;
     460      }
    456461
    457462      // don't forget to call _fireFrameStarted in ogre to make sure
  • code/trunk/src/util/CMakeLists.txt

    r1076 r1084  
    11AUX_SOURCE_DIRECTORY(tinyxml TINYXML_SRC_FILES)
    2 AUX_SOURCE_DIRECTORY(tolua   TOLUA_SRC_FILES)
    32
    43SET (UTIL_SRC_FILES
     
    1110  MultiTypeString.cc
    1211  MultiTypeMath.cc
     12  tolua_event.c
     13  tolua_is.c
     14  tolua_map.c
     15  tolua_push.c
     16  tolua_to.c
    1317  ${TINYXML_SRC_FILES}
    14   ${TOLUA_SRC_FILES}
    1518)
    1619
Note: See TracChangeset for help on using the changeset viewer.