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
[2.0.66] Modded, If button gets enabled/disabled style.font_color doesn't get updated until hovered.
-
- Manual Inserter
- Posts: 2
- Joined: Mon Sep 08, 2025 3:11 pm
- Contact:
[2.0.66] Modded, If button gets enabled/disabled style.font_color doesn't get updated until hovered.
- Attachments
-
- factorio-current.log
- (8.25 KiB) Downloaded 10 times
-
- output.mp4
- (4.31 MiB) Downloaded 11 times
-
- UntitledGuiGuideTemplate-Merry.tar.gz
- (22.82 KiB) Downloaded 9 times
Re: [2.0.66] Modded, If button gets enabled/disabled style.font_color doesn't get updated until hovered.
Thanks for the report. This is now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.