News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Number_input does not change character color by toggling enable/disable

Started by [C] Ranran, November 09, 2022, 10:35:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

[C] Ranran

gui_numberinput_t keeps the text color inside the input between enable and disable. The text color is finally changed when the input is manipulated. This creates a strange situation where only the button changes and the text color does not change when enable/disbale is toggled, causing confusion.

https://github.com/Ranran-the-JuicyPork/simutrans-exp/commit/9ee57f10a79d96df9a5d67772642d00e94816ab1
The solution I came up with causes the text color change by auto-passing the current value again when toggling enable/disable.

prissi