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
1 registered members (7th_zorro), 1,390 guests, and 2 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
Panel turns gray #204095
04/26/08 14:15
04/26/08 14:15
Joined: Mar 2008
Posts: 15
B
betuveen Offline OP
Newbie
betuveen  Offline OP
Newbie
B

Joined: Mar 2008
Posts: 15

Hi, I'm using A7 and Sphere.
All of my panels turn white when the Sphere outdoor level loaded (they're still alright if I load them at the splash screen).

For example, the TGA Panel with alpha like this:


Will turns gray like this:



Do I have to set some flags? I've tried some but it doesn't work.
Thanks 4 reading n thank you very much for replying!

Re: Panel turns gray [Re: betuveen] #204097
04/26/08 14:26
04/26/08 14:26
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline
Expert
mpdeveloper_B  Offline
Expert

Joined: Feb 2006
Posts: 2,185
make sure to put the entity on a layer, like layer = 2 or something. Also is it defined as a panel or an entity


- aka Manslayer101
Re: Panel turns gray [Re: mpdeveloper_B] #204122
04/26/08 20:57
04/26/08 20:57
Joined: Mar 2008
Posts: 15
B
betuveen Offline OP
Newbie
betuveen  Offline OP
Newbie
B

Joined: Mar 2008
Posts: 15
Thanks mpdeveloper_B, it is defined as a panel, I tried to turn it to entity and it worked, the entity-interface displayed correctly.

But I want to re-use the Sphere's menu, which is defined as panel, the (turning gray) TGA panel will be used as the sphere's menu background, so to make them stick together well I have to use panel instead of entity.

Does anyone have the same problem and how to solve this turn gray bug? Please help me!

And I have another question ^^, if you did it and have some code that make a panel always be at the center of the screen (even if the player change resolution) please show me. Thank you!

Re: Panel turns gray [Re: betuveen] #204149
04/27/08 08:54
04/27/08 08:54
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
 Quote:

if you did it and have some code that make a panel always be at the center of the screen (even if the player change resolution) please show me. Thank you!

Pretty simple.
All you need is the panels bitmap width and height and the screen size values:
 Code:
function pan_center(_pan, _bitmap)
{
  _pan.pos_x = (screen_size.x - bmap_width(_bitmap)) / 2;
  _pan.pos_y = (screen_size.y - bmap_height(_bitmap)) / 2;
}

// TESTING:
bmap my_bitmap = <my_bitmap.tga>;
...
panel test_pan { bmap = my_bitmap; ... }
...
pan_center(test_pan,my_bitmap);

PLEASE NOTE: This is rather pseudo code and written down from the top of my head. Not sure if it works, but it should give you an idea how to solve your problem.

Re: Panel turns gray [Re: Xarthor] #204206
04/27/08 20:35
04/27/08 20:35
Joined: Mar 2008
Posts: 15
B
betuveen Offline OP
Newbie
betuveen  Offline OP
Newbie
B

Joined: Mar 2008
Posts: 15
Thanks Xarthor, I'm an artist, not so good with coding! \:D
You're pro and nice, thanks for your help, I'm appreciated! \:\)


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