Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,038 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
getting the panel name #286803
08/27/09 14:08
08/27/09 14:08
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline OP
Member
boyax  Offline OP
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
is there a way to check how to get the panel name??

I need it since i'm controlling a hardware input for the game and I want to know in the menu which button is being press (not using mouse)

Thanks

Re: getting the panel name [Re: boyax] #286823
08/27/09 15:49
08/27/09 15:49
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
If this doesnt work, please supply more information.
Especially the panel defines.
If your using "pan_create" to create the panels,
there is no way (that I know of) to get their names.

Lets assume for now that your panel/s has a button calling function "hit_me"

Change "hit_me" to be like this. (there is no changes required of the panel itself)
Code:
function hit_me(var button_num, PANEL* panel)
{
   STRING* panel_name = str_create(panel->link.name);
   ... whatever was already here before
}



Hope this helps.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1