GUI Unifyer

by snouz

Forces mod buttons to look uniform and aligned, harminizes icons, and adds visual options for buttons. Supports about 116 mods with buttons (=most of them) : Factory Planner, Helmod, YARM, Module Inserter, Bob's mods, Pyanodon, Schall's mods, Todolist, Creative Mod, BeastFinder, Blueprint-request, CleanMap, Death Counter, FJEI, 248k, Hive Mind, Outpost Planner, Silo Stats, Attila Zoom, Zoom, Auto Trash, Teleportation, RPG, Trashcan, Kuxynator's mods, Factorissimo2...

Tweaks
2 years ago
1.1
43.5K

i [PENDING] LTN Manager Icon

2 years ago

Can you pls add an icon for the LTN Manager? https://mods.factorio.com/mod/LtnManager

i asked him for this cooperation with your mod: https://github.com/raiguard/Factorio-LtnManager/issues/145

2 years ago
(updated 2 years ago)

A better icon for this might also be the icon for LTN stops themselves. It would fit in better if LTNM's icon doesn't work out.

(edit: Due to LTN's license, definitely don't copy the art into this mod, just source it from LTN itself)

2 years ago

Hi therock180 and raiguard

I've been reading the code of ltnm and the official documentation. Maybe you can help me make it happen. Seems like the only way to trigger your gui is to either press the shortcut or press the custom-input "ltnm-toggle-gui". I don't have access to your script "scripts.gui.main.toggle" and there's no function to trigger the custom input from GuiElement button or sprite-button. So I want to add a function that listens to my button press and triggers the custom-input "ltnm-toggle-gui" (preferably the custom input itself, not the default value ctrl+T), and so far, I can't find anything in the official documentation about how to trigger one without actually pressing the keys.

https://wiki.factorio.com/Tutorial:Script_interfaces#Custom_input (only shows how to listen to one)
https://wiki.factorio.com/Prototype/CustomInput

If you have the answer or an easier solution, I'll add that with an optional setting attached !

(funny you mentioned the icon, I did contribute graphically to LTN recently. https://github.com/Yousei9/Logistic-Train-Network/pull/266, I didn't touch this icon but most of the rest)

2 years ago

Oh lol, I didn't realize that you were the one who did the art for LTN! That's a funny coincidence.

What I can do is add a remote interface to toggle the GUI. So you would write remote.call("LtnManager", "toggle_gui") and it would toggle. I could also add functions to specifically show/hide it if you would like. Does that sound acceptable?

2 years ago

That would totally work ! I just need the toggle, not the turn on / off. I'll look into how I can maybe add the option for other mods as well, that'd be cool.

2 years ago

I've talked to Pi-C, who taught me there's actually a function to call a shortcut:

https://lua-api.factorio.com/latest/LuaPlayer.html#LuaPlayer.set_shortcut_toggled

So I'll test that and my plan is to introduce a lot of optional mod buttons

2 years ago

BTW that method didn't work. Unfortunately, set_shortcut_toggled only applies the toggled status to the button, but doesn't actually trigger its effect. I've opened a ticket for that, got no answer. https://forums.factorio.com/viewtopic.php?f=28&t=100231.
As far as I know then, there's no way to trigger custom-inputs programmatically.

2 years ago

Oh yeah sorry, I could have told you that if I hadn't forgotten about this thread. There is no way to raise custom inputs, unfortunately.

I'm currently rewriting LTN Manager and will add a remote interface to toggle the GUI and read its current state.

2 years ago

Any update on this feature?

Thanks.

2 years ago

I just pushed an LTNM update to add remote interfaces to toggle and read the GUI state. Sorry for forgetting until now!

Functions: https://github.com/raiguard/Factorio-LtnManager/blob/a4d06f803af4022f2ab9d1cc59556d42cdc140b8/src/control.lua#L28

1 year, 11 months ago

+1

New response