Skip to content

ObjectWidget ​

Inherits: Control

One entry of the list catalog: the icon, the id and the name of a resource, which can be selected. object_selected gives the id, the path and the type.

Variables ​

TextureRecticon_texture_rect
Labelid_label
Labelname_label
Panelbackground_panel
intobject_id-1
Stringobject_path""
Stringobject_name""
Stringobject_type""
boolis_selectedfalse

Methods ​

voidset_object_data( id: int, path: String, name: String, type: String, icon_path: String = "" )
voidset_icon_texture( texture: Texture2D )
voidset_selected( selected: bool )

Signals ​

object_selected( object_id: int, object_path: String, object_type: String ) ​

Variable descriptions ​

TextureRect icon_texture_rect ​

No description yet.

Label id_label ​

No description yet.

Label name_label ​

No description yet.

Panel background_panel ​

No description yet.

int object_id = -1 ​

No description yet.

String object_path = "" ​

No description yet.

String object_name = "" ​

No description yet.

String object_type = "" ​

No description yet.

bool is_selected = false ​

No description yet.

Method descriptions ​

void set_object_data( id: int, path: String, name: String, type: String, icon_path: String = "" ) ​

No description yet.

void set_icon_texture( texture: Texture2D ) ​

Set icon directly from a texture (NEW METHOD)

void set_selected( selected: bool ) ​

No description yet.