[?][SUG][PL/ED] Change Color/Transparency of trigger area

Started by GigaLem, June 13, 2025, 11:23:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillLem

OK, finally got around to having a look at the code for this today.

Editor:

This is very easy. The Editor simply draws a semitransparent magenta pink rectangle. By swapping which of the ARGB channels are drawn at 255, we can have semitransparent cyan, yellow or mint green.

I'm sure that by messing about with this value, other colours could possibly be achieved. We choose one that works, implement the option. Not a problem.

Game:

This is much more convoluted. The trigger area is drawn pixel-by-pixel in a chequered grid pattern, and so is actually composed of at least 2 colours. The first colour is the #FF00FF pink, and the second is dynamically calculated from this (but is hue-dependent). Then, triggers can overlap terrain, steel, and other triggers. In each of these cases, the colour is either re-blended or simply drawn as a new colour.

So, it wouldn't be a simple case of just changing the #FF00FF value as I'd hoped, and would in fact require a more detailed recalibration of all the various overlapping and intersecting pixel colours. Granted, there are only a few to consider, but it would have to be done for each individual base colour.

For that reason, I'd be happy to consider implementing a single alternative colour option (as opposed to several alternatives) for the game engine, but I'd ideally want that colour to be chosen and specified by the OP (GigaLem) so that I can simply go about working it into the various required sub-colours to make sure it works as a viable option.

Multiple colours are unfortunately out of the question. Even if I could find some way to automate every possible configuration from a single base colour, that goes way beyond the desired scope of this feature, which is (as I understand it) simply to provide a less harsh-looking alternative to the pink. This can simply be agreed upon beforehand, worked in to the existing code, and presented to the end user as an A/B option.

Meanwhile, drawing unfilled rectangles would require significant re-writing of the code that draws the trigger areas, which is not something I'd be happy to take on at this point. I'd prefer to rule that out altogether and go ahead with a comparatively simpler trigger recolouring.

So, Giga, we need to know what would work for you as an alternative colour. Ideally, please present it either as a .png image or a hex code (e.g. FF00FF) and I can take it from there.



(Note to self: Editor - BmpModify.cs line 188)
(Note to self: Game - LemRendering.pas line 2834)