/// <summary> /// The button is centered on the position; /// </summary> /// <param name="_parent"></param> public UiMainMenuButton(int _x, int _y, MenuButtonType _type, NxOverlay _parent) : base(_parent) { x = _x; y = _y; m_Type = _type; //background Color = EDColors.getColor(EDColors.ORANGE, 0.2f); m_originRec = new Rectangle(x - (WIDTH / 2), y - (HEIGHT / 2), WIDTH, HEIGHT); m_background = new NxRectangle(m_originRec.X, m_originRec.Y, m_originRec.Width, m_originRec.Height, Color); Add(m_background); //Title m_TopText = new NxSimpleText(x, m_background.y + 5, getMenuTitle(), EDColors.ORANGE, 34, NxFonts.EuroCapital); m_TopText.centerHorizontal = true; Add(m_TopText); //Icon m_Icon = new NxImage(m_background.x + (WIDTH - ICON_SIZE) / 2, m_background.y + 50, ResHelper.GetResourceImage(Assembly.GetExecutingAssembly(), getIconPath())); Add(m_Icon); //Bottom Text int _botHeight = 80; int _padding = 5; m_BottomText = new NxTextbox(m_background.x + _padding, m_background.y + (HEIGHT - _botHeight) - _padding, WIDTH - _padding * 2, _botHeight, getBottomText(), EDColors.ORANGE, 19); m_BottomText.showBounds = true; m_BottomText.boundColors = EDColors.getColor(EDColors.ORANGE, .5f); Add(m_BottomText); }
public UiSearchResultLine(UiSearchResult _parent) : base(_parent.Parent) { Color = EDColors.getColor(EDColors.ORANGE, 0.1f); RelativeChildPos = true; m_background = new NxRectangle(0, 0, width, height, Color); Add(m_background); Widths = new int[PropertiesCount]; m_props = new NxSimpleText[PropertiesCount]; m_separators = new NxRectangle[PropertiesCount]; for (int i = 0; i < m_separators.Length; i++) { m_separators[i] = new NxRectangle(i * 50, 0, 1, height, Color.Black); Add(m_separators[i]); } for (int i = 0; i < m_props.Length; i++) { m_props[i] = new NxSimpleText(i * 50, 5, "Property " + i.ToString(), Color.Orange, 18) { AutoSize = false }; Add(m_props[i]); } }
public NxMainPanelSearchButton(int _x, int _y, int _width, NxMenu _menu) : base(_menu.frame.NxOverlay) { m_width = _width; x = _x; y = _y; m_background = new NxRectangle(x, y, m_width, Height, EDColors.getColor(EDColors.ORANGE, 0.1f)); Add(m_background); Add(new NxRectangle(x, y, m_width, 1, EDColors.YELLOW)); Add(new NxRectangle(x, y + Height - 1, m_width, 1, EDColors.getColor(EDColors.YELLOW, 0.5f))); searchName = new NxSimpleText(x + (m_width / 2), y + (Height / 2), "empty", EDColors.getColor(EDColors.WHITE, 0.2f)); searchName.centerHorizontal = true; searchName.centerVertical = true; Add(searchName); }