summaryrefslogtreecommitdiffhomepage
path: root/Stars45/FadeView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/FadeView.cpp')
-rw-r--r--Stars45/FadeView.cpp26
1 files changed, 8 insertions, 18 deletions
diff --git a/Stars45/FadeView.cpp b/Stars45/FadeView.cpp
index 1f6207e..cf879fc 100644
--- a/Stars45/FadeView.cpp
+++ b/Stars45/FadeView.cpp
@@ -23,12 +23,11 @@
FadeView::FadeView(Window* c, double in, double out, double hold)
: View(c),
-fade_in(in * 1000),
-fade_out(out * 1000),
-hold_time(hold * 1000),
+fade_in(in),
+fade_out(out),
+hold_time(hold),
step_time(0),
-fast(1),
-time(0)
+fast(1)
{
state = StateStart;
}
@@ -38,9 +37,9 @@ FadeView::~FadeView()
// +--------------------------------------------------------------------+
-void FadeView::FadeIn(double in) { fade_in = in * 1000; }
-void FadeView::FadeOut(double out) { fade_out = out * 1000; }
-void FadeView::FastFade(int fade_fast) { fast = fade_fast; }
+void FadeView::FastFade(int fade_fast) { fast = fade_fast; }
+void FadeView::FadeIn(double in) { fade_in = in; }
+void FadeView::FadeOut(double out) { fade_out = out; }
void FadeView::StopHold()
{
//Print(" FadeView::StopHold()\n");
@@ -52,16 +51,7 @@ void FadeView::StopHold()
void
FadeView::Refresh()
{
- double msec = 0;
-
- if (state == StateStart) {
- time = Game::GetInstance()->GetClock()->RealTime();
- }
- else if (state != StateDone) {
- double new_time = Game::GetInstance()->GetClock()->RealTime();
- msec = new_time - time;
- time = new_time;
- }
+ double msec = Game::GetInstance()->GetClock()->GuiDelta();
switch (state) {
case StateStart: