Commit graph

20 commits

Author SHA1 Message Date
Chris Taylor ea454664d0 Draw in response to EVENT_UI_DIALOG_DRAW, uncomment medlisp_update_screen call and use gr_box instead of gr_rect in some places. You can now see what you're doing 2012-03-24 17:18:03 +08:00
Chris Taylor b94d8f127e Remove redundant ui_event_process and duplicate mouse.c in ui/. All editor input is now event-based. 2012-03-18 18:04:16 +08:00
Chris Taylor 6068bf961d All gadgets now send events 2012-03-03 20:12:25 +08:00
Chris Taylor 3121fb4990 Add support for 'modeless' windows - windows that will allow events to be passed on to the underlying window. Intended for the editor 2011-10-09 18:31:44 +08:00
zicodxx 5aa0939b73 Added event types for all input actions; Rewrote kconfig code to work with events; static defined inputs will not trigger kconfig-mapped inputs anymore; Simplified keyboard, mouse and joystick code a lot due to event-based handling; Added function to toggle SDL key repeats on and off; Put timer_update() to event_process; Removed return when event_poll() is idle to get cursor hiding to work again; Added a small delay between cursoe hiding and re-enabling to cursor will not accidentially enable by SDL event centering cursor while hiding 2011-02-02 01:36:43 +01:00
Chris Taylor 2bd3385abd For editor, replace use of ui_mega_process() with event_process(), with the editor's own default event handler; add EVENT_MOUSE_MOVED event with event_mouse_get_delta() accessor; add event_key_get() to replace ugly casting; rename mouse_get_button() with event_mouse_get_button() to keep with name convention; only send idle events when there are no input events so editor still works properly (or the same anyway); add and use event_send() function for input events (including idle) 2011-01-13 12:36:19 +08:00
zicodxx 05236e9c45 Added Sensitivity/Deadzone menu with sliders for each movement based action seperated for joystick and mouse to support all kinds of configuration - regardless the amount of joystick axes and whatnot; SDL_WM_GrabInput does not only capture mouse but also focus keyboard input - changed code to respect this fact and made grabbing a menu option which is enabled by default 2010-12-28 19:11:06 +01:00
zicodxx 842af496ca Added event_flush to take place in game_flush_inputs which will clean SDL events which may be buffered while event_process was suspended; suspend Game_Wind while loading restoring save state while playing a level to properly flush controls and reset timer; when toggeling cursor, also directly modify the mouse to wanted behaviour instead of waiting for mouse_update_cursor_and_grab 2010-07-30 17:59:21 +00:00
kreatordxx 5650b4ce48 Merge d_event and newmenu_event enum's, hopefully fixing compiler warnings in GCC 4.5.0 2010-05-03 08:44:46 +00:00
kreatordxx 76b0fb35ef Get rid of a heap of uses of Function_mode, quit properly (freeing all windows and asking for confirmation for game) when clicking close box 2010-04-04 01:31:48 +00:00
kreatordxx d749889c89 Add a default event handler for screenshots, entering debugger, Redbook repeating etc 2010-04-02 05:01:08 +00:00
kreatordxx 1ff3f56c1c Add EVENT_MOUSE_BUTTON_DOWN and EVENT_MOUSE_BUTTON_UP, use for all windows except game and editor. Fixes crash on iMac G5 when pressing keys to progress through briefing 2010-03-24 07:26:52 +00:00
kreatordxx 999a1b2949 Put LeaveGame longjmp back, but in response to new EVENT_WINDOW_CLOSED, fixing demo issues; fix compiler error in last commit 2010-02-02 07:52:03 +00:00
kreatordxx 9fd714a083 Add EVENT_WINDOW_DEACTIVATED; move many game_flush_inputs, start_time and stop_time calls to game_handler as well as digi_pause_digi_sounds and digi_resume_digi_sounds 2010-02-02 03:38:29 +00:00
kreatordxx 88d1b32914 Add EVENT_WINDOW_ACTIVATED, change EVENT_DRAW to EVENT_WINDOW_DRAW and EVENT_CLOSE to EVENT_WINDOW_CLOSE 2010-01-20 05:10:32 +00:00
kreatordxx b97e08dfdc Add EVENT_NEWMENU_SELECTED, allowing a newmenu/listbox selection to be handled in the callback. Demonstrate with "Select Song" menu 2010-01-08 01:55:12 +00:00
kreatordxx 6b4d952ebc Change newmenu and listbox callback systems, adding use of d_event, for greater flexibility 2010-01-07 14:49:07 +00:00
kreatordxx 7ebcf32e45 Make the automap into a 'window', make kconfig.c more similar between D1X and D2X 2009-12-02 13:49:54 +00:00
kreatordxx 45ba0ca307 Add new window system, not used yet 2009-05-21 12:16:39 +00:00
zicodxx fe98538b2b Cleanung up arch/ a little bit; Added mouse delta time interval for more more accurate reading at high FPS 2008-01-29 14:49:54 +00:00
Renamed from arch/sdl/include/event.h (Browse further)