override public void ConstructFromXML(XML cxml) { base.ConstructFromXML(cxml); XML xml = cxml.GetNode("ProgressBar"); string str; str = xml.GetAttribute("titleType"); if (str != null) { _titleType = str; } else { _titleType = TITLE_PERCENT; } str = (string)xml.GetAttribute("reverse"); _reverse = str == "true"; _titleObject = GetChildByName("title") as GTextField; _barObjectH = GetChildByName("bar"); _barObjectV = GetChildByName("bar_v"); _aniObject = GetChildByName("ani") as GAniObject; if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; } Update(); }
override public void ConstructFromXML(XML cxml) { base.ConstructFromXML(cxml); XML xml = cxml.GetNode("Slider").Elements()[0]; string str; str = (string)xml.GetAttribute("titleType"); if (str != null) { _titleType = str; } else { _titleType = TITLE_PERCENT; } _titleObject = GetChildByName("title") as GTextField; _barObjectH = GetChildByName("bar"); _barObjectV = GetChildByName("bar_v"); _aniObject = GetChildByName("ani") as GAniObject; _gripObject = GetChildByName("grip"); if (_barObjectH != null) { _barMaxWidth = _barObjectH.width; } if (_barObjectV != null) { _barMaxHeight = _barObjectV.height; } if (_gripObject != null) { _gripObject.displayObject.AddEventListenerObsolete(MouseEvent.MOUSE_DOWN, __gripMouseDown); } }