Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,173 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | 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