Moved common functionality and includes around
This commit is contained in:
@@ -30,10 +30,6 @@ m_halign(halign),
|
||||
m_valign(valign),
|
||||
m_text_color(text_color)
|
||||
{
|
||||
if (nullptr != m_surface)
|
||||
{
|
||||
SDL_SetSurfaceBlendMode(m_surface, SDL_BLENDMODE_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
WidgetText::WidgetText(int x, int y, int width, int height, string text,
|
||||
@@ -49,10 +45,6 @@ m_halign(HALIGN_CENTER),
|
||||
m_valign(VALIGN_CENTER),
|
||||
m_text_color{.r = 0, .g = 0, .b = 0, .a = SDL_ALPHA_OPAQUE}
|
||||
{
|
||||
if (nullptr != m_surface)
|
||||
{
|
||||
SDL_SetSurfaceBlendMode(m_surface, SDL_BLENDMODE_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
WidgetText::WidgetText(int x, int y, int width, int height, string text,
|
||||
@@ -66,10 +58,6 @@ m_halign(HALIGN_CENTER),
|
||||
m_valign(VALIGN_CENTER),
|
||||
m_text_color{.r = 0, .g = 0, .b = 0, .a = SDL_ALPHA_OPAQUE}
|
||||
{
|
||||
if (nullptr != m_surface)
|
||||
{
|
||||
SDL_SetSurfaceBlendMode(m_surface, SDL_BLENDMODE_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
void WidgetText::set_text(const string& text)
|
||||
|
||||
Reference in New Issue
Block a user