Last change
on this file since 2700 was
2551,
checked in by patrick, 20 years ago
|
orxonox/trunk: minor changes - enhanced sc controll, fixed uncontrolled rotation effect, added some debug outputs for testing purposes, reformatted some src files from win style but not all
|
File size:
1.1 KB
|
Rev | Line | |
---|
[2066] | 1 | /*! |
---|
| 2 | \file keynames.h |
---|
| 3 | \brief Key/button naming functions |
---|
| 4 | |
---|
[2551] | 5 | Converts strings to SDLK/SDL_BUTTON values and vice versa |
---|
[2141] | 6 | */ |
---|
[2551] | 7 | |
---|
| 8 | #ifdef __WIN32__ |
---|
| 9 | #include <windows.h> |
---|
| 10 | #endif |
---|
| 11 | |
---|
| 12 | #include <SDL/SDL.h> |
---|
| 13 | |
---|
[2141] | 14 | /** |
---|
[2551] | 15 | \brief converts a button name string to a integer representing the corresponding SDL mouse button identifier |
---|
| 16 | \param name: the name of the mouse button |
---|
| 17 | \return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid |
---|
[2141] | 18 | */ |
---|
[2551] | 19 | int buttonname_to_SDLB( char* name); |
---|
| 20 | |
---|
[2141] | 21 | /** |
---|
[2551] | 22 | \brief converst a SDL mouse button identifier to a name string |
---|
| 23 | \param button: an SDL mouse button identifier |
---|
| 24 | \return a pointer to a string containing the name of the mouse button |
---|
[2141] | 25 | */ |
---|
[2551] | 26 | char* SDLB_to_buttonname( int button); |
---|
| 27 | |
---|
| 28 | /** |
---|
| 29 | \brief converts a key name string to a integer representing the corresponding SDLK sym |
---|
| 30 | \param name: the name of the key |
---|
| 31 | \return the SDLK sym of the named key or -1 if the key name is not valid |
---|
| 32 | */ |
---|
| 33 | int keyname_to_SDLK( char* name); |
---|
| 34 | |
---|
| 35 | /** |
---|
| 36 | \brief converts an SDLK sym to a name string |
---|
| 37 | \param key: the SDLK sym |
---|
| 38 | \return a pointer to a string containig the name of the key |
---|
| 39 | */ |
---|
[2066] | 40 | char* SDLK_to_keyname( int key); |
---|
[2551] | 41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.