Example #1
0
void DrawBoardGrids(SDL_Surface *screen, GameState *gs)
{
	for(unsigned p = 0; p < gs->max_players; p++)
	{
	    Sint16 x1 = gs->board[p].x_offset + (gs->board[p].width_in_px * p);
	    Sint16 y1 = gs->board[p].y_offset;
	    Sint16 x2 = x1 + gs->board[p].width_in_px;
	    Sint16 y2 = y1 + gs->board[p].height_in_px;

		if(p >= gs->player_count){
			roundedBoxColor(screen, x1, y1, x2, y2, 2, 0x000000AA);
			roundedRectangleColor(screen, x1, y1, x2, y2, 5, 0x000000FF);
		} else {
			roundedBoxColor(screen, x1, y1, x2, y2, 2, 0x000000AA);
			roundedRectangleColor(screen, x1, y1, x2, y2, 5, 0x000000FF);
		}
	}
}
Example #2
0
void graphics_draw_round_rect(GContext *ctx, GRect rect, int radius) {
    GPoint topOffset=getTopOffset ();
    roundedRectangleColor(getTopScreen(),topOffset.x+rect.origin.x,topOffset.y+rect.origin.y,topOffset.x+rect.origin.x+rect.size.w,topOffset.y+rect.origin.y+rect.size.h,radius,getRawColor(ctx->stroke_color));
}