Inherits: HBoxContainer < BoxContainer < Container < Control < CanvasItem < Node < Object
Inherited By: EditorScriptPicker
Godot editor's control for selecting Resource type properties.
This Control node is used in the editor's Inspector dock to allow editing of Resource type properties. It provides options for creating, loading, saving and converting resources. Can be used with EditorInspectorPlugin to recreate the same behavior.
Note: This Control does not include any editor for the resource, as editing is controlled by the Inspector dock itself or sub-Inspectors.
| ||
| ||
|
_handle_menu_selected ( int id ) virtual | |
void | _set_create_options ( Object menu_node ) virtual |
get_allowed_types ( ) const | |
void | set_toggle_pressed ( bool pressed ) |
Emitted when the value of the edited resource was changed.
Emitted when the resource value was set and user clicked to edit it. When inspect is true, the signal was caused by the context menu "Edit" or "Inspect" option.
""
The base type of allowed resource types. Can be a comma-separated list of several options.
true
If true, the value can be selected and edited.
The edited resource value.
false
If true, the main button with the resource preview works in the toggle mode. Use set_toggle_pressed to manually set the state.
This virtual method can be implemented to handle context menu items not handled by default. See _set_create_options.
This virtual method is called when updating the context menu of EditorResourcePicker. Implement this method to override the "New ..." items with your own options. menu_node is a reference to the PopupMenu node.
Note: Implement _handle_menu_selected to handle these custom items.
Returns a list of all allowed types and subtypes corresponding to the base_type. If the base_type is empty, an empty list is returned.
Sets the toggle mode state for the main button. Works only if toggle_mode is set to true.
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_editorresourcepicker.html