[solved] scroll-pane and radiobutton not in API docs

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

[solved] scroll-pane and radiobutton not in API docs

Post by aubergine18 »

There are two big chunks of text near top of this page that list all the GUI element types, but neither mention scroll-pane or radiobutton: http://lua-api.factorio.com/latest/LuaGuiElement.html

Note: scroll-pane is mentioned way down near the bottom of the page, but barely noticeable unless reading all the property descriptions carefully

Prior to realising that there was a specific 'scroll-pane' type, upon reading the API docs page linked above I always had the impression that scrollbars were something that could be added to any frame or flow simply by setting the scroll policies on those things, which in turn is why I always thought those options were broken - I didn't realise they were specific to special 'scroll-pane' elements.
Last edited by aubergine18 on Tue Sep 20, 2016 11:46 pm, edited 1 time in total.
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.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by Mooncat »

Is radiobutton really a thing!? :shock:

Anyway, according to my experience, this thread is going to be moved to the bug reports zone. :lol:
Rseding91
Factorio Staff
Factorio Staff
Posts: 14913
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by Rseding91 »

Mooncat wrote:Is radiobutton really a thing!? :shock:

Anyway, according to my experience, this thread is going to be moved to the bug reports zone. :lol:
I already fixed it :P if you refresh the link.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by Mooncat »

Rseding91 wrote:
Mooncat wrote:Is radiobutton really a thing!? :shock:

Anyway, according to my experience, this thread is going to be moved to the bug reports zone. :lol:
I already fixed it :P if you refresh the link.
That's great! Wow, I don't know we also have "sprite". :o
Would you mind also add their required attributes to the add function please? :P
Rseding91
Factorio Staff
Factorio Staff
Posts: 14913
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by Rseding91 »

Mooncat wrote:
Rseding91 wrote:
Mooncat wrote:Is radiobutton really a thing!? :shock:

Anyway, according to my experience, this thread is going to be moved to the bug reports zone. :lol:
I already fixed it :P if you refresh the link.
That's great! Wow, I don't know we also have "sprite". :o
Would you mind also add their required attributes to the add function please? :P
I did, scroll pane has none and sprite is done through the style.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by Mooncat »

Oh, I missed "radio-button" in the middle. :lol: And I thought "sprite" should be similar to "sprite-button".
I think I will need to find an example for the sprite style. Thanks for the explanation. :D
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by aubergine18 »

Wait, there's a 'sprite' now? Which version was that introduced?

EDIT: Is there a distinct style sheet prototype format for sprites?
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.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by bobingabout »

I personally found the radio button options while looking at some of the base game code, but decided to use checkbox style instead.
As for the scrole-pane? I had heard mention of it being added, but haven't seen, not used it myself. It would be an interesting one to use.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by Mooncat »

bobingabout wrote:As for the scrole-pane? I had heard mention of it being added, but haven't seen, not used it myself.
Now you see it: :P
Inventory filter inside a scroll-pane
It can limits your UI size even if it has many elements inside, so users with small screens will be happy. 8-)
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by aubergine18 »

Helfima (Helmod author) helped me with scroll-pane: #1

There doesn't seem to be a way to customise the scroll bar and slider for a specific scroll pane with style prototypes - it looks like there's just one default for those for entire GUI theme currently.

As for radio button, discovered that a few days ago: #18

With regards to sprite (the 'sprite' GUI element and the 'sprite' prototype), I'm still confused. The prototype seems quite unlike any other GUI style for following reasons: #33 #34

* It appears to be an image construct, yet it's named (unlike all other image types)
* It has it's own category: data.raw.sprite - unlike any other image or any other style prototype
* It seems to be both the image and the style for a `sprite` element (and can be used also as the 'sprite' setting of a 'sprite-button' element) - unlike any other image type or style type
* A sprite gui element apparently has no mandatory properties, unlike most other elements

/me confused by sprites
Last edited by aubergine18 on Mon Sep 19, 2016 9:31 am, edited 1 time in total.
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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14913
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by Rseding91 »

aubergine18 wrote:Helfima (Helmod author) helped me with scroll-pane: https://github.com/aubergine10/Style/issues/1

There doesn't seem to be a way to customise the scroll bar and slider for a specific scroll pane with style prototypes - it looks like there's just one default for those for entire GUI theme currently.

As for radio button, discovered that a few days ago: https://github.com/aubergine10/Style/issues/18

With regards to sprite (the 'sprite' GUI element and the 'sprite' prototype), I'm still confused. The prototype seems quite unlike any other GUI style for following reasons: https://github.com/aubergine10/Style/issues/33

* It appears to be an image construct, yet it's named (unlike all other image types)
* It has it's own category: data.raw.sprite - unlike any other image or any other style prototype
* It seems to be both the image and the style for a `sprite` element (and can be used also as the 'sprite' setting of a 'sprite-button' element) - unlike any other image type or style type
* A sprite gui element apparently has no mandatory properties, unlike most other elements

/me confused by sprites
The sprite type works like the sprite button except you can't click it - it just exists.
If you want to get ahold of me I'm almost always on Discord.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: scroll-pane and radiobutton not in API docs

Post by aubergine18 »

Rseding91 wrote:The sprite type works like the sprite button except you can't click it - it just exists.
Yup - I get the `control.lua` aspect of it, it's more the `data.lua` aspect that's confusing me.

There doesn't seem to be a `type="sprite_style"` (if there is, I can't find one after dumping data.raw)

So I'm left assuming the stuff on data.raw.sprite can be used as styles for the `sprite` element (and also the `sprite-button`) element.

Do sprite and sprite-button both have extra logic that allows them to use data.raw.sprite and also data.raw.gui-style.sprite_style?
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.
Post Reply

Return to “Implemented mod requests”