Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 838 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | chip programmers | 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