Skip to content

Class

BrushShapeIconButton

Generated GDScript class reference for GridPlacement.BrushShapeIconButton.

Status
Current
Version
v6.0
Source updated
Active v6.0 guide line from Grid Placement repo
Generated on
2026-09-01

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 ).