File: S_GUI.C | Size: 1,438 bytes | Download file | Back to directory listing | BWPOW's homepage
#include <stdlib.h>
#include <allegro.h>
#include "hra.h"
#include "tdgui.h"
#include "text_bor.h"
 
void stextout_centre(BITMAP *bmp,FONT *font,char text[256],short x,short y,int c1,int c2)
{
  textout_centre_border (bmp,font,text,x,y,c1,c2,1,-1);
}
 
void stextout(BITMAP *bmp,FONT *font,char text[256],short x,short y,int c1,int c2)
{
  textout_border (bmp,font,text,x,y,c1,c2,1,-1);
}
 
void stvorec(BITMAP *b,int x,int y,int w,int h)
{
	vline(b,x+1,y+1,y+h-1,makecol(250,250,250));
	vline(b,x,y,y+h,makecol(150,150,150));
 
	vline(b,x+w,y,y+h,makecol(250,250,250));
	vline(b,x+w-1,y+1,y+h-1,makecol(150,150,150));
 
	hline(b,x+1,y+1,x+w-1,makecol(250,250,250));
	hline(b,x,y,x+w,makecol(150,150,150));
 
	hline(b,x,y+h,x+w,makecol(250,250,250));
	hline(b,x+1,y+h-1,x+w-1,makecol(150,150,150));
 
 
}
 
void stvorec2(BITMAP *b,int x,int y,int w,int h)
{
 
	vline(b,x,y,y+h,makecol(250,250,250));
	vline(b,x+w,y,y+h,makecol(150,150,150));
 
	hline(b,x,y,x+w,makecol(250,250,250));
	hline(b,x,y+h,x+w,makecol(150,150,150));
 
}
 
void stvorec3(BITMAP *b,int x,int y,int w,int h)
{
 
	vline(b,x,y,y+h,makecol(150,150,150));
	vline(b,x+w,y,y+h,makecol(250,250,250));
 
	hline(b,x,y,x+w,makecol(150,150,150));
	hline(b,x,y+h,x+w,makecol(250,250,250));
 
}
 
 
void tdbox_b(BITMAP *bmp,short x,short y,short w,short h,char mode)
{
  rectfill(bmp,x,y,x+w,y+h,0);
  tdbox(bmp,x,y,w,h,mode%2);
}