Lemmings Forums

Lix => Lix Main => Topic started by: Silken Healer on May 08, 2025, 06:23:15 PM

Title: Lix menu colour pre-emptive integer overflow with the single arrow button
Post by: Silken Healer on May 08, 2025, 06:23:15 PM
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
Title: Re: Lix menu colour pre-emptive integer overflow with the single arrow button
Post by: Simon on May 10, 2025, 08:29:23 PM
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
Title: Re: Lix menu colour pre-emptive integer overflow with the single arrow button
Post by: namida on May 10, 2025, 08:46:54 PM
If the requirement is for it to be divisible by 2, why is the maximum 0xF0 and not 0xFE?
Title: Re: Lix menu colour pre-emptive integer overflow with the single arrow button
Post by: Silken Healer on May 10, 2025, 09:09:03 PM
Exactly