TerrainWaterPropertiesDialog

Package: Libraries.Interface.Controls.Scenes.Dialogs · Inherits from: Libraries.Interface.Events.TextChangeListener, Libraries.Interface.Controls.Control, Libraries.Interface.Forms.FormPrimitiveContainer, Libraries.Interface.Item, Libraries.Interface.Controls.Scenes.Dialogs.PropertiesDialog, Libraries.Interface.Item2D, Libraries.Language.Object, Libraries.Interface.Events.SelectionListener, Libraries.Interface.Controls.Dialog

The TerrainWaterPropertiesDialog is a selected terrain's Water section: its sea, its lakes, its rivers, and the water's look. Its parts fold, each with a chevron, as the Properties panel's sections do (PropertiesFoldItem): Sea, Lakes, each lake, Rivers, each river, New rivers and Look. Each part's title says what it holds, with numbers rounded for reading, such as "Lake 1, level 28.8, about 131 by 120". - Sea turns the sea on or off and sets its level. - A lake has its name and level, and for a rectangle lake its middle and size, and Remove lake. Lakes are made with the Brush section's Fill water and Paint water tools. - A river has its name, width, depth and speed, Edit path, which chooses the River tool and the river's first point, and Remove river. Rivers are drawn with the River tool. - New rivers sets the width and depth the River tool draws with. - Look is the look every sheet of the terrain's water shares: its shallow and deep colors (red, green, blue and alpha, each from 0 to 1; alpha is how much ground the water hides), clarity, shore fade, and its ripples' size, speed, roughness and strength. A field's value is taken when the focus leaves it. Every change can be undone. It shows in the scene editor's Properties panel, after the Foliage section.

Variables

  • integer REMOVE_LAKE
  • integer FINISH_RIVER
  • integer EDIT_RIVER
  • integer SEA: What a button does.
  • integer STOP_RIVER
  • integer RIVER_ENDS_IN_WATER: is LAKE_PART plus its number, and a river's RIVER_PART plus its.
  • integer REMOVE_RIVER

Actions

ButtonActivated(integer kind, integer lake)

This action is called by the section's buttons and the Sea checkbox.

Parameters

  • kind integer: One of the button kinds, such as REMOVE_LAKE
  • lake integer: The lake or river, from 0

FieldLeft(Libraries.Interface.Controls.TextField field)

This action is called when the focus leaves one of the section's fields: its value is taken. Text that isn't a number is ignored, and a number shown rounded and left as it was changes nothing.

Parameters

FocusField()

Moves the focus to the Sea part's header.

FoldChanged(integer partKey, boolean open)

This action is called when one of the section's parts is opened or closed with its chevron: the part is shown or hidden.

Parameters

  • partKey integer: The part's number
  • open boolean: True if it was opened

OpenRiverPart(integer index)

This action opens a river's part, such as after Edit path, so its settings show.

Parameters

  • index integer: The river, from 0

Refresh()

Shows the terrain's water again, after it changed.

SelectionChanged(Libraries.Interface.Events.SelectionEvent event)

This action shows the dialog when a terrain is selected, and hides it otherwise.

Parameters

SetFields(Libraries.Interface.Controls.Scenes.Items.EditorItem item)

This action sets the fields from a selected terrain's highlight.

Parameters

SetTerrain(Libraries.Interface.Controls.Scenes.Items.EditorTerrain terrain)

This action shows a terrain's water: the status line, then each part that is there, open or folded.

Parameters

SliderTaken(Libraries.Interface.Controls.TextField field)

A slider's value was finally changed, or a number typed in its field: taken as when the focus leaves a field.

Parameters

Inherited Actions

263 actions from Libraries.Interface.Controls.Control
20 actions from Libraries.Interface.Controls.Dialog
33 actions from Libraries.Interface.Controls.Scenes.Dialogs.PropertiesDialog
1 action from Libraries.Interface.Events.TextChangeListener
8 actions from Libraries.Interface.Forms.FormPrimitiveContainer
57 actions from Libraries.Interface.Item
200 actions from Libraries.Interface.Item2D
3 actions from Libraries.Language.Object