Page 1 of 1

[2.0.66] Modded, If button gets enabled/disabled style.font_color doesn't get updated until hovered.

Posted: Sat Sep 13, 2025 9:36 pm
by MerryDreambound
What did you do?
Context:
I'm creating a mod to organize space platforms, and I'm trying to recreate the "Surfaces" GUI, to do so I tried to change the "font_color" of a label on "defines.events.on_gui_click" and then disable the button so it cannot be clicked again, however it seems that disabling/enabling the button (In the code: "element.enabled = false" "button.enabled = true"), makes the font_color functionality to not work until it gets hovered again.

Repro steps:
Download/Install the mod "UntitledGuiGuideTemplate-Merry" in the attachments
Open factorio
Create a new sandbox world (Click yes to all boxes that appears when you appear in the world)
Create 3 (To see the issue better) new space platforms (Fully)
Open the custom GUI from the mod with "CONTROL + i"
Click the space platforms in the custom GUI
Hover over the space platforms after clicking them
The color only changes after hovering over them

You can also see the attached output.mp4 to see repro steps

What happened?
It won't change the font_color until they are hovered

What did you expect to happen instead?
For the color to change when clicked instead of hovered/delayed

Does it happen always, once, or sometimes?
It happens always

Re: [2.0.66] Modded, If button gets enabled/disabled style.font_color doesn't get updated until hovered.

Posted: Mon Sep 15, 2025 5:12 pm
by Rseding91
Thanks for the report. This is now fixed for the next release.