You are not logged in.

publicitarios360

Intermediate

  • "publicitarios360" started this thread

Posts: 205

Location: Habana, Cuba

Occupation: Architect, Photographer, Programmer.

  • Send private message

1

Thursday, December 14th 2017, 1:12am

Set Current object ONTOP

Hi, I looking for how to put the current layer (ex. a custom window formed with container layer, buttons, textfield, etc.) ontop in relation with all others layers.


I think to assign a lower zorder to all except the current that would be the maxime zorder.

The problem is in the current objects and the others formed for container layer, is need to assign any custom property to filter and temporally (while the current objet is visible) to lower the zorder... Look complicated. but it is a very typical scenary in any project.

Please, I want to listen others theoretical soutions about this comun problem.

Thanks at advanced,

Fernando.

2

Thursday, December 14th 2017, 9:07pm

Hi

here's a code i wrote to do that on onover, be inspired ;)

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<action name="orderdownthumb" scope="local">

		set(maxzorder,0);

		for(set(i,0), i LT scene.count, inc(i), 

			txtadd(downlayername,'downscene_',get(scene[get(i)].title));

			if( layer[get(downlayername)].zorder GE maxzorder, 

				copy(maxzorder,layer[get(downlayername)].zorder);

				);

			);

		calc(layer[%1].zorder,maxzorder+1);


	</action>

publicitarios360

Intermediate

  • "publicitarios360" started this thread

Posts: 205

Location: Habana, Cuba

Occupation: Architect, Photographer, Programmer.

  • Send private message

3

Friday, December 15th 2017, 5:38am

Thanks Rebaj83 for your answer, That it very interesting:

Your code search all zorder > 0 and increment 1 to greater zorder value found for set it to target layer.
Sometimes in some projects I used zorder=100 to put on top any layer, in this case the code no works in html5 due to limit 100. The 100 limit is the problem for any similar code. I will try it and comment after.

Very grateful,

Fernando