Panel below VIEW object?

Posted By: goxx

Panel below VIEW object? - 11/06/08 12:50

Hi,

since Version 7.04.2 it is possible to draw a PANEL below a VIEW object.

"Panels, texts and view entities with a negative layer value are now drawn below VIEW objects, and can be used to draw into the background of a view when the sky is switched off."

1. What means to switch off the sky?

2. What is wrong with the following code, i can't see the Panel?


#include <acknex.h>
#include <default.c>

#include <atypes.h>


BMAP* main_background_bmap = "main_background.tga";
ENTITY* model_mdl;
VIEW* camera_view;

PANEL* main_background_pan =
{
BMAP = main_background_bmap;
layer = -1; // View in front of Panel
}


function main() {


level_load("");
wait(5);


set(model_mdl,VISIBLE);
set(main_background_pan, VISIBLE);


camera_view = view_create(100);
camera_view.arc = 20;
camera_view.x = -235;
camera_view.y = 600;
camera_view.z = 440;
camera_view.pan = -65;
camera_view.tilt = -30;
camera_view.roll = 5;

camera_view.layer = 100;
camera_view.pos_x = 50;
camera_view.pos_y = 40;
camera_view.size_x = 450;
camera_view.size_y = 600;
camera_view.aspect = 1;
camera_view.ambient = 10;
camera_view.flags = VISIBLE;


while (1)
{

wait(1);
}
}


3. How can i format code in this Forum?

thx

goxx
Posted By: Martek

Re: Panel below VIEW object? - 11/06/08 13:05

2. You must insert flags = VISIBLE; into your PANEL* main_background_pan
3. You click on the # and than on
Code:
...text...

Posted By: goxx

Re: Panel below VIEW object? - 11/06/08 13:16

ad 2.

In the main() function i have:
Code:
set(main_background_pan, VISIBLE);


ist that not enough?
© 2023 lite-C Forums