|
Allegro mouse left right and middle exist ? |
faustf
Member #23,511
September 2022
|
Hi guys is possible discern if i click mouse left or mouse right or middle mouse in Allegro ?? thanks |
torhu
Member #2,727
September 2002
|
Yes, both with events and polling. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
https://liballeg.org/a5docs/trunk/events.html#allegro_event_mouse_button_down Buttons number from 1 to #. I think 2 is RMB and 3 is MMB. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
faustf
Member #23,511
September 2022
|
thanks for rply sorry i am very newbie you have some example for do that easy example thanks somuch |
DanielH
Member #934
January 2001
|
Did you RTFM? Just kidding. Question: Allegro 4 or 5? Assuming 5. Check your events. If a button was pressed, you'll get this event triggered. ALLEGRO_EVENT_MOUSE_BUTTON_DOWN This is from the docs mouse.button (unsigned) if (event.mouse.button == 1) std::cout << "Left button pressed!" << std::endl;
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
If you're a beginner, I suggest you try out the Allegro Vivace Tutorial on the wiki. https://github.com/liballeg/allegro_wiki/wiki/Allegro-Vivace My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|