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

Bugs which we just recently fixed in our development version and will reach you in the next release.
MerryDreambound
Manual Inserter
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.

Post 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
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
Rseding91
Factorio Staff
Factorio Staff
Posts: 16103
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

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.
Post Reply

Return to “Resolved for the next release”