|
From: Felix B. <fbe...@us...> - 2010-05-22 05:01:45
|
Module: performous
Branch: master
Commit: 46ab1e1857b32282793a6dce1459f2acaa70133f
Author: Felix Bertram <fl...@be...>
Date: Fri May 21 22:00:46 2010 -0700
display song section next to progress bar
---
game/screen_sing.cc | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index c10dcc0..6f62d8b 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -361,7 +361,13 @@ void ScreenSing::draw() {
{
unsigned t = clamp(time, 0.0, length);
m_progress->draw(songPercent);
- std::string statustxt = (boost::format("%02u:%02u") % (t / 60) % (t % 60)).str();
+
+ Song::SongSection section("error", 0);
+ std::string statustxt;
+ if (m_song->getPrevSection(t - 1.0, section)) {
+ statustxt = (boost::format("%02u:%02u - %s") % (t / 60) % (t % 60) % section.name).str();
+ } else statustxt = (boost::format("%02u:%02u") % (t / 60) % (t % 60)).str();
+
if (!m_score_window.get() && m_only_singers_alive && !m_song->vocals.notes.empty()) {
if (status == Song::INSTRUMENTAL_BREAK) statustxt += _(" ENTER to skip instrumental break");
if (status == Song::FINISHED && !config["game/karaoke_mode"].b()) statustxt += _(" Remember to wait for grading!");
|