[Solved] Rich text input assistant GUI

This is the place to request new mods or give ideas about what could be done.
Post Reply
Schallfalke
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Oct 28, 2018 7:57 am
Contact:

[Solved] Rich text input assistant GUI

Post by Schallfalke »

My main use would be using icons in station names (e.g., "Copper ore unload", "Copper ore load 1", etc.). Replacing those text with icons (as rich text) would be nice and quick to look up. Another use could be typing those rich text into chat.

I expect the following features to be in the mod (main directions, but can be adjusted if needed):
  1. A small main GUI on the side (or movable), with clickable icon categories (item, fluid, signal) buttons/checkboxes.
  2. When an icon category is selected, a new panel (either new pop-up or just within main GUI) having all available icons shown as buttons. Somehow look like the player crafting menu, or chart tag icon selection.
  3. A text field in the main GUI. When one of the above icon button is pressed, the mod generates the corresponding rich text in this text field.
  4. If possible, clicking those icon buttons will "automatically" copy the rich text to clipboard directly. (Does this operation exist in Factorio?)
  5. The generated text can then be pasted by player, into the station name input field or chat.
Wonder if any modder willing to make that? Thanks in advance. :)

PS: I am a modder myself, but I am very unfamiliar with GUI in Factorio. And I don't know how to handle potential out of sync problem (caused by GUI) in multiplayer game. So I would leave this whole idea to expert modder(s).

Solution:
LuziferSenpai has kindly created mod Rich Text Helper. Check it out!
Last edited by Schallfalke on Wed Sep 25, 2019 8:46 pm, edited 2 times in total.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Rich text input assistant GUI

Post by darkfrei »

Like this GUI?
Image
This GUI is from Creative Chests

slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: Rich text input assistant GUI

Post by slippycheeze »

Schallfalke wrote:
Thu Jul 25, 2019 10:13 pm
PS: I am a modder myself, but I am very unfamiliar with GUI in Factorio. And I don't know how to handle potential out of sync problem (caused by GUI) in multiplayer game. So I would leave this whole idea to expert modder(s).
The good news is that this requires absolutely no saved state. Everything is purely local, both in the GUI, and in copying to the clipboard. So long as you don't do anything other than provide the string there is no potential for sync issues.

OTOH, you can't access the clipboard through the Lua API so far as I can tell. That you would need to make a feature request for.

Schallfalke
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Oct 28, 2018 7:57 am
Contact:

Re: Rich text input assistant GUI

Post by Schallfalke »

darkfrei wrote:
Fri Jul 26, 2019 7:22 pm
Like this GUI?
Image
This GUI is from Creative Chests
Yes, somehow like that, although I prefer it to be categorized and smaller (thus it can be side-by-side with the station name input box). The vanilla map chart tag selection menu have the right tabs and size.
Tag GUI.png
Tag GUI.png (149.45 KiB) Viewed 2900 times
slippycheeze wrote:
Fri Jul 26, 2019 9:07 pm
Schallfalke wrote:
Thu Jul 25, 2019 10:13 pm
PS: I am a modder myself, but I am very unfamiliar with GUI in Factorio. And I don't know how to handle potential out of sync problem (caused by GUI) in multiplayer game. So I would leave this whole idea to expert modder(s).
The good news is that this requires absolutely no saved state. Everything is purely local, both in the GUI, and in copying to the clipboard. So long as you don't do anything other than provide the string there is no potential for sync issues.

OTOH, you can't access the clipboard through the Lua API so far as I can tell. That you would need to make a feature request for.
Good information. So I can consider doing this myself, if and only if no one else are interested to do this. Someone will probably make this already, while I will need time to learn the GUI-related functions.
Manual copy & paste is good enough for me. Maybe can request the Lua API support and update in the future, after that is done.

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Rich text input assistant GUI

Post by LuziferSenpai »

Is in WORK!
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai


User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Rich text input assistant GUI

Post by LuziferSenpai »

Schallfalke wrote:
Sun Sep 01, 2019 5:32 pm
LuziferSenpai wrote:
Sun Sep 01, 2019 3:26 am
Is in WORK!
Thanks! Looking forward to it. :)
https://mods.factorio.com/mod/Rich_Text_Helper
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

mrvn
Smart Inserter
Smart Inserter
Posts: 5709
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Rich text input assistant GUI

Post by mrvn »

LuziferSenpai wrote:
Thu Sep 19, 2019 1:43 pm
Schallfalke wrote:
Sun Sep 01, 2019 5:32 pm
LuziferSenpai wrote:
Sun Sep 01, 2019 3:26 am
Is in WORK!
Thanks! Looking forward to it. :)
https://mods.factorio.com/mod/Rich_Text_Helper
I often name my station by the recipe the satelite factory runs and the inputs or results. It would be nice if one could copy&paste from an assembler into the GUI or drop a blueprint of an assembler into the GUI and get a rich text matching
a) the recipe name
b) the inputs of the recipe
c) the result of the recipe

User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 333
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Rich text input assistant GUI

Post by LuziferSenpai »

I can work on that, but pls write something like that inside my Github ;)
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai

Schallfalke
Fast Inserter
Fast Inserter
Posts: 162
Joined: Sun Oct 28, 2018 7:57 am
Contact:

Re: Rich text input assistant GUI

Post by Schallfalke »

LuziferSenpai wrote:
Thu Sep 19, 2019 1:43 pm
Schallfalke wrote:
Sun Sep 01, 2019 5:32 pm
LuziferSenpai wrote:
Sun Sep 01, 2019 3:26 am
Is in WORK!
Thanks! Looking forward to it. :)
https://mods.factorio.com/mod/Rich_Text_Helper
Thanks for your work!
Too bad I did not notice it earlier!

Briefly tested, and your mod achieved what I wanted. :D

Post Reply

Return to “Ideas and Requests For Mods”