# Conflicts:
#	src/r_main.cpp
#	src/r_plane.cpp
#	src/r_things.cpp
This commit is contained in:
Rachael Alexanderson 2017-02-15 05:42:57 -05:00
commit 2b8db72cef
37 changed files with 1967 additions and 15 deletions

View file

@ -47,6 +47,7 @@
#include "doomdef.h"
#include "doomstat.h"
#include "v_video.h"
#include "events.h"
#undef Class
@ -94,6 +95,10 @@ void CheckGUICapture()
? (c_down == ConsoleState || c_falling == ConsoleState || chatmodeon)
: (MENU_On == menuactive || MENU_OnNoPause == menuactive);
// [ZZ] check active event handlers that want the UI processing
if (!wantCapture && E_CheckUiProcessors())
wantCapture = true;
if (wantCapture != GUICapture)
{
GUICapture = wantCapture;
@ -181,6 +186,9 @@ void CheckNativeMouse()
&& (MENU_On == menuactive || MENU_OnNoPause == menuactive);
}
if (!wantNative && E_CheckRequireMouse())
wantNative = true;
I_SetNativeMouse(wantNative);
}

View file

@ -17,6 +17,7 @@
#include "dikeys.h"
#include "templates.h"
#include "s_sound.h"
#include "events.h"
static void I_CheckGUICapture ();
static void I_CheckNativeMouse ();
@ -154,6 +155,10 @@ static void I_CheckGUICapture ()
wantCapt = (menuactive == MENU_On || menuactive == MENU_OnNoPause);
}
// [ZZ] check active event handlers that want the UI processing
if (!wantCapt && E_CheckUiProcessors())
wantCapt = true;
if (wantCapt != GUICapture)
{
GUICapture = wantCapt;
@ -331,6 +336,12 @@ void MessagePump (const SDL_Event &sev)
event.subtype = sev.type == SDL_MOUSEBUTTONDOWN ? EV_GUI_LButtonDown : EV_GUI_LButtonUp;
event.subtype += (sev.button.button - 1) * 3;
}
SDL_Keymod kmod = SDL_GetModState();
event.data3 = ((kmod & KMOD_SHIFT) ? GKM_SHIFT : 0) |
((kmod & KMOD_CTRL) ? GKM_CTRL : 0) |
((kmod & KMOD_ALT) ? GKM_ALT : 0);
D_PostEvent(&event);
}
break;
@ -340,6 +351,10 @@ void MessagePump (const SDL_Event &sev)
{
event.type = EV_GUI_Event;
event.subtype = sev.wheel.y > 0 ? EV_GUI_WheelUp : EV_GUI_WheelDown;
SDL_Keymod kmod = SDL_GetModState();
event.data3 = ((kmod & KMOD_SHIFT) ? GKM_SHIFT : 0) |
((kmod & KMOD_CTRL) ? GKM_CTRL : 0) |
((kmod & KMOD_ALT) ? GKM_ALT : 0);
D_PostEvent (&event);
}
else