Skip to content

Hotspot tile picker redesign, and a decal image picker - #260

Merged
LogicalError merged 3 commits into
mainfrom
hotspot-tile-picker
Nov 9, 2026
Merged

LogicalError merged 3 commits into
mainfrom
hotspot-tile-picker

Conversation

@LogicalError

@LogicalError LogicalError commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

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

  • Materials: with more than one hotspot material on the surfaces, a row of buttons switches between them. A pin goes to that material's surfaces only (surfaces with ordinary materials are never changed), in one undo step, and spreads to connected surfaces as edits do.
  • Fit states from matching (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.
  • "Automatic tile selection" (highlighted while active), find by name, Fit / 1:1, wheel zoom and middle drag pan, arrow keys and Enter.
  • Pages: Base, variants (a preview; clicking pins, matching still picks the variant), other sheets.
  • Legend with a summary, info row (name, pixels, aspect, flags, how many surfaces it fits) and Edit layout.
  • Resizable from its corner, 600 wide by default, at least 420 x 420, its size remembered per user.
  • Follows the surfaces live, and stays open so each material can be chosen in turn.
  • Opens from: the hotspot tile field in the surface inspector and the UV tool (its text says what each material keeps, "B2 / Automatic"), and from Choose tile... in the Surface Browser's hotspot box.

Decal image picker

Replaces the decal inspector's use of the tile picker:

  • the material's own texture over a checkerboard, every tile can be chosen
  • Whole texture, find by name, Fit / 1:1, Edit layout
  • picking sets every selected decal in one undo step
  • resizable, 460 wide by default, at least 320 x 320, remembered

Differences from the brief

  • No "Sheet of" label, no "Applies to N of M" and no Fitting only; the materials row only with more than one hotspot material.
  • The info row says "Fits 3 of 4", without "the others stretch": matching places a pinned tile on a surface it doesn't fit, but whether it stretches there hasn't been checked.
  • Both pickers stay open after a pick; the brief doesn't say.

Also fixed

  • Hotspot diagnostic colours with the overlay closed: the view mode saved in the editor's preferences kept tinting hotspot surfaces even when the Chisel Hotspot Diagnostics overlay wasn't shown. They are now drawn only in a scene view that shows the overlay.
  • Overlapping rows in Surface Options: in a narrow overlay the surface flags go one to a row, but the material block kept the height for two to a row, so Receive Shadows and Exclude From GI were drawn over the physics material and the surface flags. The block now takes the height the flags need.

Tests

New fixtures: HotspotTileChoiceTests, HotspotSheetViewTests, DecalImagePickerTests, SurfaceOptionsLayoutTests. All EditMode tests pass except ChiselGeneratorSizeTests.SpiralStairsFilledDown_HaveWallsDownToTheFloor (Up, Down), known failures tracked in #252.

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.
@LogicalError
LogicalError merged commit 11aea90 into main Nov 9, 2026
7 checks passed
@LogicalError
LogicalError deleted the hotspot-tile-picker branch November 9, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hotspot tile picker redesign

1 participant