Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/event/key_names.h @ 5493

Last change on this file since 5493 was 5474, checked in by patrick, 19 years ago

orxonox/lib/event: fixed the mouse button bug

File size: 1.2 KB
RevLine 
[4398]1/*!
[5039]2 * @file keynames.h
[4836]3  *  Key/button naming functions
[4780]4
5                Converts strings to SDLK/SDL_BUTTON values and vice versa
[4398]6*/
7#ifndef _KEY_NAMES_H
8#define _KEY_NAMES_H
9
10/**
[4836]11      *  converts a button name string to a integer representing the corresponding SDL mouse button identifier
12      * @param name: the name of the mouse button
13      * @return an int containing the SDL identifier of the mouse button or -1 if the button name is not valid
[4398]14*/
[4780]15int buttonnameToSDLB(const char* name);
[4398]16
17/**
[4836]18      *  converst a SDL mouse button identifier to a name string
19      * @param button: an SDL mouse button identifier
20      * @return a pointer to a string containing the name of the mouse button
[4398]21*/
[5474]22const char* SDLBToButtonname( int button);
[4398]23
24/**
[4836]25      *  converts a key name string to a integer representing the corresponding SDLK sym
26      * @param name: the name of the key
27      * @return the SDLK sym of the named key or -1 if the key name is not valid
[4398]28*/
[4780]29int keynameToSDLK(const char* name);
[4398]30
31/**
[4836]32      *  converts an SDLK sym to a name string
33      * @param key: the SDLK sym
34      * @return a pointer to a string containig the name of the key
[4398]35*/
[5474]36const char* SDLKToKeyname( int key);
[4398]37
38
39#endif /* _KEY_NAMES_H */
Note: See TracBrowser for help on using the repository browser.