TerrainSelectionHighlight

Package: Libraries.Interface.Controls.Scenes.Items.Highlights · Inherits from: Libraries.Interface.Controls.Scenes.Items.EditorItem3D, Libraries.Interface.Controls.Scenes.Items.EditorModel, Libraries.Game.Graphics.Model, Libraries.Interface.Controls.Scenes.Items.EditorItem, Libraries.Interface.Item, Libraries.Interface.Item3D, Libraries.Language.Object, Libraries.Interface.Controls.Scenes.Items.Highlights.SelectionHighlight3D, Libraries.Interface.Controls.Scenes.Items.Highlights.SelectionHighlight

TerrainSelectionHighlight is the SelectionHighlight for a terrain. It is a border around the whole terrain, a little above the ground, so the terrain itself can still be seen. A terrain's heights are world positions, so the editor's move, turn and scale keys don't move it: they leave the terrain and its highlight where they are, and say so once each time the terrain is selected.

Actions

GainedFocus(Libraries.Interface.Events.FocusEvent event)

When the terrain gets the focus, its cursor does: it is placed if it has no place yet, its ring shows, and the camera follows it.

Parameters

GainedSelection()

Returns the terrain that is being selected.

GetAccessibilityCursor()

Returns the terrain cursor's reading, which a screen reader reads as a newly selected row each time it changes while the terrain has the focus, with no message: "where am I" first, starting with what just changed, such as "13 x, 40 z. 18 high, grass, hillside" after a move along x, "41 z, 13 x. ..." after a move along z, and "Edge, 13 x, 40 z. ..." when a move was stopped by the edge. It is made again only when the cursor moves, changes size or reaches the edge, so it is cheap to ask every frame, and an edit under a still cursor doesn't make it read again.

Returns

text: The reading, or an empty text while the cursor isn't in use.

GetDescription()

A screen reader reads this as the terrain's help, after its name: what the whole terrain is like (TerrainDescriber:DescribeTerrain, measured again only after the terrain changes), then the cursor's size, its step with the grid on, and the tool if one is chosen. Where the cursor is, is read from its row instead (GetAccessibilityCursor).

Returns

text

GetEditorTerrain()

Returns the terrain that is being selected.

Returns

Libraries.Interface.Controls.Scenes.Items.EditorTerrain

GetItem()

Returns the terrain that is being selected.

Returns

Libraries.Interface.Item

GetScreenBounds()

Returns the part of the window a screen reader outlines: while the terrain cursor is in use and on the ground, the cursor's ring, so the outline follows the cursor; otherwise the border around the whole terrain, as for any item.

Returns

Libraries.Game.Shapes.Rectangle: The rectangle, or undefined if none of it shows.

LoadTerrain(Libraries.Interface.Controls.Scenes.Items.EditorTerrain terrain, Libraries.Interface.Controls.Scenes.SceneEditor controller)

Loads a border around the whole terrain: a flat band just outside its edges, a little above the ground, following the ground's height along each edge. A box over the terrain would hide it, since the 3D view draws a highlight's color nearly solid.

Parameters

LostSelection()

When the terrain stops being selected, its tool is put aside and remembered, so the arrow keys and clicks act on the scene again, and the tool comes back when the user returns.

Move(Libraries.Compute.Vector3 vector)

Returns the part of the window a screen reader outlines: while the terrain cursor is in use and on the ground, the cursor's ring, so the outline follows the cursor; otherwise the border around the whole terrain, as for any item.

Parameters

Move(number x, number y, number z)

The ring's outside edge, with its dark border, as drawn.

Parameters

  • x number
  • y number
  • z number

MoveX(number x)

Move calls too, so they are covered.

Parameters

  • x number

MoveY(number y)

Move calls too, so they are covered.

Parameters

  • y number

MoveZ(number z)

When the terrain stops being selected, its tool is put aside and remembered, so the arrow keys and clicks act on the scene again, and the tool comes back when the user returns.

Parameters

  • z number

ResetScale()

Returns the terrain that is being selected.

Scale(Libraries.Compute.Vector3 vector)

A screen reader reads this as the terrain's help, after its name: what the whole terrain is like (TerrainDescriber:DescribeTerrain, measured again only after the terrain changes), then the cursor's size, its step with the grid on, and the tool if one is chosen. Where the cursor is, is read from its row instead (GetAccessibilityCursor).

Parameters

Scale(number x, number y, number z)

When the terrain gets the focus, its cursor does: it is placed if it has no place yet, its ring shows, and the camera follows it.

Parameters

  • x number
  • y number
  • z number

SetRotation(number newYaw, number newPitch, number newRoll)

Returns the terrain cursor's reading, which a screen reader reads as a newly selected row each time it changes while the terrain has the focus, with no message: "where am I" first, starting with what just changed, such as "13 x, 40 z. 18 high, grass, hillside" after a move along x, "41 z, 13 x. ..." after a move along z, and "Edge, 13 x, 40 z. ..." when a move was stopped by the edge. It is made again only when the cursor moves, changes size or reaches the edge, so it is cheap to ask every frame, and an edit under a still cursor doesn't make it read again.

Parameters

  • newYaw number
  • newPitch number
  • newRoll number

SetRotation(Libraries.Compute.Vector3 rotation)

Only the edge changed: it leads, then the place.

Parameters

Inherited Actions

112 actions from Libraries.Game.Graphics.Model
4 actions from Libraries.Interface.Controls.Scenes.Items.EditorItem
2 actions from Libraries.Interface.Controls.Scenes.Items.EditorItem3D
7 actions from Libraries.Interface.Controls.Scenes.Items.EditorModel
10 actions from Libraries.Interface.Controls.Scenes.Items.Highlights.SelectionHighlight
5 actions from Libraries.Interface.Controls.Scenes.Items.Highlights.SelectionHighlight3D
59 actions from Libraries.Interface.Item
198 actions from Libraries.Interface.Item3D
3 actions from Libraries.Language.Object