28 June 2020, 18:32 | #1 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
How to add a hook on Button Kind?
I have managed to add a hook on String Kind but don't seem to find how to add a hook on Button Kind. How to add a hook on a button to be triggered on button click? Is this even allowed? Or clicks on buttons are only to be handled as part of IDCMP_GADGETUP handler?
Last edited by Sim085; 28 June 2020 at 19:09. |
28 June 2020, 22:36 | #2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
You mean by GTST_EditHook? This is an attribute of string gadgets. There is no such thing for button gadgets.
If you use BOOPSI instead of GadTools, you can use the ICA_TARGET attribute to get a custom class get its OM_UPDATE method called. A class is similar to a hook, you just have to call MakeClass to get the hook pointer and NewObject to get an instance of this class to be used with ICA_TARGET. |
29 June 2020, 07:43 | #3 |
Registered User
Join Date: Apr 2009
Location: N/A
Posts: 962
|
Thanks thomas. Will check BOOPSI as well.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CD32 joypad blue button vs standard 2 button joystick | jotd | Coders. Asm / Hardware | 6 | 08 May 2018 09:56 |
Configure button 1 as fire and button 2 as autofire | Harry | support.WinUAE | 1 | 21 December 2013 13:37 |
WinUAE x64 2.2 & 2.3 closing when "Add HardDrive" button is pressed | Thom87 | support.WinUAE | 4 | 26 September 2010 16:37 |
Inactive Add Hard Drive button | AlfaRomeo | support.WinUAE | 5 | 07 April 2010 09:45 |
Hook | jcmoorehead | support.Games | 2 | 27 June 2004 17:48 |
|
|