Scripts / Panel Layer Depth

Author
Message
Teabone
Valued Member
13
Years of Service
Recently Online
Joined: 8th Jun 2006
Location: Earth
Posted: 30th Nov 2019 15:27
Is there a way to put a sprite on top of a LUA panel? I've tried setting the sprite to -1000, -100 -1 0 and no success.
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
smallg
Community Leader
13
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th Nov 2019 16:41
i believe sprites are on top of text and panels by default so do you mean put the sprite BEHIND the panel? use SetSpritePosition(id,200,200) then PasteSpritePosition(id,#,#) -- where #,# is the position on the screen you want to display the sprite
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Belidos
3D Media Maker
4
Years of Service
User Offline
Joined: 23rd Nov 2015
Location: Hertfordshire
Posted: 30th Nov 2019 16:42
Layers only work with pasted sprites not sprites placed directly in screen. The top layyer is 1 the bottom layer is 100.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Teabone
Valued Member
13
Years of Service
Recently Online
Joined: 8th Jun 2006
Location: Earth
Posted: 2nd Dec 2019 15:53 Edited at: 2nd Dec 2019 15:57
Quote: " do you mean put the sprite BEHIND the panel? "


Looking to put it in front of the panel. In the future will most likely use an image as a border but for now looking to use panels as they are quick and easy solution for creating okay frames.

I am glad i can move text behind and above sprites and of course always want text on top of panels.

Quote: "Layers only work with pasted sprites not sprites placed directly in screen. The top layer is 1 the bottom layer is 100."


I'm using Pasted sprites but cant seem to get them above panels? Perhaps this is not possible?

Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Belidos
3D Media Maker
4
Years of Service
User Offline
Joined: 23rd Nov 2015
Location: Hertfordshire
Posted: 2nd Dec 2019 17:57
Oh do you mean the panel lua command? I think they're the same as text, its fixed to the top layer.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Primary Laptop:
i5, NV1050 4GB, 8GB memory, 1x 1TB HDD, Win10.

Secondary Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
AmenMoses
GameGuru Master
3
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 2nd Dec 2019 21:36
As Belidos says the panel is always the top layer.
Been there, done that, got all the T-Shirts!
PM
smallg
Community Leader
13
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 3rd Dec 2019 09:32
Have you tried not using pasted sprites? Normal sprites should cover a panel and text.
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Teabone
Valued Member
13
Years of Service
Recently Online
Joined: 8th Jun 2006
Location: Earth
Posted: 3rd Dec 2019 20:19
I'll give that a try and see.
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960

Login to post a reply

Server time is: 2019-12-07 06:03:23
Your offset time is: 2019-12-07 06:03:23