EditorInspector
Hérite de : ScrollContainer < Container < Control < CanvasItem < Node < Object
Un contrôle pour modifier les propriétés d'un objet.
Description
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.
Propriétés
draw_focus_border |
|
|
focus_mode |
|
|
follow_focus |
|
|
horizontal_scroll_mode |
|
Méthodes
void |
|
get_selected_path() const |
|
instantiate_property_editor(object: Object, type: Variant.Type, path: String, hint: PropertyHint, hint_text: String, usage: int, wide: bool = false) static |
Signaux
edited_object_changed() 🔗
Emitted when the object being edited by the inspector has changed.
Emitted when the Edit button of an Object has been pressed in the inspector. This is mainly used in the remote scene tree Inspector.
property_deleted(property: String) 🔗
Emitted when a property is removed from the inspector.
property_edited(property: String) 🔗
Émis lorsqu'une propriété est modifiée dans l'inspecteur.
property_keyed(property: String, value: Variant, advance: bool) 🔗
Émis lorsqu'une propriété est utilisée comme clé dans l'inspecteur. Les propriétés peuvent être utilisées comme clé en cliquant sur l'icône "clé" à côté d'une propriété lorsque le panneau "Animation" est ouvert.
property_selected(property: String) 🔗
Émis lorsqu'une propriété est sélectionnée dans l'inspecteur.
property_toggled(property: String, checked: bool) 🔗
Émis lorsqu'une propriété booléenne est basculée dans l'inspecteur.
Note : Ce signal n'est jamais émis si la propriété interne autoclear est activée. Comme cette propriété est toujours activée dans l'inspecteur de l'éditeur, ce signal n'est jamais émis par l'éditeur lui-même.
resource_selected(resource: Resource, path: String) 🔗
Émis quand une ressource est sélectionnée dans l'inspecteur.
restart_requested() 🔗
Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings.
Descriptions des méthodes
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.
Renvoie l'objet actuellement sélectionné dans cet inspecteur.
String get_selected_path() const 🔗
Obtient le chemin de la propriété actuellement sélectionnée.
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.