[✓][SUG][ED] Highlight Erased Pieces Toggle

Started by GigaLem, August 04, 2025, 02:16:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GigaLem

Say you misplaced an erased piece somewhere and you forgot about it, only to stumble across it by accident. Perhaps a toggle to highlight the piece with a color to help you make note of it?

Same could go for grouped pieces, perhaps you need to know what pieces you've grouped together? that highlighted color could help with this

WillLem

Good idea, I've added this to the list.

It might be that grouped pieces end up being toggleable via hotkey (in the same way that terrain, objects, triggers, deprecated pieces etc can currently have their visibility toggled). This has proven to be too elusive, let's highlight them instead.

Erased pieces is a slightly different problem; I'll have a think about this one and see if I can come up with anything.

Ideas/suggestions welcome in the meantime.

GigaLem

The idea of the erased piece toggle would be to show a silhouette of the piece in a contrasting color.

WillLem

Quote from: GigaLem on August 05, 2025, 09:06:09 AMThe idea of the erased piece toggle would be to show a silhouette of the piece in a contrasting color.

I'm sure that can be done, in a similar way to showing clear physics.

Good idea, I'll report back when I've made some progress with this.

namida

I'm not sure how necessary this is for grouped pieces, I feel like it's easy enough to identify those in any case where it'd matter (but at the same time, this would still at worst fall under "unnecessary but doesn't hurt to have it").

On the other hand, having this option for erasers seems like it could be a really useful idea in the right circumstances. One option could be to simply have erasers, instead of erasing, have them draw a solid color that contrasts with the background. (You could go a step further and do an outline or similar - be aware this may not always be obvious for smaller pieces, depending on the piece's design and how thick the outline is - but even just "solid contrasting color" will achieve the goal here I'm pretty sure.)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

#5
OK, so... Eraser pieces drawing solid colour is relatively easy to achieve. Current behaviour (i.e. erase invisibly) can of course be preserved and a toggle option/hotkey provided.

WillLem

Implemented this one today. There's a "Highlight Eraser Pieces" menu item and hotkey (default is Ctrl + E, it can be remapped to anything else in the Hotkey Config).

Here's how it looks when "Highlight Eraser Pieces" is toggled on:



Are we happy with this colour? It can be pretty much anything, but I'd prefer to choose a colour we like now and stick to it; it's not worth making this optional, so let's choose something suitable now. We can always tweak it later if desired.

Suggestions welcome.

Implemented in commit c6277f91.

WillLem

#7
A bug has arisen where, if pieces are designated as eraser pieces with the Highlight mode toggled on, and then pieces are grouped with an eraser piece, the group sees the eraser piece as a regular piece, presumably because there are no transparent pixels to take into account.

Thankfully, this doesn't carry over to the Player; pieces still appear as expected.



EDIT: This bug is fixed in commit 29919ce.

We simply disable the Highlight option, group, then re-enable. This does the trick.