Slider (LuaGuiElement)

User avatar
maroder
Inserter
Inserter
Posts: 47
Joined: Mon Apr 27, 2015 1:02 pm
Contact:

Slider (LuaGuiElement)

Post by maroder »

I do not understand why the slider for modders is still not available. In the game it appeared a long time ago.
For example: the choice of the number of items in the configuration of the logistics of the character, in the logistics of the inserter, in the combinator (with the possibility of entering numbers); in additional parameters for generating the world (without the possibility of entering numbers).
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Slider (LuaGuiElement)

Post by Rseding91 »

The slider is a combination of 4 different GUI elements and has no single-purpose design. Everywhere it's used in-game is custom fit to make it work in that scenario.
If you want to get ahold of me I'm almost always on Discord.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Slider (LuaGuiElement)

Post by bobingabout »

by slider, you mean like, a number selector slider?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Slider (LuaGuiElement)

Post by darkfrei »

I think it was suggested for inventory-same GUI, where you can slide resipes up and down with mouse wheel.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5286
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Slider (LuaGuiElement)

Post by Klonan »

darkfrei wrote:I think it was suggested for inventory-same GUI, where you can slide resipes up and down with mouse wheel.
Thats a scroll pane which is already in the game:
http://lua-api.factorio.com/latest/LuaGuiElement.html
bobingabout wrote:by slider, you mean like, a number selector slider?
I believe he means this:
Image
User avatar
maroder
Inserter
Inserter
Posts: 47
Joined: Mon Apr 27, 2015 1:02 pm
Contact:

Re: Slider (LuaGuiElement)

Post by maroder »

Klonan wrote: I believe he means this:
Image
This is it.
Klonan wrote: The slider is a combination of 4 different GUI elements and has no single-purpose design. Everywhere it's used in-game is custom fit to make it work in that scenario.
I can bind several elements in my script.
I need: 1) to set the "only numbers" parameter for "text-box" (LuaGuiElement).
2) Add a "slider" element that will have values from 0 to 1.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Slider (LuaGuiElement)

Post by eradicator »

Rseding91 wrote:The slider is a combination of 4 different GUI elements and has no single-purpose design. Everywhere it's used in-game is custom fit to make it work in that scenario.
What four elemets are that? If i had to guess without any knowledge of the code it looks like a progressbar with a "sliding button" on top of it (where the progress bar "happens" to be filled exactly up to the buttons position).

There's no need to have a premade dedicated input-text field there as that is easily addable manually (and needs to be styled anyway) as the picture suggests(?) ...Actually a clickable progressbar (i.e. without the button) would be a sufficiently usable substitute if it returns a value between 0 and 1.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Slider (LuaGuiElement)

Post by Rseding91 »

I've added support for the standalone slider element type for 0.16.
If you want to get ahold of me I'm almost always on Discord.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Slider (LuaGuiElement)

Post by eradicator »

Rseding91 wrote:I've added support for the standalone slider element type for 0.16.
:mrgreen: Thanks once again.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Implemented mod requests”