For GUIs that need to display large amounts of changing information inside a scroll-pane, It would be very useful to be able to tell which GUI elements are actually currently visible in order to avoid having to update large numbers of invisible elements.
I'm thinking either a boolean variable or a boolean function to check if the element is currently visible on screen. For a flow or tab, it would be considered visible if any sub-element is visible.
Current visibility check for GUI elements
-
- Inserter
- Posts: 28
- Joined: Fri Jun 14, 2024 12:33 am
- Contact:
Re: Current visibility check for GUI elements
But what about mods that make frames/flows/tables invisible so they don't have to update the "visible" flag of large numbers of elements within these containers? That's what I do in some of my mods.scruffyvoltherder wrote: Tue Aug 12, 2025 11:50 pm [...] It would be very useful to be able to tell which GUI elements are actually currently visible in order to avoid having to update large numbers of invisible elements. [...] For a flow or tab, it would be considered visible if any sub-element is visible.

A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
-
- Inserter
- Posts: 28
- Joined: Fri Jun 14, 2024 12:33 am
- Contact:
Re: Current visibility check for GUI elements
If you made the frame or flow invisible, none of its sub-elements would be rendered, so it would not be considered currently visible.Pi-C wrote: Wed Aug 13, 2025 9:11 amBut what about mods that make frames/flows/tables invisible so they don't have to update the "visible" flag of large numbers of elements within these containers? That's what I do in some of my mods.scruffyvoltherder wrote: Tue Aug 12, 2025 11:50 pm [...] It would be very useful to be able to tell which GUI elements are actually currently visible in order to avoid having to update large numbers of invisible elements. [...] For a flow or tab, it would be considered visible if any sub-element is visible.![]()
Re: Current visibility check for GUI elements
This feels unlikely because visibility is not part of game state and as such it would require sending input actions each time visibility changes. That would be a lot of data that could be changing each tick causing significant network traffic when playing MP.
-
- Inserter
- Posts: 28
- Joined: Fri Jun 14, 2024 12:33 am
- Contact:
Re: Current visibility check for GUI elements
I imagine that being able to read element sizes and the scroll-pane scrollbar positions would run into the same problems?
I'll probably just have to manage scrolling with up/down buttons. Would it be possible to get a vertical slider component?
I'll probably just have to manage scrolling with up/down buttons. Would it be possible to get a vertical slider component?