mirror of
https://github.com/DarkStore-3DS/Universal-Core.git
synced 2026-07-02 16:59:05 +00:00
Some changes & additions. (#2)
* Initial HID implementation. Not everything may be right. I have to figure out some stuff tho. * Add a tint param to `Gui::DrawSprite()`. Also add Universal-Core logo.
This commit is contained in:
@@ -44,10 +44,16 @@ void Gui::clearTextBufs(void)
|
||||
}
|
||||
|
||||
// Draw a sprite from the sheet.
|
||||
void Gui::DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float ScaleX, float ScaleY)
|
||||
void Gui::DrawSprite(C2D_SpriteSheet sheet, size_t imgindex, int x, int y, float ScaleX, float ScaleY, u32 tintColor)
|
||||
{
|
||||
// Tint sprite.
|
||||
C2D_ImageTint tint;
|
||||
C2D_SetImageTint(&tint, C2D_TopLeft, tintColor, 1);
|
||||
C2D_SetImageTint(&tint, C2D_TopRight, tintColor, 1);
|
||||
C2D_SetImageTint(&tint, C2D_BotLeft, tintColor, 1);
|
||||
C2D_SetImageTint(&tint, C2D_BotRight, tintColor, 1);
|
||||
C2D_Image img = C2D_SpriteSheetGetImage(sheet, imgindex);
|
||||
C2D_DrawImageAt(img, x, y, 0.5f, NULL, ScaleX, ScaleY);
|
||||
C2D_DrawImageAt(img, x, y, 0.5f, &tint, ScaleX, ScaleY);
|
||||
}
|
||||
|
||||
// Initialize GUI.
|
||||
|
||||
Reference in New Issue
Block a user