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
2 registered members (AndrewAMD, TipmyPip), 12,709 guests, and 5 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
Page 1 of 2 1 2
Panels. #221939
08/17/08 01:24
08/17/08 01:24
Joined: Jul 2008
Posts: 37
Ankara, Turkey
Warchief Offline OP
Newbie
Warchief  Offline OP
Newbie

Joined: Jul 2008
Posts: 37
Ankara, Turkey
greetings.

i want to make my panel like inventory. if i click "i" it will be visible. can you help me ?

i created panel etc. but i need codes that will be under "if".


Vekare
Re: Panels. [Re: Warchief] #221942
08/17/08 01:30
08/17/08 01:30
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
the simplest of answers is:
Code:
PANEL* pnl_inventory
{
layer 1; //etc.... etc... and stuff...
}

function fnc_inv_toggle()
{
toggle(pnl_inventory,VISIBLE);
}

void main()
{
on_i = fnc_inv_toggle;
}


whether that's all you want tho I'm not sure smirk

Re: Panels. [Re: MrGuest] #221943
08/17/08 01:37
08/17/08 01:37
Joined: Jul 2008
Posts: 37
Ankara, Turkey
Warchief Offline OP
Newbie
Warchief  Offline OP
Newbie

Joined: Jul 2008
Posts: 37
Ankara, Turkey
yes that is what i want but codes doesnt work

error :

toggle(pnl_inventory,VISIBLE); = bad or missing parameter unknown function.


Vekare
Re: Panels. [Re: MrGuest] #221944
08/17/08 01:44
08/17/08 01:44
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
sorry missed the ='s and incase you haven't got it you'll need these 2 lines at the top
Code:
#include <acknex.h>
#include <default.c>

PANEL* pnl_inventory = 
{
layer 1; //etc.... etc... and stuff...
}

function fnc_inv_toggle()
{
toggle(pnl_inventory,VISIBLE);
}

void main()
{
on_i = fnc_inv_toggle;
}



Re: Panels. [Re: MrGuest] #221945
08/17/08 01:54
08/17/08 01:54
Joined: Jul 2008
Posts: 37
Ankara, Turkey
Warchief Offline OP
Newbie
Warchief  Offline OP
Newbie

Joined: Jul 2008
Posts: 37
Ankara, Turkey
same error :S


Vekare
Re: Panels. [Re: Warchief] #221946
08/17/08 02:07
08/17/08 02:07
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
just making sure you have A7 not A6 and you've saved your file script file as .c and not .wdl?

Re: Panels. [Re: MrGuest] #221947
08/17/08 02:09
08/17/08 02:09
Joined: Jul 2008
Posts: 37
Ankara, Turkey
Warchief Offline OP
Newbie
Warchief  Offline OP
Newbie

Joined: Jul 2008
Posts: 37
Ankara, Turkey
a7 but as .wdl, i work as wdl. cause some codes give erron in c.


Vekare
Re: Panels. [Re: Warchief] #221949
08/17/08 02:10
08/17/08 02:10
Joined: Jul 2008
Posts: 37
Ankara, Turkey
Warchief Offline OP
Newbie
Warchief  Offline OP
Newbie

Joined: Jul 2008
Posts: 37
Ankara, Turkey
wrong board sorry. :p can you answer anyway?

Last edited by Warchief; 08/17/08 02:12.

Vekare
Re: Panels. [Re: Warchief] #221952
08/17/08 02:19
08/17/08 02:19
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
lol
Code:
panel pnl_inventory
{
layer = 9; /// still more stuff bmap etc...
}

function fnc_inv_toggle()
{
//if (pnl_inventory.visible == on) { pnl_inventory.visible = off; } else { pnl_inventory.visible = on; } //the readable way
pnl_inventory.visible = (pnl_inventory.visible == off); //the coders way both are usable
}

function main()
{
return;
}

on_i = fnc_inv_toggle;


Re: Panels. [Re: MrGuest] #221953
08/17/08 02:23
08/17/08 02:23
Joined: Jul 2008
Posts: 37
Ankara, Turkey
Warchief Offline OP
Newbie
Warchief  Offline OP
Newbie

Joined: Jul 2008
Posts: 37
Ankara, Turkey
works now ty.

btw should i use lite-c or wdl. which is better ?


Vekare
Page 1 of 2 1 2

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