|
From: Yoda-JM <yo...@us...> - 2009-07-26 09:31:23
|
Module: performous
Branch: master
Commit: b4f6102ce031d92df08df91876c693fca5916684
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 11:30:31 2009 +0200
Fixed singing score position in instrument mode
---
game/layout_singer.cc | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index 72cdc33..fc4c0d9 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -70,12 +70,26 @@ void LayoutSinger::draw(double time, Position position) {
unsigned int i = 0;
for (std::list<Player>::const_iterator p = players.begin(); p != players.end(); ++p, ++i) {
float act = p->activity();
- if (act == 0.0f) continue;
+ //if (act == 0.0f) continue;
glColor4f(p->m_color.r, p->m_color.g, p->m_color.b,act);
- m_player_icon->dimensions.left(-0.5 + 0.01 + 0.25 * i).fixedWidth(0.075).screenTop(0.055);
+ switch(position) {
+ case LayoutSinger::BOTTOM:
+ m_player_icon->dimensions.left(-0.5 + 0.01 + 0.25 * i).fixedWidth(0.075).screenTop(0.055);
+ break;
+ case LayoutSinger::MIDDLE:
+ m_player_icon->dimensions.right(0.35).fixedHeight(0.050).screenTop(0.025 + 0.050 * i);
+ break;
+ }
m_player_icon->draw();
m_score_text[i%4]->render((boost::format("%04d") % p->getScore()).str());
- m_score_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.075).screenTop(0.055);
+ switch(position) {
+ case LayoutSinger::BOTTOM:
+ m_score_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.075).screenTop(0.055);
+ break;
+ case LayoutSinger::MIDDLE:
+ m_score_text[i%4]->dimensions().right(0.45).fixedHeight(0.050).screenTop(0.025 + 0.050 * i);
+ break;
+ }
m_score_text[i%4]->draw();
glColor4f(1.0, 1.0, 1.0, 1.0);
}
|