[AD] set_mouse_speed for X |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Attachment:
diff
Description: Binary data
#include <allegro.h> int callback(void* dp3, int dp2) { int speed = 9 - (dp2 / 10); set_mouse_speed(speed, speed); return D_O_K; } DIALOG the_dialog[] = { /* (dialog proc) (x) (y) (w) (h) (fg)(bg) (key) (flags) (d1) (d2) (dp) (dp2) (dp3) */ { d_clear_proc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, { d_slider_proc, 270, 240, 100, 12, 0, 0, 0, 0, 100, 20, NULL, callback, NULL }, { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } }; int main(void) { allegro_init(); set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); install_keyboard(); install_mouse(); set_dialog_color(the_dialog, makecol(0, 0, 0), makecol(255, 255, 255)); do_dialog(the_dialog, 1); return 0; }
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |