[solved] scroll-pane and radiobutton not in API docs
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
[solved] scroll-pane and radiobutton not in API docs
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.
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.
Re: scroll-pane and radiobutton not in API docs
Is radiobutton really a thing!?
Anyway, according to my experience, this thread is going to be moved to the bug reports zone.![Laughing :lol:](./images/smilies/icon_lol.gif)
![Shocked :shock:](./images/smilies/icon_eek.gif)
Anyway, according to my experience, this thread is going to be moved to the bug reports zone.
![Laughing :lol:](./images/smilies/icon_lol.gif)
Re: scroll-pane and radiobutton not in API docs
I already fixed itMooncat wrote:Is radiobutton really a thing!?![]()
Anyway, according to my experience, this thread is going to be moved to the bug reports zone.
![Razz :P](./images/smilies/icon_razz.gif)
If you want to get ahold of me I'm almost always on Discord.
Re: scroll-pane and radiobutton not in API docs
That's great! Wow, I don't know we also have "sprite".Rseding91 wrote:I already fixed itMooncat wrote:Is radiobutton really a thing!?![]()
Anyway, according to my experience, this thread is going to be moved to the bug reports zone.if you refresh the link.
![Surprised :o](./images/smilies/icon_e_surprised.gif)
Would you mind also add their required attributes to the add function please?
![Razz :P](./images/smilies/icon_razz.gif)
Re: scroll-pane and radiobutton not in API docs
I did, scroll pane has none and sprite is done through the style.Mooncat wrote:That's great! Wow, I don't know we also have "sprite".Rseding91 wrote:I already fixed itMooncat wrote:Is radiobutton really a thing!?![]()
Anyway, according to my experience, this thread is going to be moved to the bug reports zone.if you refresh the link.
![]()
Would you mind also add their required attributes to the add function please?
If you want to get ahold of me I'm almost always on Discord.
Re: scroll-pane and radiobutton not in API docs
Oh, I missed "radio-button" in the middle.
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.![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
I think I will need to find an example for the sprite style. Thanks for the explanation.
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: scroll-pane and radiobutton not in API docs
Wait, there's a 'sprite' now? Which version was that introduced?
EDIT: Is there a distinct style sheet prototype format for sprites?
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.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: scroll-pane and radiobutton not in API docs
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.
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.
Re: scroll-pane and radiobutton not in API docs
Now you see it:bobingabout wrote:As for the scrole-pane? I had heard mention of it being added, but haven't seen, not used it myself.
![Razz :P](./images/smilies/icon_razz.gif)
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. ![Cool 8-)](./images/smilies/icon_cool.gif)
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: scroll-pane and radiobutton not in API docs
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
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.
Re: scroll-pane and radiobutton not in API docs
The sprite type works like the sprite button except you can't click it - it just exists.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
If you want to get ahold of me I'm almost always on Discord.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: scroll-pane and radiobutton not in API docs
Yup - I get the `control.lua` aspect of it, it's more the `data.lua` aspect that's confusing me.Rseding91 wrote:The sprite type works like the sprite button except you can't click it - it just exists.
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.