LayerPhysicsPropertiesDialog

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 LayerPhysicsPropertiesDialog is a layer's Physics section: whether a game using the scene runs physics in the layer, and its gravity, with sliders. Gravity starts at 9.8 down (y -9.8), as on Earth. A 2D layer has no z. The scene editor itself never runs physics; these are saved with the scene. Every change is one step to undo. A 3D layer also has Show collision shapes, the editor's own setting (not saved with the scene, and not a step to undo): an outline of each physics item's collision box, colored by its responsiveness. It shows in the scene editor's Properties panel when a layer, 2D or 3D, is selected.

Actions

CheckboxChanged()

This action is called when the Physics in games or Show collision shapes checkbox is checked or unchecked.

FocusField()

Moves the focus to the Physics in games checkbox.

Refresh()

Shows the layer's physics again, after it changed.

SelectionChanged(Libraries.Interface.Events.SelectionEvent event)

This action shows the section when a layer is selected, with no item, and hides it otherwise.

Parameters

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

This action has no item fields to set; the section follows the selected layer.

Parameters

SetLayer(Libraries.Interface.Controls.Scenes.Layers.EditorLayer layer)

This action shows a layer's physics in games: whether it is on, and its gravity. A 2D layer has no z.

Parameters

SliderTaken(Libraries.Interface.Controls.TextField field)

This action is called when a gravity slider's value was finally changed, or a number typed in its field. Text that isn't a number is ignored.

Parameters

Inherited Actions

263 actions from Libraries.Interface.Controls.Control
20 actions from Libraries.Interface.Controls.Dialog
34 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