mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
Implement rendering of unlocked achievements. Not final design.
This commit is contained in:
1 parent
078002d867
commit
c442d1de86
8 files changed
+68
-23
No files matched your search
@@ -87,6 +87,19 @@ void OnScreenDisplay::Show(OSDType type, const std::string &text, const std::str
|
||||
entries_.insert(entries_.begin(), msg);
|
||||
}
|
||||
|
||||
void OnScreenDisplay::ShowAchievementUnlocked(int achievementID) {
|
||||
double now = time_now_d();
|
||||
|
||||
double duration_s = 5.0;
|
||||
|
||||
Entry msg;
|
||||
msg.numericID = achievementID;
|
||||
msg.type = OSDType::ACHIEVEMENT_UNLOCKED;
|
||||
msg.startTime = now;
|
||||
msg.endTime = now + duration_s;
|
||||
entries_.insert(entries_.begin(), msg);
|
||||
}
|
||||
|
||||
void OnScreenDisplay::ShowOnOff(const std::string &message, bool on, float duration_s) {
|
||||
// TODO: translate "on" and "off"? Or just get rid of this whole thing?
|
||||
Show(OSDType::MESSAGE_INFO, message + ": " + (on ? "on" : "off"), duration_s);
|
||||
|
||||
Reference in new issue
Block a user