Page 1 of 1

Slider (LuaGuiElement)

Posted: Thu Aug 31, 2017 7:39 am
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).

Re: Slider (LuaGuiElement)

Posted: Thu Aug 31, 2017 6:56 pm
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.

Re: Slider (LuaGuiElement)

Posted: Fri Sep 01, 2017 8:40 am
by bobingabout
by slider, you mean like, a number selector slider?

Re: Slider (LuaGuiElement)

Posted: Fri Sep 01, 2017 10:24 am
by darkfrei
I think it was suggested for inventory-same GUI, where you can slide resipes up and down with mouse wheel.

Re: Slider (LuaGuiElement)

Posted: Fri Sep 01, 2017 11:59 am
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

Re: Slider (LuaGuiElement)

Posted: Sun Sep 03, 2017 3:33 pm
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.

Re: Slider (LuaGuiElement)

Posted: Tue Sep 12, 2017 9:13 pm
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.

Re: Slider (LuaGuiElement)

Posted: Sat Oct 07, 2017 4:24 am
by Rseding91
I've added support for the standalone slider element type for 0.16.

Re: Slider (LuaGuiElement)

Posted: Sat Oct 07, 2017 5:16 am
by eradicator
Rseding91 wrote:I've added support for the standalone slider element type for 0.16.
:mrgreen: Thanks once again.