public MenuItemSubMenu(String text) { Text = text; this.textFont = new Text("MenuItemSubMenu", UI.Instance.CurrentTheme.defaultTextFont, text); //this.textFont = textFont; status = EStatus.Normal; expand = false; Left = 24; Top = 2; Bottom = 4; Right = 2; menuList = new MenuList(); Size = GetPreferedSize(); menuList.Position.X = 232 - 9; menuList.Position.Y = 0; }
public void SetMenuList(MenuList menuList) { parentMenuList = menuList; }
public override void PaintMenuList(MenuList component) { Position origin = UI.Instance.GetOrigin(); float x1 = origin.X + component.Position.X; float y1 = origin.Y + component.Position.Y; float x2 = x1 + component.Size.width; float y2 = y1 + component.Size.height; GL.Enable(EnableCap.Texture2D); GL.Color3(1f, 1f, 1f); menuListUpLeft.Paint(x1, y1, x1 + 24.0f, y1 + 9.0f); menuListUpRight.Paint(x2 - 24.0f, y1, x2, y1 + 9.0f); menuListUp.Paint(x1 + 24.0f, y1, x2 - 24.0f, y1 + 9.0f); menuListLeft.Paint(x1, y1 + 9.0f, x1 + 24.0f, y2 - 16.0f); menuListRight.Paint(x2 - 24.0f, y1 + 9.0f, x2, y2 - 16.0f); menuListBottomLeft.Paint(x1, y2 - 16.0f, x1 + 24.0f, y2); menuListBottomRight.Paint(x2 - 24.0f, y2 - 16.0f, x2, y2); menuListBottom.Paint(x1 + 24.0f, y2 - 16.0f, x2 - 24.0f, y2); GL.Disable(EnableCap.Texture2D); GL.Color3((byte)46, (byte)55, (byte)53); GL.Begin(BeginMode.Quads); GL.Vertex2(x1 + 24.0f, y1 + 9.0f); GL.Vertex2(x2 - 24.0f, y1 + 9.0f); GL.Vertex2(x2 - 24.0f, y2 - 16.0f); GL.Vertex2(x1 + 24.0f, y2 - 16.0f); GL.End(); }
public void SetBackgroundMenuList(MenuList mList) { }
public abstract void PaintMenuList(MenuList component);