mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-02 10:16:50 +02:00
Added background image color support. Changed "transparency" to "alpha" for layouts. Fixed code syling.
This commit is contained in:
@@ -60,6 +60,8 @@ void Image::AllocateGraphicsMemory()
|
||||
|
||||
void Image::Draw()
|
||||
{
|
||||
Component::Draw();
|
||||
|
||||
if(Texture)
|
||||
{
|
||||
ViewInfo *info = GetBaseViewInfo();
|
||||
@@ -70,6 +72,6 @@ void Image::Draw()
|
||||
rect.h = static_cast<int>(info->GetHeight());
|
||||
rect.w = static_cast<int>(info->GetWidth());
|
||||
|
||||
SDL::RenderCopy(Texture, static_cast<char>((info->GetTransparency() * 255)), NULL, &rect, info->GetAngle());
|
||||
SDL::RenderCopy(Texture, static_cast<char>((info->GetAlpha() * 255)), NULL, &rect, info->GetAngle());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user