YourGameLib
Loading...
Searching...
No Matches
Enumerations | Functions
yourgame::input Namespace Reference

input functions More...

Enumerations

enum  Source {
  KEY_UNKNOWN , KEY_SPACE , KEY_APOSTROPHE , KEY_COMMA ,
  KEY_MINUS , KEY_PERIOD , KEY_SLASH , KEY_0 ,
  KEY_1 , KEY_2 , KEY_3 , KEY_4 ,
  KEY_5 , KEY_6 , KEY_7 , KEY_8 ,
  KEY_9 , KEY_SEMICOLON , KEY_EQUAL , KEY_A ,
  KEY_B , KEY_C , KEY_D , KEY_E ,
  KEY_F , KEY_G , KEY_H , KEY_I ,
  KEY_J , KEY_K , KEY_L , KEY_M ,
  KEY_N , KEY_O , KEY_P , KEY_Q ,
  KEY_R , KEY_S , KEY_T , KEY_U ,
  KEY_V , KEY_W , KEY_X , KEY_Y ,
  KEY_Z , KEY_LEFT_BRACKET , KEY_BACKSLASH , KEY_RIGHT_BRACKET ,
  KEY_GRAVE_ACCENT , KEY_WORLD_1 , KEY_WORLD_2 , KEY_ESCAPE ,
  KEY_ENTER , KEY_TAB , KEY_BACKSPACE , KEY_INSERT ,
  KEY_DELETE , KEY_RIGHT , KEY_LEFT , KEY_DOWN ,
  KEY_UP , KEY_PAGE_UP , KEY_PAGE_DOWN , KEY_HOME ,
  KEY_END , KEY_CAPS_LOCK , KEY_SCROLL_LOCK , KEY_NUM_LOCK ,
  KEY_PRINT_SCREEN , KEY_PAUSE , KEY_F1 , KEY_F2 ,
  KEY_F3 , KEY_F4 , KEY_F5 , KEY_F6 ,
  KEY_F7 , KEY_F8 , KEY_F9 , KEY_F10 ,
  KEY_F11 , KEY_F12 , KEY_F13 , KEY_F14 ,
  KEY_F15 , KEY_F16 , KEY_F17 , KEY_F18 ,
  KEY_F19 , KEY_F20 , KEY_F21 , KEY_F22 ,
  KEY_F23 , KEY_F24 , KEY_F25 , KEY_KP_0 ,
  KEY_KP_1 , KEY_KP_2 , KEY_KP_3 , KEY_KP_4 ,
  KEY_KP_5 , KEY_KP_6 , KEY_KP_7 , KEY_KP_8 ,
  KEY_KP_9 , KEY_KP_DECIMAL , KEY_KP_DIVIDE , KEY_KP_MULTIPLY ,
  KEY_KP_SUBTRACT , KEY_KP_ADD , KEY_KP_ENTER , KEY_KP_EQUAL ,
  KEY_LEFT_SHIFT , KEY_LEFT_CONTROL , KEY_LEFT_ALT , KEY_LEFT_SUPER ,
  KEY_RIGHT_SHIFT , KEY_RIGHT_CONTROL , KEY_RIGHT_ALT , KEY_RIGHT_SUPER ,
  KEY_MENU , MOUSE_X , MOUSE_Y , MOUSE_BUTTON_1 ,
  MOUSE_BUTTON_2 , MOUSE_BUTTON_3 , MOUSE_BUTTON_4 , MOUSE_BUTTON_5 ,
  MOUSE_BUTTON_6 , MOUSE_BUTTON_7 , MOUSE_BUTTON_8 , SCROLL_OFFSET_X ,
  SCROLL_OFFSET_Y , TOUCH_0_DOWN , TOUCH_0_X , TOUCH_0_Y ,
  TOUCH_1_DOWN , TOUCH_1_X , TOUCH_1_Y , TOUCH_2_DOWN ,
  TOUCH_2_X , TOUCH_2_Y , TOUCH_3_DOWN , TOUCH_3_X ,
  TOUCH_3_Y , TOUCH_4_DOWN , TOUCH_4_X , TOUCH_4_Y ,
  TOUCH_5_DOWN , TOUCH_5_X , TOUCH_5_Y , TOUCH_6_DOWN ,
  TOUCH_6_X , TOUCH_6_Y , TOUCH_7_DOWN , TOUCH_7_X ,
  TOUCH_7_Y , TOUCH_8_DOWN , TOUCH_8_X , TOUCH_8_Y ,
  TOUCH_9_DOWN , TOUCH_9_X , TOUCH_9_Y , GAMEPAD_0_CONNECTED ,
  GAMEPAD_0_BUTTON_A , GAMEPAD_0_BUTTON_B , GAMEPAD_0_BUTTON_X , GAMEPAD_0_BUTTON_Y ,
  GAMEPAD_0_BUTTON_LEFT_BUMPER , GAMEPAD_0_BUTTON_RIGHT_BUMPER , GAMEPAD_0_BUTTON_BACK , GAMEPAD_0_BUTTON_START ,
  GAMEPAD_0_BUTTON_GUIDE , GAMEPAD_0_BUTTON_LEFT_THUMB , GAMEPAD_0_BUTTON_RIGHT_THUMB , GAMEPAD_0_BUTTON_DPAD_UP ,
  GAMEPAD_0_BUTTON_DPAD_RIGHT , GAMEPAD_0_BUTTON_DPAD_DOWN , GAMEPAD_0_BUTTON_DPAD_LEFT , GAMEPAD_0_AXIS_LEFT_X ,
  GAMEPAD_0_AXIS_LEFT_Y , GAMEPAD_0_AXIS_RIGHT_X , GAMEPAD_0_AXIS_RIGHT_Y , GAMEPAD_0_AXIS_LEFT_TRIGGER ,
  GAMEPAD_0_AXIS_RIGHT_TRIGGER , GAMEPAD_1_CONNECTED , GAMEPAD_1_BUTTON_A , GAMEPAD_1_BUTTON_B ,
  GAMEPAD_1_BUTTON_X , GAMEPAD_1_BUTTON_Y , GAMEPAD_1_BUTTON_LEFT_BUMPER , GAMEPAD_1_BUTTON_RIGHT_BUMPER ,
  GAMEPAD_1_BUTTON_BACK , GAMEPAD_1_BUTTON_START , GAMEPAD_1_BUTTON_GUIDE , GAMEPAD_1_BUTTON_LEFT_THUMB ,
  GAMEPAD_1_BUTTON_RIGHT_THUMB , GAMEPAD_1_BUTTON_DPAD_UP , GAMEPAD_1_BUTTON_DPAD_RIGHT , GAMEPAD_1_BUTTON_DPAD_DOWN ,
  GAMEPAD_1_BUTTON_DPAD_LEFT , GAMEPAD_1_AXIS_LEFT_X , GAMEPAD_1_AXIS_LEFT_Y , GAMEPAD_1_AXIS_RIGHT_X ,
  GAMEPAD_1_AXIS_RIGHT_Y , GAMEPAD_1_AXIS_LEFT_TRIGGER , GAMEPAD_1_AXIS_RIGHT_TRIGGER , GAMEPAD_2_CONNECTED ,
  GAMEPAD_2_BUTTON_A , GAMEPAD_2_BUTTON_B , GAMEPAD_2_BUTTON_X , GAMEPAD_2_BUTTON_Y ,
  GAMEPAD_2_BUTTON_LEFT_BUMPER , GAMEPAD_2_BUTTON_RIGHT_BUMPER , GAMEPAD_2_BUTTON_BACK , GAMEPAD_2_BUTTON_START ,
  GAMEPAD_2_BUTTON_GUIDE , GAMEPAD_2_BUTTON_LEFT_THUMB , GAMEPAD_2_BUTTON_RIGHT_THUMB , GAMEPAD_2_BUTTON_DPAD_UP ,
  GAMEPAD_2_BUTTON_DPAD_RIGHT , GAMEPAD_2_BUTTON_DPAD_DOWN , GAMEPAD_2_BUTTON_DPAD_LEFT , GAMEPAD_2_AXIS_LEFT_X ,
  GAMEPAD_2_AXIS_LEFT_Y , GAMEPAD_2_AXIS_RIGHT_X , GAMEPAD_2_AXIS_RIGHT_Y , GAMEPAD_2_AXIS_LEFT_TRIGGER ,
  GAMEPAD_2_AXIS_RIGHT_TRIGGER , GAMEPAD_3_CONNECTED , GAMEPAD_3_BUTTON_A , GAMEPAD_3_BUTTON_B ,
  GAMEPAD_3_BUTTON_X , GAMEPAD_3_BUTTON_Y , GAMEPAD_3_BUTTON_LEFT_BUMPER , GAMEPAD_3_BUTTON_RIGHT_BUMPER ,
  GAMEPAD_3_BUTTON_BACK , GAMEPAD_3_BUTTON_START , GAMEPAD_3_BUTTON_GUIDE , GAMEPAD_3_BUTTON_LEFT_THUMB ,
  GAMEPAD_3_BUTTON_RIGHT_THUMB , GAMEPAD_3_BUTTON_DPAD_UP , GAMEPAD_3_BUTTON_DPAD_RIGHT , GAMEPAD_3_BUTTON_DPAD_DOWN ,
  GAMEPAD_3_BUTTON_DPAD_LEFT , GAMEPAD_3_AXIS_LEFT_X , GAMEPAD_3_AXIS_LEFT_Y , GAMEPAD_3_AXIS_RIGHT_X ,
  GAMEPAD_3_AXIS_RIGHT_Y , GAMEPAD_3_AXIS_LEFT_TRIGGER , GAMEPAD_3_AXIS_RIGHT_TRIGGER , WINDOW_WIDTH ,
  WINDOW_WIDTH_INVERSE , WINDOW_HEIGHT , WINDOW_HEIGHT_INVERSE , WINDOW_ASPECT_RATIO ,
  WINDOW_ASPECT_RATIO_INVERSE , WINDOW_FULLSCREEN , POSTPROC_INITIALIZED , FRAMEBUF_WIDTH ,
  FRAMEBUF_WIDTH_INVERSE , FRAMEBUF_HEIGHT , FRAMEBUF_HEIGHT_INVERSE , FRAMEBUF_ASPECT_RATIO ,
  FRAMEBUF_ASPECT_RATIO_INVERSE , FRAMEBUF_MATCHES_WINDOW , VSYNC_ON , MOUSE_CATCHED
}
 identifies the source of an input More...
 

Functions

float get (Source source)
 returns the current value of the input source source
 
int geti (Source source)
 returns the current value of the input source source, rounded to int
 
float getDelta (Source source)
 returns the value delta (current minus last frame value) of the input source source
 

Detailed Description

input functions

Enumeration Type Documentation

◆ Source

identifies the source of an input

Enumerator
KEY_UNKNOWN 
KEY_SPACE 
KEY_APOSTROPHE 
KEY_COMMA 
KEY_MINUS 
KEY_PERIOD 
KEY_SLASH 
KEY_0 
KEY_1 
KEY_2 
KEY_3 
KEY_4 
KEY_5 
KEY_6 
KEY_7 
KEY_8 
KEY_9 
KEY_SEMICOLON 
KEY_EQUAL 
KEY_A 
KEY_B 
KEY_C 
KEY_D 
KEY_E 
KEY_F 
KEY_G 
KEY_H 
KEY_I 
KEY_J 
KEY_K 
KEY_L 
KEY_M 
KEY_N 
KEY_O 
KEY_P 
KEY_Q 
KEY_R 
KEY_S 
KEY_T 
KEY_U 
KEY_V 
KEY_W 
KEY_X 
KEY_Y 
KEY_Z 
KEY_LEFT_BRACKET 
KEY_BACKSLASH 
KEY_RIGHT_BRACKET 
KEY_GRAVE_ACCENT 
KEY_WORLD_1 
KEY_WORLD_2 
KEY_ESCAPE 
KEY_ENTER 
KEY_TAB 
KEY_BACKSPACE 
KEY_INSERT 
KEY_DELETE 
KEY_RIGHT 
KEY_LEFT 
KEY_DOWN 
KEY_UP 
KEY_PAGE_UP 
KEY_PAGE_DOWN 
KEY_HOME 
KEY_END 
KEY_CAPS_LOCK 
KEY_SCROLL_LOCK 
KEY_NUM_LOCK 
KEY_PRINT_SCREEN 
KEY_PAUSE 
KEY_F1 
KEY_F2 
KEY_F3 
KEY_F4 
KEY_F5 
KEY_F6 
KEY_F7 
KEY_F8 
KEY_F9 
KEY_F10 
KEY_F11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_TRIGGER 
GAMEPAD_3_AXIS_RIGHT_TRIGGER 
WINDOW_WIDTH 
WINDOW_WIDTH_INVERSE 
WINDOW_HEIGHT 
WINDOW_HEIGHT_INVERSE 
WINDOW_ASPECT_RATIO 
WINDOW_ASPECT_RATIO_INVERSE 
WINDOW_FULLSCREEN 
POSTPROC_INITIALIZED 
FRAMEBUF_WIDTH 
FRAMEBUF_WIDTH_INVERSE 
FRAMEBUF_HEIGHT 
FRAMEBUF_HEIGHT_INVERSE 
FRAMEBUF_ASPECT_RATIO 
FRAMEBUF_ASPECT_RATIO_INVERSE 
FRAMEBUF_MATCHES_WINDOW 
VSYNC_ON 
MOUSE_CATCHED 

Function Documentation

◆ get()

float yourgame::input::get ( Source  source)

returns the current value of the input source source

◆ getDelta()

float yourgame::input::getDelta ( Source  source)

returns the value delta (current minus last frame value) of the input source source

◆ geti()

int yourgame::input::geti ( Source  source)

returns the current value of the input source source, rounded to int