EditorInspector

Hereda: ScrollContainer < Container < Control < CanvasItem < Node < Object

Un control utilizado para editar las propiedades de un objeto.

Descripción

This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the EditorInspector used in the editor's Inspector dock, use EditorInterface.get_inspector().

EditorInspector will show properties in the same order as the array returned by Object.get_property_list().

If a property's name is path-like (i.e. if it contains forward slashes), EditorInspector will create nested sections for "directories" along the path. For example, if a property is named highlighting/gdscript/node_path_color, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section.

If a property has @GlobalScope.PROPERTY_USAGE_GROUP usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. EditorInspector will create a top-level section for each group. For example, if a property with group usage is named Collide With and its hint string is collide_with_, a subsequent collide_with_area property will be shown as "Area" inside the "Collide With" section. There is also a special case: when the hint string contains the name of a property, that property is grouped too. This is mainly to help grouping properties like font, font_color and font_size (using the hint string font_).

If a property has @GlobalScope.PROPERTY_USAGE_SUBGROUP usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup.

Note: Unlike sections created from path-like property names, EditorInspector won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names.

Propiedades

bool

draw_focus_border

true (overrides ScrollContainer)

FocusMode

focus_mode

2 (overrides Control)

bool

follow_focus

true (overrides ScrollContainer)

ScrollMode

horizontal_scroll_mode

0 (overrides ScrollContainer)

Métodos

void

edit(object: Object)

Object

get_edited_object()

String

get_selected_path() const

EditorProperty

instantiate_property_editor(object: Object, type: Variant.Type, path: String, hint: PropertyHint, hint_text: String, usage: int, wide: bool = false) static


Señales

edited_object_changed() 🔗

Emitida cuando el objeto que está siendo editado por el inspector ha cambiado.


object_id_selected(id: int) 🔗

Emitida cuando se ha pulsado el botón de edición de un Object en el inspector. Esto se utiliza principalmente en el inspector de árbol de escenas remota.


property_deleted(property: String) 🔗

Emitida cuando se elimina una propiedad del inspector.


property_edited(property: String) 🔗

Emitida cuando una propiedad es editada en el inspector.


property_keyed(property: String, value: Variant, advance: bool) 🔗

Emitida cuando una propiedad es puesta en clave por el inspector. Las propiedades pueden ser tecleadas haciendo clic en el icono "tecla" junto a una propiedad cuando el panel de animación se conmuta.


property_selected(property: String) 🔗

Emitida cuando una propiedad es seleccionada en el inspector.


property_toggled(property: String, checked: bool) 🔗

Emitida cuando una propiedad booleana se conmuta en el inspector.

Nota: Esta señal nunca se emite si la propiedad interna autoclear está activada. Dado que esta propiedad siempre está activada en el inspector del editor, esta señal nunca es emitida por el propio editor.


resource_selected(resource: Resource, path: String) 🔗

Emitida cuando se selecciona un recurso en el inspector.


restart_requested() 🔗

Emitida cuando una propiedad que requiere un reinicio para ser aplicada es editada en el inspector. Esto sólo se usa en los ajustes del proyecto y en los ajustes del editor.


Descripciones de Métodos

void edit(object: Object) 🔗

Shows the properties of the given object in this inspector for editing. To clear the inspector, call this method with null.

Note: If you want to edit an object in the editor's main inspector, use the edit_* methods in EditorInterface instead.


Object get_edited_object() 🔗

Devuelve el objeto actualmente seleccionado en este inspector.


String get_selected_path() const 🔗

Obtiene la ruta de la propiedad seleccionada actualmente.


EditorProperty instantiate_property_editor(object: Object, type: Variant.Type, path: String, hint: PropertyHint, hint_text: String, usage: int, wide: bool = false) static 🔗

Creates a property editor that can be used by plugin UI to edit the specified property of an object.