public void Render(Hud obj)
        {
            setUp(obj.HudWidth, obj.HudHeight);

            obj.CommandBar.Render();
            obj.MainProgram.Render();
            obj.FunctionOne.Render();
            obj.FunctionTwo.Render();

            if (obj.GrabbedIcon != null)
            {
                obj.GrabbedIcon.Render(obj.GrabbedIcon);
            }

            LabelBox dialog = new LabelBox(obj.HudWidth, obj.HudHeight, new RectangleF(obj.HudWidth - 500, obj.HudHeight - 100, 500, 100));

            dialog.Render(obj.Message.FirstLine + "\n" + obj.Message.SecondLine);
            tearDown();
        }
示例#2
0
 private void putText(float fontSize, string text, int x, int y, int w, int h)
 {
     using (var dialog = new LabelBox(width, height, new RectangleF(x, y, w, h)))
     {
         dialog.Background = Color.DarkSlateGray;
         dialog.TextColor = Brushes.White;
         dialog.ChangeFontSize(fontSize);
         dialog.Render(text);
     }
 }