internal UITips() { appendFromXML(XMLLayout); mRR = this.findByTag("round_rect") as UIRoundRect; mRR.fillColor = (uint)schemes.backgroundColor; mText = this.findByTag("round_rect/label") as UILabel; }
public static XmlNodeList fromXML(XmlNode node, out UIWidget ui, UIWidget p) { float w = schemes.widgetWidth; float h = schemes.widgetHeight; int r = 8; bool[] corners = new bool[] { true, true, true, true }; uint fc = (uint)schemes.fillColor; uint sc = (uint)schemes.strokeColor; bool br = true; fc = (uint)getProp<EColorUtil>(node, "color", (EColorUtil)schemes.fillColor, out br); if (!br) { fc = getProp(node, "color", (uint)(schemes.fillColor), out br); if (!br) { fc = (uint)getProp<EColorUtil>(node, "fillColor", (EColorUtil)schemes.fillColor, out br); if (!br) { fc = getProp(node, "fillColor", (uint)(schemes.fillColor), out br); } } } sc = (uint)getProp<EColorUtil>(node, "strokeColor", (EColorUtil)schemes.strokeColor, out br); if (!br) { sc = getProp(node, "strokeColor", (uint)(schemes.strokeColor), out br); } r = getProp(node, "radius", 6, out br)*2; corners[0] = getProp(node, "leftTopCorner", true, out br); corners[1] = getProp(node, "rightTopCorner", true, out br); corners[2] = getProp(node, "rightBottomCorner", true, out br); corners[3] = getProp(node, "leftBottomCorner", true, out br); ui = new UIRoundRect(w, h, r, corners, sc, fc); float lineWidth = getProp(node, "lineWidth", 1, out br); (ui as UIRoundRect).setLineWidth(lineWidth); ui.fromXML(node); ui.paresent = p; return node.ChildNodes; }