From 3b00fbec0f27076b69a6f65f24e05ce4b7f7291a Mon Sep 17 00:00:00 2001
From: tobias <tobias@5a81b35b-ba03-0410-adc8-b2c5c5119f08>
Date: Wed, 14 Apr 2010 16:34:34 +0000
Subject: [PATCH] dokk: modified to german, changed box size and timer color

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2005 5a81b35b-ba03-0410-adc8-b2c5c5119f08
---
 examples/dokk/datafiles/tutorial_1/level.ini | 2 +-
 examples/dokk/datafiles/tutorial_2/level.ini | 2 +-
 examples/dokk/glwin.py                       | 7 ++++++-
 examples/dokk/level_info.py                  | 4 ++--
 4 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/examples/dokk/datafiles/tutorial_1/level.ini b/examples/dokk/datafiles/tutorial_1/level.ini
index 425c49234..62771d8e9 100644
--- a/examples/dokk/datafiles/tutorial_1/level.ini
+++ b/examples/dokk/datafiles/tutorial_1/level.ini
@@ -1,6 +1,6 @@
 [Level]
 NAME: Tutorial 1
-DIFFICULTY: Basic Training
+DIFFICULTY: Einf�hrungs Training
 TIME: 60000
 SAVE: 0
 GOAL: 1.0
diff --git a/examples/dokk/datafiles/tutorial_2/level.ini b/examples/dokk/datafiles/tutorial_2/level.ini
index 443ba059f..e0a848e22 100644
--- a/examples/dokk/datafiles/tutorial_2/level.ini
+++ b/examples/dokk/datafiles/tutorial_2/level.ini
@@ -1,6 +1,6 @@
 [Level]
 NAME: Tutorial 2
-DIFFICULTY: Advanced Training
+DIFFICULTY: Fortgeschrittenes Training
 TIME: 60000
 SAVE: 0
 GOAL: 1.0
diff --git a/examples/dokk/glwin.py b/examples/dokk/glwin.py
index 099d6c58f..10037ee97 100644
--- a/examples/dokk/glwin.py
+++ b/examples/dokk/glwin.py
@@ -55,7 +55,12 @@ class DokkGLCanvas(QGLWidget):
     painter.setPen(QPen(QColor(255,255,255), Qt.SolidLine))
     painter.setFont(QFont("Verdana",20))
     painter.drawText(QPoint(10, 25), "Sie sind %.1f von der L�sung entfernt" % self.dokk.GetLevel().GetRMSD())
-    painter.drawText(QPoint(self.width()-230, 25), "noch %.0f sekuden" % self.dokk.GetLevel().GetRemainingTime())
+    if self.dokk.GetLevel().IsStarted():
+      time_col=self.dokk.GetLevel().GetRemainingTime()/10
+      if time_col>1:
+        time_col=1
+      painter.setPen(QPen(QColor(255,255*time_col,255*time_col), Qt.SolidLine))
+    painter.drawText(QPoint(self.width()-250, 25), "noch %.0f Sekunden" % self.dokk.GetLevel().GetRemainingTime())
     if self.hud is not None:
       self.hud.Paint(painter)
     self.dokk.GetLevel().CheckSolved()
diff --git a/examples/dokk/level_info.py b/examples/dokk/level_info.py
index 97cb2776f..f60c0c70b 100644
--- a/examples/dokk/level_info.py
+++ b/examples/dokk/level_info.py
@@ -81,7 +81,7 @@ class LevelDetails(QtCore.QObject):
     self.hud_bg = None
     
   def Start(self):
-    name_len = len(self.name)
+    name_len = max(len(self.name),len(self.difficulty)/2)
     xpos = dokk.Dokk().gl_win.Width()/2 - (name_len*30)/2
     rect = QtCore.QRect(QtCore.QPoint(xpos, 55), QtCore.QSize(name_len*30, 105))
     self.hud_bg = RectHUDObject(-1,rect, bg_color=QtGui.QColor(128,128,128,200))
@@ -113,4 +113,4 @@ class DemoCam(QtCore.QTimer):
   
   def OnTimer(self):
     gfx.Scene().Apply(gfx.InputEvent(gfx.INPUT_DEVICE_MOUSE, gfx.INPUT_COMMAND_ROTY, 0.25), False)      
-      
\ No newline at end of file
+      
-- 
GitLab