Chris' Tutorials
Docs/Grid Placement

Class

BrushShapeIconButton

Generated GDScript class reference for GridPlacement.BrushShapeIconButton.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

Renders a brush-shape outline as a procedurally-drawn icon inside a [Button]. Used by [TerrainPaletteUI] to give each brush-mode button a visible 36x36 glyph without relying on a [Texture2D] resource (which fails to load in some web exports and renders as a solid dark rectangle —). Drives painting through [method CanvasItem._draw] so the icon works in headless smoke tests, web exports, and desktop builds equally. The shape generator is self-contained (no dependency on [BrushShapeGenerator]) so this UI helper has no build-system coupling.

Source: addons/grid_placement/ui/terrain/brush_shape_icon_button.gd

Syntax

class BrushShapeIconButton extends Button

Members

NameKindSummary
brush_shapePropertyObjectTool enum value mirrors [enum PlacementEnums.ObjectTool]: 0 SINGLE, 1 LINE, 2 RECTANGLE_FILL, 3 RECTANGLE_OUTLINE, 4 FLOOD_FILL.
brush_widthProperty
brush_heightProperty
is_activePropertyWhen true, the dots render bright white so the glyph remains visible against the brighter "active-shape" background the parent UI applies (see ).
rect_sizeProperty
coordsProperty
loProperty
hiProperty
extentProperty
padProperty
innerProperty
cell_pxProperty
origin_xProperty
origin_yProperty
halfProperty
dot_colorProperty
paintedProperty
posProperty
wProperty
hProperty
coordsProperty
stepsProperty
tProperty
offsetsProperty

Source

addons/grid_placement/ui/terrain/brush_shape_icon_button.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs