Skip to content
Snippets Groups Projects
Commit dd2a2d07 authored by tobias's avatar tobias
Browse files

dokk: add IsIntroDone

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2016 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 2ac197c7
Branches
Tags
No related merge requests found
......@@ -55,7 +55,7 @@ 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 Lsung entfernt" % self.dokk.GetLevel().GetRMSD())
if self.dokk.GetLevel().IsStarted():
if self.dokk.GetLevel().IsIntroDone():
time_col=self.dokk.GetLevel().GetRemainingTime()/10
if time_col>1:
time_col=1
......
......@@ -30,6 +30,7 @@ class Level(QtCore.QObject):
Dokk().gl_win.SetLockInput(True)
self._started = False
self._intro_done = False
self.emit(QtCore.SIGNAL("Stopped()"))
def Load(self):
......@@ -116,6 +117,7 @@ class Level(QtCore.QObject):
self.endtime = 0
self.stop_time = 0
self._started = False
self._intro_done = False
self.timer.stop()
self.CleanHUD()
self.ResetPos()
......@@ -152,6 +154,7 @@ class Level(QtCore.QObject):
else:
self.hud_level_end_ntt.Start()
self._started = False
self._intro_done = False
def Begin(self):
self.Reset()
......@@ -183,12 +186,16 @@ class Level(QtCore.QObject):
def IsStarted(self):
return self._started
def IsIntroDone(self):
return self._intro_done
def _IntroEnd(self):
if self._started:
Dokk().gl_win.SetLockInput(False)
self.timer.start(int(self.config.Level["TIME"]))
self.endtime = float(time.time()+(int(self.config.Level["TIME"]))/1000.0)
self._intro_done = True
self.emit(QtCore.SIGNAL("Started()"))
def _FinishEnd(self):
......@@ -200,4 +207,4 @@ class Level(QtCore.QObject):
def _FinishEnterName(self):
self.topten.SetValue(self.hud_name_input.GetName(),self.GetScore())
self.Reset()
\ No newline at end of file
self.Reset()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment