mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 19:20:46 +00:00
Mouse wheel support for the game menus
git-svn-id: https://svn.eduke32.com/eduke32@408 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7e405214c5
commit
d0f96d6c86
1 changed files with 5 additions and 5 deletions
|
@ -87,6 +87,8 @@ void savetemp(char *fn,long daptr,long dasiz)
|
||||||
|
|
||||||
#define LMB (buttonstat&1)
|
#define LMB (buttonstat&1)
|
||||||
#define RMB (buttonstat&2)
|
#define RMB (buttonstat&2)
|
||||||
|
#define WHEELDN (buttonstat&16)
|
||||||
|
#define WHEELUP (buttonstat&32)
|
||||||
|
|
||||||
ControlInfo minfo;
|
ControlInfo minfo;
|
||||||
|
|
||||||
|
@ -107,10 +109,9 @@ static int probe_(int type,int x,int y,int i,int n)
|
||||||
centre = 320>>2;
|
centre = 320>>2;
|
||||||
else centre = 0;
|
else centre = 0;
|
||||||
|
|
||||||
if (!buttonstat)
|
if (!buttonstat || WHEELUP || WHEELDN)
|
||||||
{
|
{
|
||||||
if (KB_KeyPressed(sc_UpArrow) || KB_KeyPressed(sc_PgUp) || KB_KeyPressed(sc_kpad_8) ||
|
if (KB_KeyPressed(sc_UpArrow) || KB_KeyPressed(sc_PgUp) || KB_KeyPressed(sc_kpad_8) || mi < -8192 || WHEELUP)
|
||||||
mi < -8192)
|
|
||||||
{
|
{
|
||||||
mi = 0;
|
mi = 0;
|
||||||
KB_ClearKeyDown(sc_UpArrow);
|
KB_ClearKeyDown(sc_UpArrow);
|
||||||
|
@ -122,8 +123,7 @@ static int probe_(int type,int x,int y,int i,int n)
|
||||||
if (probey < 0) probey = n-1;
|
if (probey < 0) probey = n-1;
|
||||||
minfo.dz = 0;
|
minfo.dz = 0;
|
||||||
}
|
}
|
||||||
if (KB_KeyPressed(sc_DownArrow) || KB_KeyPressed(sc_PgDn) || KB_KeyPressed(sc_kpad_2)
|
if (KB_KeyPressed(sc_DownArrow) || KB_KeyPressed(sc_PgDn) || KB_KeyPressed(sc_kpad_2) || mi > 8192 || WHEELDN)
|
||||||
|| mi > 8192)
|
|
||||||
{
|
{
|
||||||
mi = 0;
|
mi = 0;
|
||||||
KB_ClearKeyDown(sc_DownArrow);
|
KB_ClearKeyDown(sc_DownArrow);
|
||||||
|
|
Loading…
Reference in a new issue