OSD: Add colored backgrounds to OSD messages, according to type.

This also reorganizes a little to make rendering achievement popups more
natural later.

Adds info.png to the atlasscript, but doesn't yet rebuild it - more
images are coming.
This commit is contained in:
Henrik Rydgård committed 2023-06-20 17:32:45 +02:00
1 parent 9df01a5bf3
commit 6ba0479edc
4 files changed
+90 -14

No files matched your search

+2
View File
@@ -55,6 +55,7 @@ void OnScreenDisplay::Show(OSDType type, const std::string &text, float duration
Entry msg = *iter;
msg.endTime = now + duration_s;
msg.text = text;
msg.type = type;
entries_.erase(iter);
entries_.insert(entries_.begin(), msg);
return;
@@ -65,6 +66,7 @@ void OnScreenDisplay::Show(OSDType type, const std::string &text, float duration
Entry msg;
msg.text = text;
msg.endTime = now + duration_s;
msg.type = type;
msg.id = id;
entries_.insert(entries_.begin(), msg);
}