Esempio n. 1
0
        public override void Draw()
        {
            var s    = WidgetUtils.FormatTime(Game.LocalTick);
            var font = Game.Renderer.Fonts["Title"];
            var rb   = RenderBounds;
            var pos  = new float2(rb.Left - font.Measure(s).X / 2, rb.Top);

            font.DrawTextWithContrast(s, pos, Color.White, Color.Black, 1);
        }
Esempio n. 2
0
        public override void Draw()
        {
            var font     = Game.Renderer.Fonts[Font];
            var rb       = RenderBounds;
            var color    = GetColor();
            var contrast = GetContrastColor();

            var s   = WidgetUtils.FormatTime(Game.LocalTick) + (Game.orderManager.world.Paused?" (paused)":"");
            var pos = new float2(rb.Left - font.Measure(s).X / 2, rb.Top);

            if (Contrast)
            {
                font.DrawTextWithContrast(s, pos, color, contrast, 1);
            }
            else
            {
                font.DrawText(s, pos, color);
            }
        }