[comp.sys.amiga.tech] Reading Right Button

Bits_of_Magic@cup.portal.com (08/21/90)

I am trying to read the right button through Intuition.  From the Intuition
manual it appears that all you need to do is add RMBTRAP to the
ModifyIDCMP call.  What I am doing:

ModifyIDCMP(MyWindow, MOUSEBUTTONS|RMBTRAP);
.
.
.
Wait(1<<MyWindow->userPort->mp_SigBit);

If you press the left button it exits Wait().  If you press the right button
it doesn't.  Any ideas?

Nicky Robinson
<bits_of_magic@cup.portal.com>

ken@cbmvax.commodore.com (Ken Farinsky - CATS) (08/21/90)

In article <33039@cup.portal.com> Bits_of_Magic@cup.portal.com writes:
>I am trying to read the right button through Intuition.  From the Intuition
>manual it appears that all you need to do is add RMBTRAP to the
>ModifyIDCMP call.  What I am doing:
>
>ModifyIDCMP(MyWindow, MOUSEBUTTONS|RMBTRAP);
                                    ^^^^^^^
Don't do this.

RMBTRAP is a window Flag, not an IDCMP Flag.  Put RMBTRAP into
the Flags field of the new window structure, or toggle the bit
in the window structure (Flags).  I believe that you can do this
on the fly.

-- 
--
Ken Farinsky - CATS - (215) 431-9421 - Commodore Business Machines
uucp: ...{uunet,rutgers}!cbmvax!ken
bix:  kfarinsky

Bits_of_Magic@cup.portal.com (08/23/90)

Thanks to all who replied here and by mail.  FYI -- I will probably have
a lot of questions over the next few months as I learn the Amiga.  I
am converting our game Centurion, Defender of Rome to the Amiga,
and running cleanly under the OS is a high priority.  (Our computers
are all WORK computers, which a lot of the time involves playing games,
and I HATE to reboot them just to check out a game.)  Stick with
me through all the stupid questions and I'll do my best to do a decent
job supporting the Amiga.

Nicky Robinson
<bits_of_magic@cup.portal.com>