[SOLVED] Show model over panel

Posted By: Aku_Aku

[SOLVED] Show model over panel - 08/30/10 17:17

I made a panel, it covers the whole screen. I put a model (an entity) onto the screen, and i can't see that.
I thought the problem is the layer setting.
I set the panel's layer to 1 in definition, and the entity's layer to 2 with layer_sort.
I can't see the entity. What did i do wrong?
Posted By: TrackingKeks

Re: Show model over panel - 08/30/10 17:20

I think you have to use ent_createlayer to make the model laying about the panel.
Posted By: Aku_Aku

Re: Show model over panel - 08/30/10 17:45

There is no change.
Posted By: MasterQ32

Re: Show model over panel - 08/30/10 18:28

can you send your entity definition?
i think its something with flags/flags2
Posted By: Aku_Aku

Re: Show model over panel - 08/30/10 20:25

hires=ent_createlayer(tmpstr1,0,10);
Posted By: MasterQ32

Re: Show model over panel - 08/30/10 20:31

do you see the model without the panel?
Posted By: Widi

Re: Show model over panel - 08/30/10 21:20

Create a new view that renders at the panel, and set this entity to this view.
Posted By: Aku_Aku

Re: Show model over panel - 08/30/10 22:22

Without panel i can see the model.
Posted By: Aku_Aku

Re: Show model over panel - 08/30/10 22:22

Why?
Posted By: rojart

Re: Show model over panel - 08/31/10 00:52

There you go!

Code:
#include <default.c>

function main()
{
	level_load("");

	PANEL* p1 = pan_create(NULL,1);
	pan_setdigits(p1,0,30,30,"PANEL 1",font_create("Arial#20"),0,0);
	
	pan_setwindow(p1,0,20,20,330,440, bmap_fill(bmap_createblack(64,64,32),COLOR_GREY,100), 0, 0);
	set(p1,SHOW);
	
	PANEL* p2 = pan_create(NULL,3);
	pan_setdigits(p2,0,420,30,"PANEL 2",font_create("Arial#20"),0,0);
	
	pan_setwindow(p2,0,400,20,300,440, bmap_fill(bmap_createblack(64,64,32),COLOR_GREY,100), 0, 0);
	set(p2,SHOW);
	
	you = ent_createlayer(SPHERE_MDL,0,2);
	you.x = 50;
	
	you = ent_createlayer(CUBE_MDL,0,4);
	you.x = 100;
	you.y = -30;
}


Posted By: Aku_Aku

Re: Show model over panel - 08/31/10 18:55

Thanks rojart!
Based on your solution, i recognised, everything was good, i just give wrong vector position to my model.
© 2024 lite-C Forums