mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-02 18:25:30 +02:00
Added background image color support. Changed "transparency" to "alpha" for layouts. Fixed code syling.
This commit is contained in:
@@ -36,6 +36,8 @@ void Text::AllocateGraphicsMemory()
|
||||
|
||||
void Text::Draw()
|
||||
{
|
||||
Component::Draw();
|
||||
|
||||
SDL_Texture *t = FontInst->GetTexture();
|
||||
|
||||
ViewInfo *info = GetBaseViewInfo();
|
||||
@@ -89,7 +91,7 @@ void Text::Draw()
|
||||
SDL_SetTextureColorMod(t, FontColor.r, FontColor.g, FontColor.b);
|
||||
SDL_UnlockMutex(SDL::GetMutex());
|
||||
|
||||
SDL::RenderCopy(t, static_cast<char>(info->GetTransparency() * 255), &charRect, &rect, info->GetAngle());
|
||||
SDL::RenderCopy(t, static_cast<char>(info->GetAlpha() * 255), &charRect, &rect, info->GetAngle());
|
||||
rect.x += static_cast<int>(glyph.Advance * scale);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user