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,420 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
How to hide panels on demand? #441557
05/27/14 05:17
05/27/14 05:17
Joined: Jun 2010
Posts: 590
California
Ruben Offline OP
User
Ruben  Offline OP
User

Joined: Jun 2010
Posts: 590
California
I am trying to find a way to only display a panel containing a large image of a sword on the right side of the screen, when I left-click a small sword item image in the player's inventory bag (shown on the left side of the screen). Here is some code I have for the panel with the large sword image:

Code:
BMAP* steelSword = "Sword_Inv_Display.pcx";

...

PANEL* sword_panel =
{
  	window(600,25,350,350,steelSword,200,300);
  	flags = SHOW;
}



This panel always displays a large image of a sword on the right side of the screen.

I only want this image to display when I open up the player's inventory bag, and if the player is armed with a sword in the player's inventory bag (which would show as a small sword image in the inventory bag), and if the user left-clicks on the small sword image once, the panel above showing a large image of a sword only then should display on the right side of the screen.

The code above allows the panel showing the large sword image to always display. I really only want the panel with the large sword image to show if the player left-clicks the small sword image in the player's inventory bag once.

Is there a flag that I can use in the panel to make it non-visible until the player clicks on the small sword item image in the inventory bag?

Last edited by Ruben; 05/27/14 05:18.
Re: How to hide panels on demand? [Re: Ruben] #441559
05/27/14 05:49
05/27/14 05:49
Joined: Apr 2005
Posts: 274
austria
Ascalon Offline
Member
Ascalon  Offline
Member

Joined: Apr 2005
Posts: 274
austria
Code:
if( ....) {
   set(sword_panel|show);
} 
else
{
   reset(sword_panel|show);
}



my webside : www.ascalon.jimdo.de
Re: How to hide panels on demand? [Re: Ascalon] #441567
05/27/14 08:37
05/27/14 08:37
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Originally Posted By: Ascalon
Code:
if( ....) {
   set(sword_panel|show);
} 
else
{
   reset(sword_panel|show);
}



set(a_panel, SHOW);
reset(a_panel, SHOW);

Please look up the syntax or at least make sure the code you are posting works smirk


POTATO-MAN saves the day! - Random

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