GUI questions
Posted: Tue Feb 25, 2020 2:10 pm
1.
I find myself occasionally having to do things like this when handling button clicks and I want to change the state of other things in the gui:Code: Select all
local map_button = event.element.parent.parent.parent.parent.parent["left-column"]["display-map-marker"]
2.
How do you get a table to be horizontally centred within its parent flow or frame? Can't figure it out.3.
I have a WIP that emulates the item filter GUI but in a dark styley:It uses tabs with a custom style (for icon tabs, use rich text with a bigger font size). The problem is, there can be n item groups and there's only space for 6. More than 6, and horrible dead space appears somewhere, you can push that dead space around but dead is dead. In the current gui, it's buttons and not tabs - you can have multiple rows of buttons but tabs are restricted to one row because they are tabs.
What to do? I thought about having left and right arrow buttons appear next to the tabs if there are more than 6 tabs, so you can switch the visibility of the tabs into groups-of-tabs - but how to position a button within that tab space? (If you're wondering why not just use the choose-elem-button element which pops open the native item filter gui, it's because I want multiple kinds of filter at once, not just items, and choose-elem buttons don't support that.)