Tanoda
DropDownListItem.cs
Go to the documentation of this file.
1
3
4
using
System;
5
6
namespace
UnityEngine.UI.Extensions
7
{
8
[Serializable]
9
public
class
DropDownListItem
10
{
11
[SerializeField]
12
private
string
_caption;
16
public
string
Caption
17
{
18
get
19
{
20
return
_caption;
21
}
22
set
23
{
24
_caption = value;
25
if
(OnUpdate !=
null
)
26
OnUpdate();
27
}
28
}
29
30
[SerializeField]
31
private
Sprite _image;
35
public
Sprite
Image
36
{
37
get
38
{
39
return
_image;
40
}
41
set
42
{
43
_image = value;
44
if
(OnUpdate !=
null
)
45
OnUpdate();
46
}
47
}
48
49
[SerializeField]
50
private
bool
_isDisabled;
54
public
bool
IsDisabled
55
{
56
get
57
{
58
return
_isDisabled;
59
}
60
set
61
{
62
_isDisabled = value;
63
if
(OnUpdate !=
null
)
64
OnUpdate();
65
}
66
}
67
68
[SerializeField]
69
private
string
_id;
73
public
string
ID
74
{
75
get
{
return
_id; }
76
set
{ _id = value; }
77
}
78
79
public
Action
OnSelect
=
null
;
//action to be called when this item is selected
80
81
internal
Action OnUpdate =
null
;
//action to be called when something changes.
82
91
public
DropDownListItem
(
string
caption =
""
,
string
inId =
""
, Sprite image =
null
,
bool
disabled =
false
, Action onSelect =
null
)
92
{
93
_caption = caption;
94
_image = image;
95
_id = inId;
96
_isDisabled = disabled;
97
OnSelect
= onSelect;
98
}
99
}
100
}
Image
System.Drawing.Image Image
Definition:
TestScript.cs:37
UnityEngine.UI.Extensions.DropDownListItem
Definition:
DropDownListItem.cs:10
UnityEngine.UI.Extensions.DropDownListItem.OnSelect
Action OnSelect
Definition:
DropDownListItem.cs:79
UnityEngine.UI.Extensions.DropDownListItem.Caption
string Caption
Caption of the Item
Definition:
DropDownListItem.cs:17
UnityEngine.UI.Extensions.DropDownListItem.DropDownListItem
DropDownListItem(string caption="", string inId="", Sprite image=null, bool disabled=false, Action onSelect=null)
Constructor for Drop Down List panelItems
Definition:
DropDownListItem.cs:91
UnityEngine.UI.Extensions.DropDownListItem.ID
string ID
Definition:
DropDownListItem.cs:74
UnityEngine.UI.Extensions.DropDownListItem.IsDisabled
bool IsDisabled
Is the Item currently enabled?
Definition:
DropDownListItem.cs:55
UnityEngine.UI.Extensions
Credit Erdener Gonenc - @PixelEnvision.
Definition:
AccordionElementEditor.cs:8
Source
Assets
unity-ui-extensions
Runtime
Scripts
Controls
ComboBox
DropDownListItem.cs
Generated by
1.9.3