public HudSlider(int width, int height, float startValue = 1.0f, bool addCollider = true) : base(width, height, addCollider) { Clear(Color.DarkGray); _fore = new EasyDraw(width - 4, height - 4, false); _fore.SetOrigin(0, -_fore.height / 2f); _fore.Clear(Color.LightGray); AddChild(_fore); _fore.x = 2; _fore.y = -_fore.height * 0.5f + 2; _thumb = new EasyDraw(10, height, false); _thumb.Clear(Color.Aqua); _thumb.Fill(Color.White); _thumb.Stroke(Color.Black); _thumb.ShapeAlign(CenterMode.Min, CenterMode.Min); _thumb.Rect(0, 0, _thumb.width - 1, height - 1); AddChild(_thumb); _thumb.x = 0; _thumb.y = 0; _thumb.SetOrigin(_thumb.width * 0.5f, 0); }
private void CreateBlankScreen() { var blankScreen = new EasyDraw(Game.main.width, Game.main.height); blankScreen.NoStroke(); blankScreen.Fill(Color.Black); blankScreen.ShapeAlign(CenterMode.Min, CenterMode.Min); blankScreen.Rect(0, 0, blankScreen.width, blankScreen.height); AddChild(blankScreen); }
public Menu(string type, Color bgColor) { bg = new EasyDraw(game.width, game.height, false); bg.ShapeAlign(CenterMode.Min, CenterMode.Min); bg.Fill(bgColor); bg.Rect(0, 0, bg.width, bg.height); AddChild(bg); this.type = type; SetType(type); }