Enum GridMode
- Namespace
- MoonBark.GridPlacement.Core.Types
- Assembly
- MoonBark.GridPlacement.Core.dll
Primary mode enum for the grid building/placement system. Represents the current high-level tool or interaction mode the system is in.
Mode vs Action: GridMode is the tool selected (e.g., "Move tool"), while ManipulationAction is the operation performed with that tool (e.g., "Move action" when moving an entity). For move mode, the action is always Move; for rotate mode, action is Rotate.
State relationship: The active manipulation records its ManipulationApplicationState.Mode when IManipulationApplicationService.Start is called. This fixes the mode for that manipulation session (you can't switch from Move to Demolish mid-manipulation).
For mode vs action mapping and which modes support manipulation, see: docs/core/guides/application-state-pattern.md → Mode vs Action
Other modes: Info, Select, Inspect are read-only; Edit, Resize, Paint may have their own specialized workflows separate from standard manipulation.
public enum GridMode
- Extension Methods
Fields
Edit = 5Edit mode - modifying properties of existing objects without moving them. Examples: change color, adjust parameters, toggle flags. May not use standard manipulation workflow; could use direct property editing instead.
Info = 1Information mode - hovering shows data but no modification allowed. Typically: hover-to-inspect, tooltip display, cursor info overlay.
Inspect = 7Inspect mode - detailed examination of entity properties without any modification. Similar to Info but typically with richer UI panel display.
Move = 3Move mode - relocating existing objects via drag-and-drop. Fully supports manipulation lifecycle: ghost on Start, cursor-following preview on UpdateTarget, entity update on Confirm, ghost removal on Cancel.
Off = 0System is disabled. No building or manipulation interactions occur. This is the default when no tool is active (except Inspection mode).
Paint = 10Paint mode - modifying surface or terrain data with brush strokes. Typically uses a different workflow (stamp/brush pattern) rather than entity manipulation.
Place = 2Placement mode - placing new objects at empty grid cells. Requires a selected blueprint/resource. May implement IManipulationApplicationService for ghost preview and placement confirmation workflow.
Remove = 4Remove/demolish mode - deleting objects from the scene. May be instant action or gated behind confirmation dialog depending on game design. Often uses Demolish.
Resize = 8Resize mode - changing the dimensions/spans of grid-placed objects. May support drag-to-resize with preview (similar to Move manipulation).
Rotate = 9Rotate mode - rotating existing objects. Supports cyclic rotation (e.g., 0° → 90° → 180° → 270° → 0° per click). Often paired with FlipH/FlipV actions for full orientation control. May use standard manipulation workflow with ghost showing rotation preview.
Select = 6Select mode - selecting entities without immediate modification. Used for multi-select, group operations, or context menu activation.