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
0 registered members (), 635 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Show and hide panel on key click #250105
02/05/09 22:50
02/05/09 22:50
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline OP
Member
Darkyyes  Offline OP
Member
D

Joined: Jun 2007
Posts: 152
Norway
Show and hide panel on key click
how to make a toogle function to show and hide a panel on lets say the key k,

//main inventory
PANEL* test_panel =
{
bmap = test_panel;
layer = 0;
flags = SHOW;
}


New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7
Re: Show and hide panel on key click [Re: Darkyyes] #250107
02/05/09 22:54
02/05/09 22:54
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Code:
function toogle_the_panel(){
  toggle(test_panel,SHOW);
}


or

Code:
function toogle_the_panel(){
  if(is(test_panel,SHOW))
  {
     reset(test_panel,SHOW);
  }
  else{
     set(test_panel,SHOW); 
  }
}


and in your main fucniton before the while:

on_k = toggle_the_panel;

OR

in your main while

if(key_k) toggle_the_panel();


3333333333
Re: Show and hide panel on key click [Re: Quad] #250111
02/05/09 23:20
02/05/09 23:20
Joined: Jun 2007
Posts: 152
Norway
D
Darkyyes Offline OP
Member
Darkyyes  Offline OP
Member
D

Joined: Jun 2007
Posts: 152
Norway
Thank you very much smile


New to lite-c and gamestudio in general, thank you for reading.
Com, A7 v7.7

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