Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4352 in orxonox.OLD for orxonox/trunk/src/util/event/event_handler.h


Ignore:
Timestamp:
May 28, 2005, 12:56:01 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: reimplemented the key binding function, kept most of the stuff since it seems very helpful

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/event/event_handler.h

    r4350 r4352  
    99
    1010#include "base_object.h"
     11#include "event_def.h"
    1112
    1213class EventListener;
    1314template<class T> class tList;
     15
     16
     17#define N_STD_KEYS SDLK_LAST
     18#define N_BUTTONS 6
     19#define DEFAULT_KEYBIND_FILE "~/.orxonox/orxonox.conf"
    1420
    1521typedef enum elState
     
    2127    ES_NUMBER,
    2228  };
     29
     30//! Key aliasing structure
     31/**
     32   This structure contains the key aliasing information, e.g. the command strings that
     33   have been bound to the keys.
     34*/
     35typedef struct
     36{
     37  char keys[N_STD_KEYS][CMD_LENGHT];
     38  char buttons[N_BUTTONS][CMD_LENGHT];
     39} KeyBindings;
    2340
    2441
     
    3956
    4057  void tick(float t);
     58  void process();
    4159
    4260 private:
    4361  EventHandler(void);
     62
    4463  static EventHandler* singletonRef;
    4564
    46   EventListener** listeners;                         //!< a list of registered listeners
     65  KeyBindings* keyAliases;
     66  EventListener*** listeners;                         //!< a list of registered listeners
    4767 
    4868};
Note: See TracChangeset for help on using the changeset viewer.