コード例 #1
0
        public MenuScreen(Screen parentScreen, ContentManager m, string title, Vector2i pos, bool centeredX, bool centeredY, bool bordered, bool hasBackground, Color backgroundColor)
        {
            this.ParentScreen = parentScreen;

            this.ButtonColor = Color.Black;
            this.BackGroudColor = backgroundColor;
            this.TitleFont = m.Media.loadFont("Content/fonts/sweetness.ttf");
            this.ButtonFont = m.Media.loadFont("Content/fonts/sweetness.ttf");
            this.TitleSize = 90;
            this.ButtonSize = 55;
            this.buttons = new List<MenuButton>();

            this.Title = new Text(title, TitleFont, TitleSize);
            Title.Origin = new Vector2f(Title.GetLocalBounds().Left, Title.GetLocalBounds().Top);
            this.bounds = new Rectangle(pos.X, pos.Y, 0,0);

            this.isBordered = bordered;
            this.isCenteredX = centeredX;
            this.isCenteredY = centeredY;
            this.IsDrawn = true;
            this.IsUpdated = true;

            this.hasBackground = hasBackground;
            this.BackGroudColor = backgroundColor;

            setButtons();
        }
コード例 #2
0
        public SelectorPannel(Screen parent, ContentManager c,GuideBlock g)
        {
            this.ParentScreen = parent;
            this.GameResolution = parent.GameResolution;
            this.WindowResolution = parent.WindowResolution;
            this.contentManager = c;
            this.guide = g;
            this.IsDrawn = true;
            this.IsUpdated = true;
            this.ChildScreens = null;
            this.state = States.showing;
            this.currentButton = null;
            this.Color = new Color(200, 200, 200, 255);

            this.PositionBox = new Rectangle(0, -300, 1920, 400);
            addButtons();
        }
コード例 #3
0
 public void add(Screen s)
 {
     addQueue.Add(s);
 }
コード例 #4
0
 public void remove(Screen s)
 {
     removeQueue.Add(s);
 }
コード例 #5
0
 public MenuScreen(Screen parentScreen, ContentManager m, string title, Vector2i pos, bool centeredX, bool centeredY, bool bordered)
     : this(parentScreen, m, title, pos, centeredX, centeredY, bordered, false, Color.White)
 {
 }
コード例 #6
0
 public MenuScreen(Screen parentScreen, ContentManager m, string title, Vector2i pos)
     : this(parentScreen, m, title, pos, true, true, false, false, Color.White)
 {
 }