override protected void ConstructExtension(ByteBuffer buffer) { buffer.Seek(0, 6); _titleType = (ProgressTitleType)buffer.ReadByte(); _reverse = buffer.ReadBool(); _titleObject = GetChild("title") as GTextField; _barObjectH = GetChild("bar"); _barObjectV = GetChild("bar_v"); _gripObject = GetChild("grip"); if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; _barMaxWidthDelta = this.width - _barMaxWidth; _barStartX = _barObjectH.x; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; _barMaxHeightDelta = this.height - _barMaxHeight; _barStartY = _barObjectV.y; } if (_gripObject != null) { _gripObject.onTouchBegin.Add(__gripTouchBegin); _gripObject.onTouchMove.Add(__gripTouchMove); _gripObject.onTouchEnd.Add(__gripTouchEnd); } onTouchBegin.Add(__barTouchBegin); }
override protected void ConstructExtension(ByteBuffer buffer) { buffer.Seek(0, 6); _titleType = (ProgressTitleType)buffer.ReadByte(); _reverse = buffer.ReadBool(); _titleObject = GetChild("title") as GTextField; _barObjectH = GetChild("bar"); _barObjectV = GetChild("bar_v"); _aniObject = GetChild("ani") as GMovieClip; if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; _barMaxWidthDelta = this.width - _barMaxWidth; _barStartX = _barObjectH.x; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; _barMaxHeightDelta = this.height - _barMaxHeight; _barStartY = _barObjectV.y; } }
override public void ConstructFromXML(XML cxml) { base.ConstructFromXML(cxml); XML xml = cxml.GetNode("Slider"); string str; str = xml.GetAttribute("titleType"); if (str != null) { _titleType = FieldTypes.ParseProgressTitleType(str); } else { _titleType = ProgressTitleType.Percent; } _reverse = xml.GetAttributeBool("reverse"); _titleObject = GetChild("title") as GTextField; _barObjectH = GetChild("bar"); _barObjectV = GetChild("bar_v"); _gripObject = GetChild("grip"); if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; _barMaxWidthDelta = this.width - _barMaxWidth; _barStartX = _barObjectH.x; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; _barMaxHeightDelta = this.height - _barMaxHeight; _barStartY = _barObjectV.y; } if (_gripObject != null) { _gripObject.onTouchBegin.Add(__gripTouchBegin); _gripObject.onTouchMove.Add(__gripTouchMove); _gripObject.onTouchEnd.Add(__gripTouchEnd); } onTouchBegin.Add(__barTouchBegin); }
override public void ConstructFromXML(XML cxml) { base.ConstructFromXML(cxml); XML xml = cxml.GetNode("Slider"); string str; str = xml.GetAttribute("titleType"); if (str != null) { _titleType = FieldTypes.ParseProgressTitleType(str); } else { _titleType = ProgressTitleType.Percent; } _titleObject = GetChild("title") as GTextField; _barObjectH = GetChild("bar"); _barObjectV = GetChild("bar_v"); _aniObject = GetChild("ani") as GMovieClip; _gripObject = GetChild("grip"); if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; _barMaxWidthDelta = this.width - _barMaxWidth; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; _barMaxHeightDelta = this.height - _barMaxHeight; } if (_gripObject != null) { _gripObject.displayObject.onMouseDown.Add(__gripMouseDown); } }
override public void ConstructFromXML(XML cxml) { base.ConstructFromXML(cxml); XML xml = cxml.GetNode("ProgressBar"); string str; str = xml.GetAttribute("titleType"); if (str != null) { _titleType = FieldTypes.ParseProgressTitleType(str); } else { _titleType = ProgressTitleType.Percent; } _reverse = xml.GetAttributeBool("reverse", false); _titleObject = GetChild("title") as GTextField; _barObjectH = GetChild("bar"); _barObjectV = GetChild("bar_v"); _aniObject = GetChild("ani") as GMovieClip; if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; _barMaxWidthDelta = this.width - _barMaxWidth; _barStartX = _barObjectH.x; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; _barMaxHeightDelta = this.height - _barMaxHeight; _barStartY = _barObjectV.y; } Update(); }
public override void ConstructFromXML(XML cxml) { base.ConstructFromXML(cxml); XML xml = cxml.GetNode("ProgressBar"); string str; str = xml.GetAttribute("titleType"); if (str != null) _titleType = FieldTypes.ParseProgressTitleType(str); else _titleType = ProgressTitleType.Percent; _reverse = xml.GetAttributeBool("reverse", false); _titleObject = GetChild("title") as GTextField; _barObjectH = GetChild("bar"); _barObjectV = GetChild("bar_v"); _aniObject = GetChild("ani") as GMovieClip; if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; _barMaxWidthDelta = this.width - _barMaxWidth; _barStartX = _barObjectH.x; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; _barMaxHeightDelta = this.height - _barMaxHeight; _barStartY = _barObjectV.y; } }
public override void ConstructFromXML(XML cxml) { base.ConstructFromXML(cxml); XML xml = cxml.GetNode("Slider"); string str; str = xml.GetAttribute("titleType"); if (str != null) _titleType = FieldTypes.ParseProgressTitleType(str); else _titleType = ProgressTitleType.Percent; _titleObject = GetChild("title") as GTextField; _barObjectH = GetChild("bar"); _barObjectV = GetChild("bar_v"); _aniObject = GetChild("ani") as GMovieClip; _gripObject = GetChild("grip"); if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; _barMaxWidthDelta = this.width - _barMaxWidth; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; _barMaxHeightDelta = this.height - _barMaxHeight; } if (_gripObject != null) { _gripObject.onTouchBegin.Add(__gripTouchBegin); _gripObject.onTouchEnd.Add(__gripTouchEnd); } }