supertux icon indicating copy to clipboard operation
supertux copied to clipboard

Fixes #517 - Add a button with the ability to hide/single layers

Open sofi004 opened this issue 7 months ago • 5 comments

The Supertux level editor did not have a button to hide individual layers. Now this button is at the end of each layer menu. The button does not appear on the selected layer, as it does not make sense to hide the selected layer. When someone decides to hide a layer other than the selected one and then switches to it, that layer is shown again. In addition, after hiding a layer, if the hidden layer menu is opened again, instead of the hide layer button, a show layer button appears. The default opacity of 0.5 was kept as the default, so that users do not find it strange or have to press this implemented button.

Closes #517

Co-authored-by: Filipe Oleacu [email protected]

sofi004 avatar May 23 '25 08:05 sofi004

Looking good, code-wise. Haven't tested it.

tobbi avatar May 27 '25 07:05 tobbi

It works, but for some reason the background shifts in the Y axis (editor only)

Can you clarify this or send a screenshot?

tobbi avatar May 31 '25 07:05 tobbi

Can you clarify this or send a screenshot?

https://github.com/user-attachments/assets/62af012f-3eec-409e-86b2-6c13484538f0

bruhmoent avatar May 31 '25 07:05 bruhmoent

The sector size is calculated from the sizes of solid tilemaps. Is it possible that when you hide the only solid tilemap, then something gets goofed there?

Hypernoot avatar May 31 '25 08:05 Hypernoot

https://github.com/user-attachments/assets/f9fa6d9e-5f7e-442e-9abe-b7528124bbba

I think the problem has nothing to do with what I did, but that it was already an old problem considering that this happens without my code, as you can see in the video above.

sofi004 avatar Jun 02 '25 12:06 sofi004

image image image firstly, every single object has a "hide layer" option, which doesnt do anything.

Frostwithasideofsalt avatar Jul 05 '25 22:07 Frostwithasideofsalt

https://github.com/user-attachments/assets/c420217c-10b8-4aad-8901-20c95b26f1b1

third. this pr has a issue regarding backgrounds moving based on a tilemap is solid or not. This issue is unique to this pr as it doesn't happen on latest master

Frostwithasideofsalt avatar Jul 05 '25 22:07 Frostwithasideofsalt