Panch20 wrote:
> 
> I can catch my mouse click events but I can't seem to catch my mouse
> wheels for some reason. This is my mouse event function:
> // Mouse button events
> bool Time::OnMouseClick(iEvent& ev)
> {
>   // We got a mouse event
>   csMouseEventType MouseEvent = csMouseEventHelper::GetEventType(&ev);
>   // The user clicked a mouse button (once)
>   if (MouseEvent == csMouseEventTypeClick)
>   {
>         // variable for which mouse event
>         uint MouseKey = csMouseEventHelper::GetButton(&ev);
>         // We are in the game world (not a menu)
>        // if (LevelFlag)
>        // {
>               if (MouseKey == csmbLeft)
>               {
>                       player_health++;
>               }
>               if (MouseKey == csmbRight)
>               {
>                       player_health--;
>               }
>               if (MouseKey == csmbMiddle)
>               {
>                       player_health = 0;
>               }
>        // }
>   }
>   if (MouseEvent == csMouseEventTypeDown)
>   {
>         player_health--;
>         uint MouseWheel = csMouseEventHelper::GetButton(&ev);
>         if (MouseWheel == csmbWheelUp)
>               {
>                       player_health++;
>               }
>               if (MouseWheel == csmbWheelDown)
>               {
>                       player_health--;
>               }
>   }
>       return false;
> }
> 
> It is set up to catch clicks but then I don't know how the mouse wheels
> should be handheld. I figured they should be under OnMouseMove and have a
> csMouseEventType of Move but that didn't work. I thought I went through
> all the types and functions but it was a no go.
> 
> Any ideas?
> 

Nevermind, I just caught the if (mouse->GetLastButton(csmbWheelUp)) in
ProcessFrame()

Thanks!
-- 
View this message in context: 
http://www.nabble.com/mouse-wheel--tf4032670.html#a11457845
Sent from the Crystal Space - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to