Gamestudio Links
Zorro Links
Newest Posts
Z9 getting Error 058
by k_ivan. 04/20/26 15:57
Stooq now requires an API key
by jcl. 04/13/26 09:42
Strange "Alien" Skull created with >Knubber<
by NeoDumont. 04/10/26 18:58
400 free seamless texture pack downl. here !
by NeoDumont. 04/08/26 19:55
ZorroGPT
by TipmyPip. 04/08/26 17:08
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (Grant), 3,476 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
juergenwue, VladMak, Geir, ondrej, mredit
19208 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
HOW: disable a button #359302
02/16/11 18:25
02/16/11 18:25
Joined: Dec 2010
Posts: 13
T
tasha19 Offline OP
Newbie
tasha19  Offline OP
Newbie
T

Joined: Dec 2010
Posts: 13
how do i disable a button so that the client/server cannot click on it anymore? quick reply would be highly appreciated.. =)

Re: HOW: disable a button [Re: tasha19] #359304
02/16/11 18:38
02/16/11 18:38
Joined: Jul 2007
Posts: 620
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 620
Turkey, Izmir
button_state(PANEL*,var num,var state)

Re: HOW: disable a button [Re: Emre] #359383
02/17/11 08:00
02/17/11 08:00
Joined: Jun 2006
Posts: 2,640
Earth
Germanunkol Offline
Expert
Germanunkol  Offline
Expert

Joined: Jun 2006
Posts: 2,640
Earth
I'd use pan_setbutton.

pan_setbutton(bm_mainPan, 1, 1, 304, 208, bm_nullbuttonTGA, bm_nullbuttonTGA, bm_nullbuttonTGA, NULL, NULL, NULL, NULL);

It's not the nicest way of doing things, so if you have tons and tons of buttons, don't use it. But if there's only a few, this is a quick way.
Simply set all functions that the button calls to "NULL" and set all images of the button to the same button.


~"I never let school interfere with my education"~
-Mark Twain

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