Lix menu colour pre-emptive integer overflow with the single arrow button

Started by Silken Healer, May 08, 2025, 06:23:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Silken Healer

1. Go to your Lix colours
2. Set one of the sliders to F0
3. Press the right arrow with one arrow

This then cycles it through to 00 instead of going F2

Simon

Yeah, the maximum of the GUI color number picker is deliberately 0xF0, not 0xFF.

The reason here is that the maximum should be divisible by the smallest step size (2). A maximum of 0xFF (255) would not be divisible by 2. And the reason for the smallest step size of 2 is that a step size of 1 is too fine-grained, I wanted to save you clicks.

But if the cap of 0xF0 surprises you, this cap of 0xF0 is not a good solution either. Hmm.

-- Simon

namida

If the requirement is for it to be divisible by 2, why is the maximum 0xF0 and not 0xFE?
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)