-if(selected)
- context.draw_filled_rect(pos, size, Color (200,240,220), LAYER_GUI);
-else
- context.draw_filled_rect(pos, size, Color (200,200,220), LAYER_GUI);
-
-Vector tanslation = -context.get_translation();
-if(state == BT_SHOW_INFO)
- {
- Vector offset;
- if(pos.x + tanslation.x < 100 && pos.y + tanslation.y > SCREEN_HEIGHT - 20)
- offset = Vector(size.x, - 10);
- else if(pos.x + tanslation.x < 100)
- offset = Vector(size.x, 0);
- else
- offset = Vector(-30, -size.y/2);
- context.draw_text(info_font, info, pos + offset, LEFT_ALLIGN, LAYER_GUI+2);
- if(binding != 0)
- context.draw_text(info_font, "(" + std::string(SDL_GetKeyName(binding)) +
- ")", pos + offset + Vector(0,12),
- LEFT_ALLIGN, LAYER_GUI+2);
- }
-
-context.draw_surface_part(image, Vector(0,0), size, pos, LAYER_GUI+1);