Five Mouse Buttons

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.

Five Mouse Buttons

Postby belfegor » Sun Oct 29, 2006 5:39 pm

I have five mouse buttons, as i can see in irrlicht i have access to
three of them.
Is this planed in future releases of irrlicht to add two more.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
User avatar
belfegor
 
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Postby JP » Sun Oct 29, 2006 5:48 pm

It probably wouldn't be a good idea to use 5 mouse buttons in your game as most mouses only have 2 or 3 so players of your game could run into difficulties!

But then it would be ok if you allowed the user to configure the controls themselves!
Image Image Image
User avatar
JP
 
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK

Postby belfegor » Sun Oct 29, 2006 5:55 pm

I dont see why it would be a problem.Most games have 5 button support.

But then it would be ok if you allowed the user to configure the controls themselves!


It would be very bad game to make without option to change controls.
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
User avatar
belfegor
 
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Postby bitplane » Sun Oct 29, 2006 7:59 pm

well... you could send niko, hybrid or myself a mouse with 5 buttons :lol:
or you could look at how the usual three buttons are done, make the changes and post a patch for us to include in the next version :)
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
User avatar
bitplane
Admin
 
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England

Postby vitek » Mon Oct 30, 2006 1:57 am

I'm pretty sure the diffs would look something like this for windows. Of course the patch isn't very useful unless it behaves the same on all platforms...

Code: Select all
==================== IEventReceiver.h
45a46,51
>               //! X button 1 was pressed down.
>               EMIE_XBUTTON1_PRESSED_DOWN,
>
>               //! X button 2 was pressed down.
>               EMIE_XBUTTON2_PRESSED_DOWN,
>
54a61,66
>               //! X button 1 was left up.
>               EMIE_XBUTTON1_LEFT_UP,
>
>               //! X button 2 was left up.
>               EMIE_XBUTTON2_LEFT_UP,
>

===================== CIrrDeviceWin32.cpp
71d70
<
182a182,227
> #if (_WIN32_WINNT >= 0x0500)
>       case WM_XBUTTONDOWN:
>               event.EventType = irr::EET_MOUSE_INPUT_EVENT;
>               event.MouseInput.X = LOWORD(lParam);
>               event.MouseInput.Y = HIWORD(lParam);
>
>               switch(GET_XBUTTON_WPARAM(wParam))
>               {
>               case XBUTTON1:
>                       event.MouseInput.Event = irr::EMIE_XBUTTON1_PRESSED_DOWN;
>                       break;
>               case XBUTTON2:
>                       event.MouseInput.Event = irr::EMIE_XBUTTON2_PRESSED_DOWN;
>                       break;
>               default:
>                       return FALSE;
>               }
>
>               dev = getDeviceFromHWnd(hWnd);
>               if (dev)
>                       dev->postEventFromUser(event);
>               return TRUE;
>
>       case WM_XBUTTONUP:
>               event.EventType = irr::EET_MOUSE_INPUT_EVENT;
>               event.MouseInput.X = LOWORD(lParam);
>               event.MouseInput.Y = HIWORD(lParam);
>
>               switch(GET_XBUTTON_WPARAM(wParam))
>               {
>               case XBUTTON1:
>                       event.MouseInput.Event = irr::EMIE_XBUTTON1_LEFT_UP;
>                       break;
>               case XBUTTON2:
>                       event.MouseInput.Event = irr::EMIE_XBUTTON2_LEFT_UP;
>                       break;
>               default:
>                       return FALSE;
>               }
>
>               dev = getDeviceFromHWnd(hWnd);
>               if (dev)
>                       dev->postEventFromUser(event);
>               return TRUE;
> #endif
>
User avatar
vitek
Bug Slayer
 
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Postby belfegor » Mon Oct 30, 2006 2:47 am

Many tanks to you.I must implement this and recompile irrlicht. :D
Small FPS demo made using Irrlicht&NewtonDEMO
InfoHERE
Its at very early stage but i think im crazy enough to finish it all alone.
User avatar
belfegor
 
Posts: 383
Joined: Mon Sep 18, 2006 7:22 pm
Location: Serbia

Postby sgt_pinky » Mon Oct 30, 2006 3:04 am

bitplane, I know about your crappy ball mouse - I think you are fishing in the wrong place for a nice shiny 5 button cordless mouse. :D
Intellectuals solve problems - geniuses prevent them. -- Einstein
#irrlicht on irc.freenode.net
User avatar
sgt_pinky
 
Posts: 149
Joined: Sat Oct 14, 2006 11:20 am
Location: Melbourne, Australia


Return to Beginners Help

Who is online

Users browsing this forum: No registered users and 1 guest