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 UIEdit(string bgText, int fontSz = 10, int w=128, int lines=1, uint color = 0xffffffff, EStyle style=EStyle.normal) { shrinkAble = true; mBackGround.width = w; mBackGround.height = fontSz*lines+UILabel.lineHeightGain*(lines-1); mLabel = new UILabel(bgText, fontSz, EStyle.normal, color, color, w); this.evtOnLMDown += onClick; mBackGround.paresent = this; mLabel.paresent = this; mBackGround.setDepthTail(); }
public world() { mRoot = UI.Instance.fromXML(XMLFrame, false); //mRoot.evtOnLMDown += (ui, x, y)=>{return false;}; //mRoot.evtOnLMUp += (ui, x, y) => { return false; }; //mRoot.evtOnMMove += (ui, x, y) => { return false; }; mUIMainRole = mRoot.findByPath("mainRole"); mUIRoles = mRoot.findByPath("roles"); mPrompt = mRoot.findByPath("forground/prompt") as UILabel; mScore = mRoot.findByPath("forground/score") as UILabel; mBestScore = mRoot.findByPath("forground/bestScore") as UILabel; mMainRole = new mainRole(this); }
public move(int size) { mUI = new UIRect(size, size); mLb = new UILabel(); mLb.paresent = mUI; mUI.offsety = mUI.offsetx = 2; }
public static XmlNodeList fromXML(XmlNode node, out UIWidget ui, UIWidget p) { string text = "template"; int size = 12; float maxLineWidth = -1; uint color = schemes.textColor; uint colorLink = schemes.textColorLinked; EStyle style = EStyle.normal; bool br = false; text = getProp(node, "text", "template", out br); size = getProp(node, "size", 12, out br); color = (uint)getProp<EColorUtil>(node, "color", (EColorUtil)schemes.textColor, out br); if (!br) { color = getProp(node, "color", (uint)(schemes.textColor), out br); } colorLink = (uint)getProp<EColorUtil>(node, "linkColor", (EColorUtil)schemes.textColorLinked, out br); if (!br) { colorLink = getProp(node, "linkColor", (uint)(schemes.textColorLinked), out br); } style = getStyle(node); maxLineWidth = getProp(node, "maxLineWidth", maxLineWidth, out br); bool link = getProp(node, "link", false, out br); ui = new UILabel(text, size, style, color, colorLink, maxLineWidth); (ui as UILabel).link = link; ui.fromXML(node); ui.paresent = p; return node.ChildNodes; }