|
|
@ -32,7 +32,6 @@ static enum VGUI_KeyCode s_pVirtualKeyTrans[256]; |
|
|
|
static enum VGUI_DefaultCursor s_currentCursor; |
|
|
|
static enum VGUI_DefaultCursor s_currentCursor; |
|
|
|
#ifdef XASH_SDL |
|
|
|
#ifdef XASH_SDL |
|
|
|
#include <SDL_events.h> |
|
|
|
#include <SDL_events.h> |
|
|
|
#include "platform/sdl/events.h" |
|
|
|
|
|
|
|
static SDL_Cursor* s_pDefaultCursor[20]; |
|
|
|
static SDL_Cursor* s_pDefaultCursor[20]; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
static void *s_pVGuiSupport; // vgui_support library
|
|
|
|
static void *s_pVGuiSupport; // vgui_support library
|
|
|
@ -161,9 +160,8 @@ void GAME_EXPORT VGUI_SetVisible( qboolean state ) |
|
|
|
SDL_ShowCursor( state ); |
|
|
|
SDL_ShowCursor( state ); |
|
|
|
if( !state ) |
|
|
|
if( !state ) |
|
|
|
SDL_GetRelativeMouseState( NULL, NULL ); |
|
|
|
SDL_GetRelativeMouseState( NULL, NULL ); |
|
|
|
|
|
|
|
|
|
|
|
SDLash_EnableTextInput( state, true ); |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
Key_EnableTextInput( state, true ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int GAME_EXPORT VGUI_UtfProcessChar( int in ) |
|
|
|
int GAME_EXPORT VGUI_UtfProcessChar( int in ) |
|
|
@ -491,21 +489,19 @@ void VGui_KeyEvent( int key, int down ) |
|
|
|
if( !vgui.initialized ) |
|
|
|
if( !vgui.initialized ) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
#ifdef XASH_SDL |
|
|
|
|
|
|
|
if( host.mouse_visible ) |
|
|
|
if( host.mouse_visible ) |
|
|
|
SDLash_EnableTextInput( 1, false ); |
|
|
|
Key_EnableTextInput( true, false ); |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch( key ) |
|
|
|
switch( key ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case K_MOUSE1: |
|
|
|
case K_MOUSE1: |
|
|
|
vgui.Mouse( down?MA_PRESSED:MA_RELEASED, MOUSE_LEFT ); |
|
|
|
vgui.Mouse( down ? MA_PRESSED : MA_RELEASED, MOUSE_LEFT ); |
|
|
|
return; |
|
|
|
return; |
|
|
|
case K_MOUSE2: |
|
|
|
case K_MOUSE2: |
|
|
|
vgui.Mouse( down?MA_PRESSED:MA_RELEASED, MOUSE_RIGHT ); |
|
|
|
vgui.Mouse( down ? MA_PRESSED : MA_RELEASED, MOUSE_RIGHT ); |
|
|
|
return; |
|
|
|
return; |
|
|
|
case K_MOUSE3: |
|
|
|
case K_MOUSE3: |
|
|
|
vgui.Mouse( down?MA_PRESSED:MA_RELEASED, MOUSE_MIDDLE ); |
|
|
|
vgui.Mouse( down ? MA_PRESSED : MA_RELEASED, MOUSE_MIDDLE ); |
|
|
|
return; |
|
|
|
return; |
|
|
|
case K_MWHEELDOWN: |
|
|
|
case K_MWHEELDOWN: |
|
|
|
vgui.Mouse( MA_WHEEL, 1 ); |
|
|
|
vgui.Mouse( MA_WHEEL, 1 ); |
|
|
|