Vixen
02b45cc4
csharp
public sealed class SelectMode

The mode the editor is in when it is not in another one: pick and transform entities.

Read the guide page for this →

Remarks

The mode that has to exist for the others to be leaveable, and it does nothing. That is the point. Doc 20's A1 asks for IEditorMode to ship with one mode so that the seam is proven and nothing depends on the mode set being final; this is that mode, and every member of it is the neutral answer — no context, no panel, no toolbar, and no claim on any input at all.

⚠ Which is why entering it is the same as the editor having no modes. A viewport in Select mode behaves exactly as the viewport did before modes existed: 1..9 are the view bookmarks, a click picks an entity, and the gizmo has the drag. Any other arrangement would mean the shipped editor's behaviour depended on a feature it does not use yet.

It lives here rather than in an application because it is the definition of "no mode" and every host of this shell that has a viewport wants the same one.

Fields and properties (8)

  • public const string ModeId

    What the mode is called, everywhere an id is wanted.

  • public string Id

    What everything refers to it by: select, blockout.

  • public StringId Title

    What the mode bar's button says.

  • public PathBuilder? Icon

    The glyph on that button, or to draw the title instead.

  • public IconArt? Art

    Coloured art for the mode's button, drawn with the title underneath.

  • public string? Context
  • public string? Panel

    A panel opened while the mode is active, or for none.

  • public IReadOnlyList<ToolbarEntry> Toolbar

    What the mode puts on the mode bar beside the mode buttons.

Methods (6)

  • public void Register(EditorShell shell)

    Puts the mode's commands, bindings and panels into the shell.

  • public void Unregister(EditorShell shell)

    Takes them back out.

  • public void Activated()

    The mode has become the active one.

  • public void Deactivated()

    It has stopped being it.

  • public bool Pointer(PointerEvent args)

    First refusal on a pointer event in the viewport.

  • public bool Key(KeyEvent args)

    First refusal on a key event in the viewport.

Used by (7)

  • BlockoutModeTestsVixen.Editor.Blockout.Tests
  • EditorApplicationVixen.Editor.App
  • EditorModeTestsVixen.Editor.App.Tests
  • FoliageModeTestsVixen.Editor.Terrain.Tests
  • LoadingTestsVixen.Editor.Plugin.Tests
  • SculptSessionTestsVixen.Editor.Terrain.Tests
  • TerrainModeTestsVixen.Editor.Terrain.Tests