-Font::draw(const std::string& text, const Vector& pos, Uint32 drawing_effect)
+Font::draw(const std::string& text, const Vector& pos, Uint32 drawing_effect, int alpha)
{
if(shadowsize > 0)
draw_chars(shadow_chars, text, pos + Vector(shadowsize, shadowsize),
{
if(shadowsize > 0)
draw_chars(shadow_chars, text, pos + Vector(shadowsize, shadowsize),
- draw_chars(chars, text, pos, drawing_effect);
+ draw_chars(chars, text, pos, drawing_effect, alpha);
-Font::draw_center(const std::string& text, const Vector& pos, Uint32 drawing_effect)
+Font::draw_center(const std::string& text, const Vector& pos, Uint32 drawing_effect, int alpha)
{
temp[text.copy(temp, text.size() - i, i)] = '\0';
draw(temp, Vector(screen->w/2 - get_text_width(temp)/2 + pos.x, pos.y + y),
{
temp[text.copy(temp, text.size() - i, i)] = '\0';
draw(temp, Vector(screen->w/2 - get_text_width(temp)/2 + pos.x, pos.y + y),
break;
}
temp[text.copy(temp, l - i, i)] = '\0';
draw(temp, Vector(screen->w/2 - get_text_width(temp)/2 + pos.x, pos.y + y),
break;
}
temp[text.copy(temp, l - i, i)] = '\0';
draw(temp, Vector(screen->w/2 - get_text_width(temp)/2 + pos.x, pos.y + y),
void
Font::draw_chars(Surface* pchars, const std::string& text, const Vector& pos,
void
Font::draw_chars(Surface* pchars, const std::string& text, const Vector& pos,
- impl->draw_part(source_x, source_y, p.x, p.y, w, h, 255, drawing_effect);
+ impl->draw_part(source_x, source_y, p.x, p.y, w, h, alpha, drawing_effect);