Example #1
0
        public HUDPauseMenuButton(HUDPauseButton owner, string buttonText, float textWidth, int buttonDepth, int buttonIndex, int totalButtonCount, Action buttonAction)
        {
            baseButton  = owner;
            btnIndex    = buttonIndex;
            btnCount    = totalButtonCount;
            btnText     = buttonText;
            btnAction   = buttonAction;
            width       = textWidth + 24;
            relSpawnpos = new Vector2(width / 2 - HUDPauseButton.DIAMETER / 2, 64);

            Depth = buttonDepth;

            RelativePosition = new FPoint(12, 12);
            Size             = new FSize(0, 0);
            Alignment        = owner.Alignment;
        }
Example #2
0
 public GDGameHUD(GDGameScreen scrn) : base(scrn, Textures.HUDFontRegular)
 {
     AddElement(BtnPause = new HUDPauseButton(true, true, true));
     AddElement(BtnSpeed = new HUDSpeedBaseButton());
 }