Exemplo n.º 1
0
 public void SetAlignment(PlanetUnity.LabelAlignment v)
 {
     alignment = v; alignmentExists = true;
 }
Exemplo n.º 2
0
    public override void gaxb_load(XmlReader reader, object _parent, Hashtable args)
    {
        base.gaxb_load(reader, _parent, args);

        if(reader == null && _parent == null)
            return;

        parent = _parent;

        if(this.GetType() == typeof( PULabel ))
        {
            gaxb_addToParent();
        }

        xmlns = reader.GetAttribute("xmlns");

        string attr;
        attr = reader.GetAttribute("shader");
        if(attr != null && planetOverride != null) { attr = processStringMethod.Invoke(null, new [] {_parent, attr}).ToString(); }
        if(attr != null) { shader = attr; shaderExists = true; }

        attr = reader.GetAttribute("font");
        if(attr != null && planetOverride != null) { attr = processStringMethod.Invoke(null, new [] {_parent, attr}).ToString(); }
        if(attr != null) { font = attr; fontExists = true; }

        attr = reader.GetAttribute("fontSize");
        if(attr != null && planetOverride != null) { attr = processStringMethod.Invoke(null, new [] {_parent, attr}).ToString(); }
        if(attr == null) { attr = "12"; }
        if(attr != null) { fontSize = int.Parse(attr); fontSizeExists = true; }

        attr = reader.GetAttribute("alignment");
        if(attr != null && planetOverride != null) { attr = processStringMethod.Invoke(null, new [] {_parent, attr}).ToString(); }
        if(attr == null) { attr = "center"; }
        if(attr != null) { alignment = (PlanetUnity.LabelAlignment)System.Enum.Parse(typeof(PlanetUnity.LabelAlignment), attr); alignmentExists = true; }

        attr = reader.GetAttribute("textColor");
        if(attr != null && planetOverride != null) { attr = processStringMethod.Invoke(null, new [] {_parent, attr}).ToString(); }
        if(attr == null) { attr = "0,0,0,1"; }
        if(attr != null) { textColor = attr; textColorExists = true; }

        attr = reader.GetAttribute("value");
        if(attr != null && planetOverride != null) { attr = processStringMethod.Invoke(null, new [] {_parent, attr}).ToString(); }
        if(attr != null) { value = attr; valueExists = true; }

        attr = reader.GetAttribute("shadowOffset");
        if(attr != null && planetOverride != null) { attr = processStringMethod.Invoke(null, new [] {_parent, attr}).ToString(); }
        if(attr != null) { shadowOffset = attr; shadowOffsetExists = true; }

        attr = reader.GetAttribute("shadowColor");
        if(attr != null && planetOverride != null) { attr = processStringMethod.Invoke(null, new [] {_parent, attr}).ToString(); }
        if(attr != null) { shadowColor = attr; shadowColorExists = true; }
    }