Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sofi004
Copy link
Contributor

@sofi004 sofi004 commented May 23, 2025

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 filipeoleacu04@tecnico.ulisboa.pt

@tobbi
Copy link
Member

tobbi commented May 27, 2025

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

Copy link
Member

@bruhmoent bruhmoent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@tobbi
Copy link
Member

tobbi commented May 31, 2025

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

Can you clarify this or send a screenshot?

@bruhmoent
Copy link
Member

Can you clarify this or send a screenshot?

2025-05-31.09-54-21.mp4

@Hypernoot
Copy link
Member

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?

@sofi004
Copy link
Contributor Author

sofi004 commented Jun 2, 2025

solid.mp4

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.

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 SuperTux#517

Co-authored-by: Filipe Oleacu <filipeoleacu04@tecnico.ulisboa.pt>
@sofi004 sofi004 force-pushed the Ability_To_Hide_Layers branch from f509b32 to adecef8 Compare June 4, 2025 12:34
@sofi004 sofi004 requested a review from bruhmoent June 4, 2025 14:46
Copy link
Member

@Frostwithasideofsalt Frostwithasideofsalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You aren't able to toggle the visibility of a layer your currently selecting, which is quite confusing if you don't already know how it works. Also, i think it would be nice if hidden tilemaps had a icon on them showing that their hidden, so you can know what layers are hidden at a glance. here's a mock up of what it could look like.
image
(also here is the raw icon)
hidden_layer
Also, this Pr has a lot of bugs.

@Frostwithasideofsalt
Copy link
Member

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

@Frostwithasideofsalt
Copy link
Member

thjing.mp4

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to hide / single layers
5 participants