khval / NallePuh

Paula audio and CIAA/CIAB emulation for AmigaOS
GNU General Public License v2.0
4 stars 0 forks source link

Maybe adding to the button object creating "GA_Immediate, TRUE," makes WMHI_GADGETDOWN work. #24

Open khval opened 1 year ago

khval commented 1 year ago

@LiveForIt

Maybe adding to the button object creating "GA_Immediate, TRUE," makes WMHI_GADGETDOWN work.

GA_Immediate (BOOL) When set indicates that the gadget is to notify the application when it becomes active. This attribute corresponds to the GACT_IMMEDIATE activation flag.

Defaults to FALSE.

Applicability is (OM_NEW, OM_SET, OM_GET, OM_UPDATE)

... LAYOUT_AddChild, ButtonObj = ButtonObject, GA_ID, GAD_BUTTON, GA_Immediate, TRUE, //GA_RelVerify, TRUE, GA_Text, "A button!", GA_HintInfo, "The default hint info is this", ButtonEnd, CHILD_WeightedHeight, 0,

Hypexed commented 1 year ago

Active is unclear to me here. Generally a button is pushed and if it isn't activated it would be ghosted out. Traditionally a button gadget would send out a GADGETDOWN and GADGETUP event. GadTools made buttons easier. But ReAction lacks the same simplicity even with layouting.

khval commented 1 year ago

I have added the GA_Immediate, not sure if it works yet, more changes needed.

Hypexed commented 1 year ago

Is there any particular gadget where this fails? I'm not sure here why GADGETDOWN is wanted unless it's customised. Usually you just check GADGETUP which is enough. Typically a button can be pressed down, but moving mouse away depresses it, and only releasing mouse button inside hit box confirms it's pressed. IDCMP_GADGETDOWN should also be set in IDCMP flags if GADGETDOWN events are desired.

khval commented 1 year ago

if users should be able to control how long a joystick button is pressed, ween to know when its pressed and released.

Hypexed commented 1 year ago

So it's used to set a length? I wasn't sure what it was for. I pressed it and nothing happened. I thought it might trigger fire button. But wasn't running anything waiting for fire.

khval commented 1 year ago

Yes exactly, trainer screen for Deluxe Galaga AGA, or just write small test in Assembler or C.

fre. 27. okt. 2023 kl. 05:59 skrev Hypexed @.***>:

So it's used to set a length? I wasn't sure what it was for. I pressed it and nothing happened. I thought it might trigger fire button. But wasn't running anything waiting for fire.

— Reply to this email directly, view it on GitHub https://github.com/khval/NallePuh/issues/24#issuecomment-1782252439, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIDFDKTHDXHI4KK3DCTUYTYBMWSRAVCNFSM6AAAAAA5STQ2FCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGI2TENBTHE . You are receiving this because you authored the thread.Message ID: @.***>