Forum

> > CS2D > Scripts > Is it possible to change the Z-index of images?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Is it possible to change the Z-index of images?

3 replies
To the start Previous 1 Next To the start

old Is it possible to change the Z-index of images?

Infinite Rain OP
Reviewer Off Offline

Quote
I was wondering whether it is possible to change the order in which existing images are rendered (without using freeimage), so if I put image A over an existing image B, I would like to make it so that image B renders above image A.

old Re: Is it possible to change the Z-index of images?

mrc
User Off Offline

Quote
I'm not 100% sure, but as far as I know there's no way to change the render order (Z-index) of images once they're created.
CS2D always draws newer images on top of older ones.

tween_alpha only changes transparency, so it won’t really help with layering — it can only make one image invisible while showing the other.

So if you need to swap which one is on top while keeping both visible, you'd have to recreate one of them (freeimage + image() again).
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview