Fix two OSD rendering bugs (messages with text2 didn't render it, text alignment with icon)

This commit is contained in:
Henrik Rydgård 2023-06-27 23:39:13 +02:00
parent aefedb14c9
commit 27847abac4
2 changed files with 2 additions and 1 deletions

View File

@ -238,7 +238,7 @@ public:
Show(type, text, "", duration_s, id);
}
void Show(OSDType type, const std::string &text, const std::string &text2, float duration_s = 0.0f, const char *id = nullptr) {
Show(type, text, "", "", duration_s, id);
Show(type, text, text2, "", duration_s, id);
}
void Show(OSDType type, const std::string &text, const std::string &text2, const std::string &icon, float duration_s = 0.0f, const char *id = nullptr);
void ShowAchievementUnlocked(int achievementID);

View File

@ -117,6 +117,7 @@ static void RenderOSDEntry(UIContext &dc, const OnScreenDisplay::Entry &entry, B
} else if (iconID.isValid()) {
// Atlas icon.
dc.DrawImageVGradient(iconID, foreGround, foreGround, Bounds(bounds.x + 2.5f, bounds.y + 2.5f, g_atlasIconSize, g_atlasIconSize));
iconSize = g_atlasIconSize;
}
// Make room