Mouse wheel toggle
This commit is contained in:
@@ -580,7 +580,7 @@ NEWSYM GUIWBAdd, db 25
|
|||||||
|
|
||||||
NEWSYM BlackAndWhite, db 0
|
NEWSYM BlackAndWhite, db 0
|
||||||
|
|
||||||
NEWSYM MouseWheel, db 0
|
NEWSYM MouseWheel, db 1
|
||||||
|
|
||||||
GUIsave equ $-GUIRAdd
|
GUIsave equ $-GUIRAdd
|
||||||
|
|
||||||
|
|||||||
@@ -217,6 +217,8 @@ extern "C" void MinimizeWindow()
|
|||||||
IsMinimized = TRUE;
|
IsMinimized = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" BYTE MouseWheel;
|
||||||
|
|
||||||
BOOL InputRead(void)
|
BOOL InputRead(void)
|
||||||
{
|
{
|
||||||
static PrevZ=0;
|
static PrevZ=0;
|
||||||
@@ -245,27 +247,30 @@ aquireagain:;
|
|||||||
MouseMoveX=dims.lX;
|
MouseMoveX=dims.lX;
|
||||||
MouseMoveY=dims.lY;
|
MouseMoveY=dims.lY;
|
||||||
|
|
||||||
long zDelta = dims.lZ-PrevZ;
|
if (MouseWheel == 1)
|
||||||
if (!dims.lZ) zDelta=0;
|
{
|
||||||
while (zDelta>0){
|
long zDelta = dims.lZ-PrevZ;
|
||||||
zDelta-=40;
|
if (!dims.lZ) zDelta=0;
|
||||||
if (!((CurKeyPos+1==CurKeyReadPos) || ((CurKeyPos+1==16)
|
while (zDelta>0){
|
||||||
&& (CurKeyReadPos==0)))){
|
zDelta-=40;
|
||||||
KeyBuffer[CurKeyPos]=72+256;
|
if (!((CurKeyPos+1==CurKeyReadPos) || ((CurKeyPos+1==16)
|
||||||
CurKeyPos++;
|
&& (CurKeyReadPos==0)))){
|
||||||
if (CurKeyPos==16) CurKeyPos=0;
|
KeyBuffer[CurKeyPos]=72+256;
|
||||||
}
|
CurKeyPos++;
|
||||||
|
if (CurKeyPos==16) CurKeyPos=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (zDelta<0){
|
||||||
|
zDelta+=40;
|
||||||
|
if (!((CurKeyPos+1==CurKeyReadPos) || ((CurKeyPos+1==16)
|
||||||
|
&& (CurKeyReadPos==0)))){
|
||||||
|
KeyBuffer[CurKeyPos]=80+256;
|
||||||
|
CurKeyPos++;
|
||||||
|
if (CurKeyPos==16) CurKeyPos=0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PrevZ=dims.lZ;
|
||||||
}
|
}
|
||||||
while (zDelta<0){
|
|
||||||
zDelta+=40;
|
|
||||||
if (!((CurKeyPos+1==CurKeyReadPos) || ((CurKeyPos+1==16)
|
|
||||||
&& (CurKeyReadPos==0)))){
|
|
||||||
KeyBuffer[CurKeyPos]=80+256;
|
|
||||||
CurKeyPos++;
|
|
||||||
if (CurKeyPos==16) CurKeyPos=0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
PrevZ=dims.lZ;
|
|
||||||
|
|
||||||
MouseButton=(dims.rgbButtons[0]>>7)|(dims.rgbButtons[1]>>6)|(dims.rgbButtons[2]>>5)|(dims.rgbButtons[3]>>4);
|
MouseButton=(dims.rgbButtons[0]>>7)|(dims.rgbButtons[1]>>6)|(dims.rgbButtons[2]>>5)|(dims.rgbButtons[3]>>4);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user