|
From: Peque <ms...@us...> - 2009-12-24 16:20:59
|
Module: performous
Branch: master
Commit: 4090786260f59842c064b69aafe12f64235f34a0
Author: root <ro...@vo...>
Date: Thu Dec 24 17:19:34 2009 +0100
Filter and order separated in two lines in screen_songs
---
game/screen_songs.cc | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index 9e4439d..741352a 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -10,7 +10,7 @@
#include <iostream>
#include <sstream>
-static const double IDLE_TIMEOUT = 45.0; // seconds
+static const double IDLE_TIMEOUT = 10.0; // seconds
ScreenSongs::ScreenSongs(std::string const& name, Audio& audio, Songs& songs):
Screen(name), m_audio(audio), m_songs(songs), m_covers(20), m_jukebox()
@@ -187,7 +187,8 @@ void ScreenSongs::draw() {
Song& song = m_songs.current();
// Format the song information text
oss_song << song.title << '\n' << song.artist;
- oss_order << (m_search.text.empty() ? m_songs.sortDesc() : m_search.text) << '\n';
+ oss_order << "filter: " << (m_search.text.empty() ? "none" : m_search.text) << '\n';
+ oss_order << m_songs.sortDesc() << '\n';
oss_order << "(" << m_songs.currentId() + 1 << "/" << m_songs.size() << ")";
double spos = m_songs.currentPosition(); // This needs to be polled to run the animation
if (!m_jukebox) {
@@ -314,6 +315,6 @@ void ScreenSongs::draw() {
// Force reload of data
m_playing.clear();
}
- } else if (!m_audio.isPaused() && m_playTimer.get() > IDLE_TIMEOUT) m_songs.random(); // Switch if song hasn't changed for IDLE_TIMEOUT seconds
+ } else if (!m_audio.isPaused() && m_playTimer.get() > IDLE_TIMEOUT) m_songs.advance(1); // Switch if song hasn't changed for IDLE_TIMEOUT seconds
}
|