Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct GRRLIB_TexButton{
- int x;
- int y;
- int w;
- int h;
- u32 color;
- GRRLIB_ttfFont *GRRLIBfont;
- GRRLIB_texImg *tex_GRRLIBbutton;
- void Button_Init(int cx, int cy, int cw, int ch, u32 ccolor) {
- GRRLIBfont = GRRLIB_LoadTTF(FreeMonoBold_ttf, FreeMonoBold_ttf_size);
- x=cx;
- y=cy;
- w=cw;
- h=ch;
- color=ccolor;
- tex_GRRLIBbutton = GRRLIB_LoadTexture(GRRLIBbutton);
- GRRLIB_InitTileSet(tex_GRRLIBbutton, 4,24, 0);
- }
- void Button_Show(){
- guVector bg[] = {{x+4,y,0},{x+4+w,y,0},{x+4+w,y+h,0},{x+4,y+h,0}};
- GRRLIB_DrawTile(x, y, tex_GRRLIBbutton , 0, 1, 1, col,0 );
- GRRLIB_DrawTileQuad(bg, tex_GRRLIBbutton, col, 1);
- GRRLIB_DrawTile(bg[1].x, bg[1].y, tex_GRRLIBbutton , 0, 1, 1, col,2);
- }
- } GRRLIB_TexButton;
Add Comment
Please, Sign In to add comment