IconCtrl Update
by Demolishun · in Torque Game Engine · 10/03/2004 (2:44 pm) · 0 replies
If anyone is interested I have taken the code from this resource:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4124
and I tweaked and changed it for my needs. The main things I have added is a lot more events can be processed by script and I made it so the pickup and drag of the icon itself can be controlled from script. By default the icon acts as normal and will be dragged whenever it is clicked on by the left mouse button. However, if in script you set the "Pickup" variable to false the icon will not let you pick it up. It will still respond to all events however. The reason I wanted this capability is so I can have hot spots determined by script on the icon itself. My first usage of this has been to divide up the icon into thirds. If the icon is clicked on the left or right of the icon it does not drag. If the icon is clicked in the middle it allows me to drag it. I eventually will make it so this will allow me to "wire" icons together.
So not to bore you any longer.
Thanks,
Frank
PS A special thanks goes to Chris "Deus_ex_Machina" Weber who wrote the original resource. This resource saved me a LOT of time.
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4124
and I tweaked and changed it for my needs. The main things I have added is a lot more events can be processed by script and I made it so the pickup and drag of the icon itself can be controlled from script. By default the icon acts as normal and will be dragged whenever it is clicked on by the left mouse button. However, if in script you set the "Pickup" variable to false the icon will not let you pick it up. It will still respond to all events however. The reason I wanted this capability is so I can have hot spots determined by script on the icon itself. My first usage of this has been to divide up the icon into thirds. If the icon is clicked on the left or right of the icon it does not drag. If the icon is clicked in the middle it allows me to drag it. I eventually will make it so this will allow me to "wire" icons together.
So not to bore you any longer.
Thanks,
Frank
PS A special thanks goes to Chris "Deus_ex_Machina" Weber who wrote the original resource. This resource saved me a LOT of time.
About the author
I love programming, I love programming things that go click, whirr, boom. For organized T3D Links visit: http://demolishun.com/?page_id=67