New GUI element: select-a-signal
New GUI element: select-a-signal
http://lua-api.factorio.com/latest/LuaGuiElement.html
The select a signal dialog is not currently accessible to modders and I'm hoping to get that changed
The element itself would operate similar to either the sprite-button, or more preferably the button used in the combinator windows.
On clicking it, the modal dialog would appear and the gui_on_click event would be generated when the window closes.
When the window closes, the selected signal would be updated to a variable stored in the GUIelement class. If no signal was selected, the variable is not updated.
The select a signal dialog is not currently accessible to modders and I'm hoping to get that changed
The element itself would operate similar to either the sprite-button, or more preferably the button used in the combinator windows.
On clicking it, the modal dialog would appear and the gui_on_click event would be generated when the window closes.
When the window closes, the selected signal would be updated to a variable stored in the GUIelement class. If no signal was selected, the variable is not updated.
Re: New GUI element: select-a-signal
It would be better if there is GUI type "virtual-signal-slot", which will show a slot button. Users can select virtual signal after clicking the button, just like selecting signal for the combinators. This way, we modders don't need to deal with the signal selection window. But a new event may be needed for getting the selected signal, maybe on_gui_virtual_signal_selected.
Similarly, another GUI type "item-filter-slot" can also be implemented like this.
If you are looking for customized signal selection window, you can always do that by iterating game.virtual_signal_prototypes and drawing sprite button for each signal.
Similarly, another GUI type "item-filter-slot" can also be implemented like this.
![Cool 8-)](./images/smilies/icon_cool.gif)
If you are looking for customized signal selection window, you can always do that by iterating game.virtual_signal_prototypes and drawing sprite button for each signal.
Re: New GUI element: select-a-signal
I imagine the data would be stored via a new variable in the GUIelement class, and raise the on_gui_clicked event after the select a signal window was closed.Mooncat wrote:It would be better if there is GUI type "virtual-signal-slot", which will show a slot button. Users can select virtual signal after clicking the button, just like selecting signal for the combinators. This way, we modders don't need to deal with the signal selection window. But a new event may be needed for getting the selected signal, maybe on_gui_virtual_signal_selected.
I'm looking at making the window myself, but unfortunately I need to iterate items and fluids as well as virtual signals.
making the item-filter-slot accessiable in a similar fashion would also be nice.
Re: New GUI element: select-a-signal
What I might be able to do is give access to the "choose-X" widgets we have.
Specifically we have the following dedicated widget types we use:
Specifically we have the following dedicated widget types we use:
- ChooseEntityButton
- ChooseItemButton
- ChooseSignalButton
If you want to get ahold of me I'm almost always on Discord.
Re: New GUI element: select-a-signal
that would work perfectly.Rseding91 wrote:What I might be able to do is give access to the "choose-X" widgets we have.
Specifically we have the following dedicated widget types we use:
ChooseEntityButton
ChooseItemButton
ChooseSignalButton
Where each of them allows selecting one of the associated types through the normal pop-over GUI. They're used for signals, filters, and such.
Re: New GUI element: select-a-signal
That would be one of the best additions to .15!
Re: New GUI element: select-a-signal
We really need a FFF about all the changes on the GUI system once they are implemented.
#cantwaitfortheupdate
![Laughing :lol:](./images/smilies/icon_lol.gif)
Re: New GUI element: select-a-signal
+1
This would allow me to work around different issue.
This would allow me to work around different issue.
Re: New GUI element: select-a-signal
is there any update on the status of this?
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: New GUI element: select-a-signal
+1 to this:
Rseding91 wrote:What I might be able to do is give access to the "choose-X" widgets we have.
- ChooseEntityButton
- ChooseItemButton
- ChooseSignalButton
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: New GUI element: select-a-signal
Apparently the feature is implemented.