public override void DrawButton(UIButton b)
        {
            VTex2D bi;

            bi = StateImg(b.State);
            int     fw  = SmallFont.Width(b.Name);
            int     fh  = SmallFont.Height();
            Vector4 col = new Vector4(1, 1, 1, 1 * UISys.AlphaMod);

            switch (b.State)
            {
            case ButState.Norm:
                col = new Vector4(0.6f, 0.6f, 0.6f, 0.6f * UISys.AlphaMod);
                break;

            case ButState.Hover:
                col = new Vector4(0.8f, 0.8f, 0.8f, 0.8f * UISys.AlphaMod);
                break;

            case ButState.Press:
                col   = Vector4.One;
                col.W = col.W * UISys.AlphaMod;
                break;
            }
            VPen.Rect((int)b.WidX, (int)b.WidY, (int)b.WidW, (int)b.WidH, bi, col);
            VFontRenderer.Draw(SmallFont, b.Name, (int)(b.WidX + b.WidW / 2 - (fw / 2)), (int)(b.WidY + (b.WidH) / 2 - (fh / 2)), new Vector4(1, 1, 1, UISys.AlphaMod));
            if (b == UISys.Active)
            {
                VPen.Line(b.WidX, b.WidY + 4, b.WidX + b.WidW, b.WidY + 4, new Vector4(1, 1, 1, 1));
            }
        }
 public override void DrawWindow(UIWindow w)
 {
     WinBackCol.W = w.Alpha * UISys.AlphaMod;
     //    VPen.Rect(w.WidX, w.WidY, w.WidW, w.WidH, WinBord, WinBackCol);
     VPen.Rect(w.WidX, w.WidY, w.WidW, w.WidH, WinCon, WinBackCol);
     if (w.DrawTitle)
     {
         WinTitCol.W = w.Alpha * UISys.AlphaMod;
         VPen.Rect(w.WidX, w.WidY, w.WidW, TitleHeight, WinTitle, WinTitCol);
         VFontRenderer.Draw(SmallFont, w.Name, w.WidX + 5, w.WidY + 2, new Vector4(1, 1, 1, UISys.AlphaMod));
     }
 }
 public override void DrawPanel(UIPanel p)
 {
     if (p.Flat)
     {
         VPen.Rect(p.WidX, p.WidY, p.WidW, p.WidH, new Vector4(0.7f, 0.7f, 0.7f, 0.8f));
     }
     else
     {
         VPen.Rect(p.WidX, p.WidY, p.WidW, p.WidH, PanelBG, new Vector4(0.7f, 0.7f, 0.7f, 0.9f));
     }
     VFontRenderer.Draw(SmallFont, p.Name, p.WidX + 5, p.WidY + 5);
 }
Beispiel #4
0
 public override void Draw()
 {
     VFontRenderer.Draw(UISys.Skin().SmallFont, Name, WidX + 5, WidY + 5, new OpenTK.Vector4(1, 1, 1, 1));
     if (WinOver == false)
     {
         VPen.Rect(WidX, WidY, WidW, 50, new OpenTK.Vector4(0, 0, 0.5f, 0.1f));
     }
     else
     {
         VPen.Rect(WidX, WidY, WidW, 50, new OpenTK.Vector4(0, 0, 0.5f, 0.35f));
         if (StarEngine.Input.VInput.MB[0] == false && UISys.ActiveWindow.Docked == false)
         {
             DockWin();
         }
     }
 }
 public override void DrawBoxText(int x, int y, string text)
 {
     VFontRenderer.Draw(SmallFont, text, x, y, new Vector4(0.1f, 0.1f, 0.1f, 0.9f * UISys.AlphaMod));
 }
Beispiel #6
0
 public virtual void DrawText(int x, int y, string text)
 {
     VFontRenderer.Draw(SmallFont, text, x, y);
 }
Beispiel #7
0
 public virtual void DrawText(int x, int y, string text, Vector4 col)
 {
     VFontRenderer.Draw(SmallFont, text, x, y, col);
 }
Beispiel #8
0
 public void DrawText(string txt, int x, int y)
 {
     VFontRenderer.Draw(UI.Font, txt, GX + x, GY + y);
 }