static public int constructor(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); FairyGUI.Image o; if (argc == 1) { o = new FairyGUI.Image(); pushValue(l, true); pushValue(l, o); return(2); } else if (argc == 2) { FairyGUI.NTexture a1; checkType(l, 2, out a1); o = new FairyGUI.Image(a1); pushValue(l, true); pushValue(l, o); return(2); } return(error(l, "New object failed.")); } catch (Exception e) { return(error(l, e)); } }
static public int get_fillMethod(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); pushValue(l, true); pushEnum(l, (int)self.fillMethod); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int SetNativeSize(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); self.SetNativeSize(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int get_texture(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); pushValue(l, true); pushValue(l, self.texture); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int set_color(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); UnityEngine.Color v; checkType(l, 2, out v); self.color = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_fillAmount(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); float v; checkType(l, 2, out v); self.fillAmount = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_texture(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); FairyGUI.NTexture v; checkType(l, 2, out v); self.texture = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_scaleByTile(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); bool v; checkType(l, 2, out v); self.scaleByTile = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int Update(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); FairyGUI.UpdateContext a1; checkType(l, 2, out a1); self.Update(a1); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_scale9Grid(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); UnityEngine.Rect v; checkValueType(l, 2, out v); self.scale9Grid = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int set_fillMethod(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); FairyGUI.FillMethod v; checkEnum(l, 2, out v); self.fillMethod = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int PrintTo(IntPtr l) { try { FairyGUI.Image self = (FairyGUI.Image)checkSelf(l); UnityEngine.Mesh a1; checkType(l, 2, out a1); UnityEngine.Rect a2; checkValueType(l, 3, out a2); self.PrintTo(a1, a2); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static int get_image(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); FairyGUI.GLoader obj = (FairyGUI.GLoader)o; FairyGUI.Image ret = obj.image; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index image on a nil value" : e.Message)); } }
protected override void CreateDisplayObject() { _container = new Container(); _container.gOwner = this; _container.hitArea = new Rect(); _container.SetScale(GRoot.contentScaleFactor, GRoot.contentScaleFactor); displayObject = _container; _image = new Image(); _container.AddChild(_image); }
protected void onExternalLoadSuccess(NTexture texture) { _image.texture = texture; _contentSourceWidth = texture.width; _contentSourceHeight = texture.height; _activeObject = _image; UpdateLayout(); }
private void ClearContent() { ClearErrorState(); if (_activeObject != null) { if (_image == _activeObject) { if (_image.texture != null) { if (_contentItem == null) FreeExternal(image.texture); _image.texture = null; } } else if (_movieClip == _activeObject) _movieClip.frames = null; _activeObject = null; } _contentItem = null; }
protected void LoadFromPackage(string itemURL) { _contentItem = UIPackage.GetItemByURL(itemURL); if (_contentItem != null) { _contentItem.Load(); if (_contentItem.type == PackageItemType.Image) { _image.texture = _contentItem.texture; _image.scale9Grid = _contentItem.scale9Grid; _image.scaleByTile = _contentItem.scaleByTile; _activeObject = _image; _contentSourceWidth = _contentItem.width; _contentSourceHeight = _contentItem.height; UpdateLayout(); } else if (_contentItem.type == PackageItemType.MovieClip) { if (_movieClip == null) { _movieClip = new MovieClip(); if (grayed) _movieClip.SetGrayed(true); _container.AddChild(_movieClip); } _movieClip.interval = _contentItem.interval; _movieClip.frames = _contentItem.frames; _movieClip.boundsRect = new Rect(0, 0, _contentSourceWidth, _contentSourceHeight); _movieClip.playing = _playing; _movieClip.currentFrame = _frame; _activeObject = _movieClip; _contentSourceWidth = _contentItem.width; _contentSourceHeight = _contentItem.height; UpdateLayout(); } else SetErrorState(); } else SetErrorState(); }
protected override void CreateDisplayObject() { _content = new Image(); _content.gOwner = this; displayObject = _content; }