diff --git a/examples/dokk/datafiles/tutorial_1/level.ini b/examples/dokk/datafiles/tutorial_1/level.ini index 425c49234629aef6e35443e041433cf1b172b94c..62771d8e99a91ba9c65947dc1263409c30cc8475 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 443ba059fe91d12c8dc86d10e98cbd5bfc5b6a67..e0a848e227c08cc5c39d3395f6867644fd363e26 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 099d6c58f5ae5646b363bdffbd935f363a13525f..10037ee97ea63ef265ca0216d56bf95abe814abb 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 97cb2776f5fbf2c050cc0b15ba792bc9970881fd..f60c0c70b6c91bbee1db618b73cda750bb8613a2 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 +