Add mappable key to toggle networking

Fixes #17352

Requested in #17343
This commit is contained in:
Henrik Rydgård committed 2023-08-23 22:14:51 +02:00
1 parent 18b0f3be5d
commit feb0ea245e
5 files changed
+19 -6

No files matched your search

+5 -6
View File
@@ -91,6 +91,11 @@ void OnScreenDisplay::Show(OSDType type, const std::string &text, const std::str
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);
}
void OnScreenDisplay::ShowAchievementUnlocked(int achievementID) {
double now = time_now_d();
@@ -201,18 +206,12 @@ void OnScreenDisplay::ShowLeaderboardTracker(int leaderboardTrackerID, const cha
void OnScreenDisplay::ShowLeaderboardStartEnd(const std::string &title, const std::string &description, bool started) {
g_OSD.Show(OSDType::LEADERBOARD_STARTED_FAILED, title, description, 3.0f);
}
void OnScreenDisplay::ShowLeaderboardSubmitted(const std::string &title, const std::string &value) {
g_OSD.Show(OSDType::MESSAGE_SUCCESS, title, value, 3.0f);
}
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);
}
void OnScreenDisplay::SetProgressBar(std::string id, std::string &&message, float minValue, float maxValue, float progress, float delay) {
_dbg_assert_(!my_isnanorinf(progress));
_dbg_assert_(!my_isnanorinf(minValue));