-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tiletypes GUI #1130
Tiletypes GUI #1130
Conversation
Taken out of WIP, as the changes from DFHack/dfhack#4645 allow this to function as intended |
center_pen = type(center_pen) == "table" and center_pen or {fg=center_pen} | ||
center_pen.tile_color=true | ||
return { | ||
border_pen, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works? I never tested this particular format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I used tile_color=true
to have the tile_overrides
ascii characters still be colored like in the ascii view. Otherwise they would always be the standard black and white.
Of course ideally I would be using actual sprites instead of colored characters, but it's what I was able to put together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I meant having a combination single- and double- index array. I've tested just the color (no array) and a double-indexed array. I never tried non-table elements in the array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yeah, it didn't used to be possible until I added in the support for different combinations of tables and non-tables in DFHack/dfhack#4622 / DFHack/dfhack#4624, I specifically made sure that that combination was possible cause I knew it would be useful to me :p
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also needs docs in docs/gui/tiletypes.rst
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran out of time at SelectDialog; will finish review later, but I wanted to submit what I had so far for feedback/discussion
Co-authored-by: Myk <[email protected]>
Co-authored-by: Myk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'm ok with merging this now if you are. We can start getting feedback and update as necessary.
Adds a GUI for the
tiletypes
command.Requires the tiletypes interface from DFHack/dfhack#4645 to function
Additionally, I made some self-contained widget stuff for this, which could be cleaned up a bit and extracted to
widgets.lua
or some other file, if they seem useful:makeInlineButtonLabelText
: Able to take in 2widgets.ButtonLabelSpec
, align them, and convert them into a singlewidgets.ButtonLabelSpec
(Used in this GUI for the buttons in the "More Options" window)BoxSelection
: Allows for selecting a box of tiles, has support for both cursor and mouse, lets you change what tiles the selection draws onto the screen, and supports the newDimensionsTooltip
SelectDialog
: Like thegui.materials
popup but without the restriction to materials, allowing you to specify whatever list of items/categories you want (ALlows nesting categories as deep as you want)