Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, degenerate_762), 1,213 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mino, squik, AemStones, LucasJoshua, Baklazhan
19061 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 | 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