Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (3run, AndrewAMD), 667 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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