Allow setting number on choose-elem-button

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
Sharparam
Inserter
Inserter
Posts: 29
Joined: Sat Mar 25, 2023 11:21 pm
Contact:

Allow setting number on choose-elem-button

Post by Sharparam »

Currently there is no way to display a number/label on a choose-elem-button. This is needed e.g. for making a custom combinator GUI where you can select signals and they also have a count associated with them which needs to be displayed (just like a vanilla constant combinator).

Currently you can work around this issue by making your own label inside the button, but this is a hack and it's far from ideal (the text is sometimes truncated when too long for example, something that doesn't happen with vanilla GUI buttons).

(This is related to viewtopic.php?f=28&t=122689 but for the opposite case basically.)
DaradBur
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Mar 28, 2025 12:23 pm
Contact:

Re: Allow setting number on choose-elem-button

Post by DaradBur »

Seconded, this would help not having to have two distinct cases for circuit conditions.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15441
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow setting number on choose-elem-button

Post by Rseding91 »

This is unfortunately not that simple. There is no "choose elem and number" GUI/Widget for virtually any of the elem types. So, we would need to write all of them, with tests - in order for this to become a thing. That's a ton of GUI work that someone would have to sign up for - and so far nobody has shown interest.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Sharparam
Inserter
Inserter
Posts: 29
Joined: Sat Mar 25, 2023 11:21 pm
Contact:

Re: Allow setting number on choose-elem-button

Post by Sharparam »

Rseding91 wrote: Fri Apr 25, 2025 1:55 pm There is no "choose elem and number" GUI/Widget for virtually any of the elem types.
Is this referring to the picker dialog shown to the user when clicking the button?

Getting that functionality would be very nice as well (because currently the one used by the game itself and the one available to mod developers are different and the mod one lacks a lot of features like being able to hide virtual signals (but there's a separate thread for that).)

But I don't feel like that's a required feature if it means making the primary feature discussed in this thread be delayed indefinitely. If mods can just manually set the number to be displayed on a corner label like the base game is able to do, that will be sufficient for many usecases (and we can continue to use a separate number field for players to input the number, like we already have to do).

Surely just exposing a label like that (without the whole picker dialog rework) would be much easier to do?
Post Reply

Return to “Modding interface requests”