diff --git a/graphics.hpp b/graphics.hpp index e625839..3403737 100644 --- a/graphics.hpp +++ b/graphics.hpp @@ -6,7 +6,6 @@ struct SDL_Surface; struct _TTF_Font; - namespace genv { @@ -79,7 +78,6 @@ class groutput : public canvas public: static groutput& instance(); virtual ~groutput(); - void showmouse(bool toggle); void movemouse(int x, int y); bool open(unsigned width, unsigned height, bool fullscreen=false); @@ -220,10 +218,19 @@ enum button_t { btn_left = 1, btn_middle, btn_right, btn_wheelup, btn_wheeldown }; +enum controller_t{ + jbutton_a=1, jbutton_b, jbutton_x, jbutton_y, jbutton_lb, jbutton_rb, jbutton_back, jbutton_start, jbutton_left_click, jbutton_right_click +}; + +enum hat_t{ +hat_up=1,hat_right,hat_rup,hat_down,hat_rdown=6,hat_left=8,hat_lup,hat_ldown=12 +}; + enum event_type { - ev_key = 1, ev_mouse, ev_timer + ev_key = 1, ev_mouse, ev_timer, controller }; + // Event descriptor struct event { @@ -232,6 +239,10 @@ struct event int button; int time; int type; + int joy_btn; + int move_rx, move_ry, move_lx, move_ly; + int trig_l, trig_r; + int hat; }; @@ -261,4 +272,4 @@ inline grinput& operator >> (grinput& inp, event& ev) } -#endif // GRAPHICS_HPP_INCLUDED +#endif