4 [
Attribute(
"", UIWidgets.ResourcePickerThumbnail,
"Select edds texture or imageset",
"edds imageset")]
5 ResourceName m_sTexture;
12 ref ScriptInvoker<Widget> m_OnMouseEnter =
new ScriptInvoker();
13 ref ScriptInvoker<Widget> m_OnMouseLeave =
new ScriptInvoker();
16 override void HandlerAttached(Widget w)
18 super.HandlerAttached(w);
19 m_wImage = ImageWidget.Cast(w.FindAnyWidget(
"Image"));
20 SetImage(m_sTexture, m_sImageName);
24 override bool OnMouseEnter(Widget w,
int x,
int y)
26 super.OnMouseEnter(w, x, y);
34 override bool OnMouseLeave(Widget w, Widget enterW,
int x,
int y)
36 super.OnMouseLeave(w, enterW, x, y);
44 ImageWidget GetImageWidget()
50 void SetImage(ResourceName texture,
bool fromLocalStorage =
false)
55 bool show = texture !=
string.Empty;
60 m_wImage.LoadImageTexture(0, texture,
false, fromLocalStorage);
69 void SetImage(ResourceName imageSet,
string imageName)
74 bool show = imageSet !=
string.Empty;
80 if (imageSet.EndsWith(
"imageset"))
81 m_wImage.LoadImageFromSet(0, imageSet, imageName);
83 m_wImage.LoadImageTexture(0, imageSet);
90 m_sTexture = imageSet;
91 m_sImageName = imageName;
95 string GetImage(out
string imageSet)
97 if (m_sImageName ==
string.Empty)
99 imageSet = m_sTexture;