Repository navigation
Hotspot tile picker redesign, and a decal image picker - #260
Merged
Merged
Conversation
The tile picker chooses for each hotspot material on the surfaces it is given ("Sheet of"), says how many surfaces each tile fits, and pins a tile on that material's surfaces only. It follows the surface selection while open and stays open to choose for each material. Fit states come from matching: fits all, fits some with a count, doesn't fit (inside corner pieces always), and a pin mark for Disabled and Alternate tiles. A bordered tile shows its inside corner pieces. Find by name, fitting only, fit and 1:1 zoom, wheel zoom and middle drag pan, pages for variants and other sheets, a legend with a summary, and an info row. The popup resizes from its corner and remembers its size.
It opens from the hotspot tile field (surface inspector and UV tool), whose text says what each material keeps, and from "Choose tile..." in the Surface Browser.
Decals get their own image picker: the material's texture over a checkerboard, Whole texture, find, and fit and 1:1 zoom. Picking sets every selected decal in one undo step.
…s fit The diagnostic colours were drawn whenever the view mode saved in the editor's preferences was on, also with the overlay closed, so surfaces looked tinted with nothing to turn it off. They are now drawn only in a scene view that shows the overlay. In a narrow Surface Options overlay the surface flags go one to a row, but the material block kept the height of two to a row: the last toggles were drawn over the physics material and the surface flags under it. The block now takes the height the flags need in the width it has.
The materials row is only there when the surfaces have more than one hotspot material, without the surface counts. Automatic is now "Automatic tile selection", and Fitting only is gone.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #238. Follows the tile picker section of the surface tools brief and the answers to the questions about it (pins stay per generator surface, variant pages pin, inside corner pieces never fit, decals get their own picker, only hotspot surfaces are counted).
Tile picker
HotspotMatcher.Fits): fits all, fits some with an "n/m" count, doesn't fit (dark, not clickable), and a pin mark for Disabled and Alternate tiles. Inside corner pieces always count as not fitting. A hovered or pinned bordered tile shows its inside corner pieces dashed, and the info row names them; hovering the pieces names the tiles using them.Decal image picker
Replaces the decal inspector's use of the tile picker:
Differences from the brief
Also fixed
Tests
New fixtures:
HotspotTileChoiceTests,HotspotSheetViewTests,DecalImagePickerTests,SurfaceOptionsLayoutTests. All EditMode tests pass exceptChiselGeneratorSizeTests.SpiralStairsFilledDown_HaveWallsDownToTheFloor(Up, Down), known failures tracked in #252.