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)


Simon

Hmm. If 0xFE confuses you less than 0xF0, I'm fine with making the cap 0xFE.

It's a hack in any case. The fundamental problem is the divisibility by 2 in the GUI widget. There is no GUI widget that combines both (a) increment/decrement buttons and (b) number typing. I don't want to invest energy in making a special widget only for the menu color. I don't remember why the menu color is configurable in the first place. Such a 1990's feature.

-- Simon

Silken Healer

Quote from: Simon on May 19, 2025, 02:26:01 AMThere is no GUI widget that combines both (a) increment/decrement buttons and (b) number typing. I don't want to invest energy in making a special widget only for the menu color.

I think I suggested in the other menu colour thread if I remembered (and if I don't I think here and now) that it should be overhauled (e.g. number typing and maybe a preview). Manually adjusting red, blue and green separately with two arrows and no preview seemed such an unorthodox way of doing things imo. But I don't want to push too much for features if I don't know your motivations behind them and don't know the effort v. reward from the developer side that could be better spent elsewhere on Lix when one can just edit it in options.sdl.

Quote from: Simon on May 19, 2025, 02:26:01 AMI don't remember why the menu color is configurable in the first place. Such a 1990's feature.

I'm not sure if you were implying this with your vernacular or if it was unintentional, but please don't remove this feature. The menu colour changing is honestly, unironically one of, if not my favourite features Lix and I don't know where I'd be without it. It has a certain charm to it, reminds me of this other game called "Bubble Shooter" that allowed you to change the colour and the web IRC for Lix allows you to change the colour too. I'm not sure if it's to do with the 1990's in my case due to not being alive in the 1990's, that could tie into the charm I like from the old web that allowed more customization before all these walled gardens took over, or picking the own colour could just be a charm I like regardless. Picking your own Lix colour, in my opinion, helps the Lix interface feel fresh and vibrant to the user.

Simon

Hmm, right. If this color picker gives me a reason to overhaul more number pickers, then all the better. All numbers should allow both typing and increment/decrement. Then we can remove the strange divisibility by 2, and allow the full range 0 through 0xFF inclusive.

Yep, I'll keep the menu color picker. It doesn't get in the way, and it has its charm, yes.

-- Simon