Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 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
View over Panel #408028
09/24/12 04:27
09/24/12 04:27
Joined: Jun 2009
Posts: 26
D
dd231 Offline OP
Newbie
dd231  Offline OP
Newbie
D

Joined: Jun 2009
Posts: 26
Can someone tell me why the VIEW* won't overlay the PANEL*? The panel and view are visible and view layer is greater than the PANEL* layer so it should be visible when the panel shares the x and y position, however it doesn't frown

Code:
VIEW* mini_map = 
{ 
   layer = 3; 
   pos_x = 1400; 
   pos_y = 0; 
   size_x = 300; 
   size_y = 250; 
   tilt = -90; 
  
PANEL* side_panel = 
{ 
   layer = 1;  
   bmap = panel1;
   size_x = 300; 
   size_y = 800; 
   flags = SHOW;  
}

function handle_panels()
{
  mini_map.pos_x = screen_size.x - mini_map.size_x; //places  mini map at far right of screen
  mini_map.pos_y = screen_size.y - (screen_size.y-22); //places mini map at very top of screen within border
  //
  side_panel.pos_x = screen_size.x - side_panel.size_x; //places side panel at far right of screen
  side_panel.pos_y = screen_size.y - screen_size.y; //places  side panel at bottom of screen	
  //
  vec_set(side_panel.scale_y,vector(2,0,0));
}


Re: View over Panel [Re: dd231] #408031
09/24/12 06:18
09/24/12 06:18
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt

Re: View over Panel [Re: jcl] #408061
09/24/12 15:43
09/24/12 15:43
Joined: Jun 2009
Posts: 26
D
dd231 Offline OP
Newbie
dd231  Offline OP
Newbie
D

Joined: Jun 2009
Posts: 26
Layer sort doesn't do anything for me... I've tried placing it another part of my code but it does nothing to help. Not to mention it shouldn't be have to be called because the layers are already set in the above code as you can see.

VIEW = 3; and PANEL = 1 therefore VIEW should overlap PANEL but it doesn't! Is there any other ideas? It should be a simple fix!

Re: View over Panel [Re: dd231] #408063
09/24/12 15:50
09/24/12 15:50
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Quote:
Panels, texts, and view entities with a positive layer value are placed above any view; with a negative layer value they are placed below any view.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: View over Panel [Re: dd231] #408064
09/24/12 15:52
09/24/12 15:52
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Originally Posted By: dd231
Layer sort doesn't do anything for me... I've tried placing it another part of my code but it does nothing to help. Not to mention it shouldn't be have to be called because the layers are already set in the above code as you can see.

VIEW = 3; and PANEL = 1 therefore VIEW should overlap PANEL but it doesn't! Is there any other ideas? It should be a simple fix!


Learn2Read.
Quote from manual:
[...] Panels und Texte werden immer oberhalb sämtlicher Views angezeigt, unabhängig von deren LAYER-Werten.

[...] Panels and texts are ALWAYS rendered above views, independent from their layers.

Re: View over Panel [Re: Ch40zzC0d3r] #408065
09/24/12 16:05
09/24/12 16:05
Joined: Jun 2009
Posts: 26
D
dd231 Offline OP
Newbie
dd231  Offline OP
Newbie
D

Joined: Jun 2009
Posts: 26
Quote:
Learn2Read


Thanks for the attitude Ch40zzC0d3r... I'm simply trying to learn here. I have read the section in the user guide and that's why I am on the forum... Do you try to discourage alot of noobs on the forum?

Re: View over Panel [Re: Superku] #408068
09/24/12 16:47
09/24/12 16:47
Joined: Jun 2009
Posts: 26
D
dd231 Offline OP
Newbie
dd231  Offline OP
Newbie
D

Joined: Jun 2009
Posts: 26
I assumed that both the view and panel had to be positive values because the default view is set at zero and if I make the side panel a negative value it hides behind the main view. So I set the main view and side panel as negative values and the mini map as a positive value, however, I still lose the side panel under the main view...

Code:
#include <acknex.h>

BMAP* panel1 = "metal_texture.jpg";

VIEW* main_view = 
{  
	layer = -2;
   size_x = 3000; 
   size_y = 2500;
}

VIEW* mini_map = 
{  
	layer  =  1;
   size_x = 300; 
   size_y = 250; 
}

PANEL* side_panel = 
{   
	layer = -1;
   bmap  = panel1; 
   flags = SHOW;  
}

function main()
{
	video_mode = 12;
	video_screen = 1;
	level_load(""); 
	//
	while(1)
	{
		if(key_esc) sys_exit(NULL);
		//
		mini_map.pos_x = screen_size.x - mini_map.size_x;
		mini_map.pos_y = screen_size.y - screen_size.y;
		//
		side_panel.size_y = screen_size.y - screen_size.y;
		side_panel.pos_x = screen_size.x - (side_panel.size_x); 
		//
		wait(1);	
	}
}



PS. Thanks for being helpful Superku! It's very much appreciated laugh

Re: View over Panel [Re: dd231] #408070
09/24/12 17:14
09/24/12 17:14
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
It won't work this way (as you've already noticed), just render the view into a bitmap and display the bitmap in a panel.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: View over Panel [Re: Superku] #408071
09/24/12 17:22
09/24/12 17:22
Joined: Jun 2009
Posts: 26
D
dd231 Offline OP
Newbie
dd231  Offline OP
Newbie
D

Joined: Jun 2009
Posts: 26
Ok will do... once again thanks so much!!! Sie sind die besten!!!


Moderated by  old_bill, Tobias 

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