Beispiel #1
0
void Window(int x1, int y1, int x2, int y2, char *title)
{
  FilledBox(x1, y1, x2-x1, y2-y1, winbg);
  FilledBox(x1, y1, x2-x1, 8, titlebg);
  HLine(x1, y1, x2-x1, brightw);
  VLine(x1, y1, y2-y1, brightw);
  HLine(x1+1, y2-1, x2-x1-1, darkw);
  VLine(x2-1, y1+1, y2-y1-1, darkw);
  FilledBox(x2-8, y1+2, 5, 5, winbg);
  HLine(x2-8, y1+2, 6, brightw);
  VLine(x2-8, y1+2, 5, brightw);
  HLine(x2-7, y1+6, 4, darkw);
  VLine(x2-3, y1+3, 4, darkw);

  GotoXY(x1+2, y1+2);
  printstring(title);
}
Beispiel #2
0
void TextField(int x, int y, int width, char *str, int blink)
{
  FilledBox(x, y, width, 9, 0);
  HLine(x, y, width+1, darkw);
  VLine(x, y, 9, darkw);
  HLine(x+1, y+8, width-1, brightw);
  VLine(x+width, y+1, 8, brightw);
  GotoXY(x+2, y+2);
  printstring(str);
  if (blink) printstring("_");
}
Beispiel #3
0
void CheckBox(int x, int y, int checked)
{
  FilledBox(x, y, 7, 6, 0);
  HLine(x, y, 8, darkw);
  VLine(x, y, 7, darkw);
  HLine(x+1, y+6, 7, brightw);
  VLine(x+7, y+1, 5, brightw);
  if (checked)
  {
    GotoXY(x+2, y+2);
    printstring("*");
  }
}
Beispiel #4
0
void stdwindow(int x1, int y1, int x2, int y2)
{
  FilledBox(x1, y1, x2-x1, y2-y1, winbg);
  HLine(x1, y1, x2-x1, black);     /* -- ric: 13/Jun/98 --     */
  VLine(x1, y1, y2-y1, black);     /* Outline window in black */
  HLine(x1+1, y2-1, x2-x1-1, black);
  VLine(x2-1, y1+1, y2-y1-1, black);

  HLine(x1+1, y1+1, x2-x1-2, brightw);
  VLine(x1+1, y1+1, y2-y1-2, brightw);
  HLine(x1+2, y2-2, x2-x1-3, darkw);
  VLine(x2-2, y1+2, y2-y1-3, darkw);
}
Beispiel #5
0
// Button():
//  Draws a button.  This is the same as FilledBox(), but adds
//   a 1-pixel wide black border around it
bool GLTDraw2D::Button( int x, int y, int width, int height,
                        int x_thickness, int y_thickness,
                        int shine_r,  int shine_g,  int shine_b,
                        int shadow_r, int shadow_g, int shadow_b,
                        int fill_r,   int fill_g,   int fill_b ) {

  FilledBox( x+1, y+1, width-2, height-2, x_thickness, y_thickness,
             shine_r, shine_g, shine_b, shadow_r, shadow_g, shadow_b,
             fill_r, fill_g, fill_b );

  EmptyBox( x, y, width, height, 1, 1,
            0, 0, 0,   0, 0, 0 );

  return true;
}