From 818b240a0347be884217a7f24eab3a50f6249118 Mon Sep 17 00:00:00 2001 From: marcus13345 Date: Sun, 12 Apr 2015 00:47:25 -0400 Subject: [PATCH] fkhjg --- src/GraphicalImgurRequest.java | 10 ++++++---- src/ImgurDownloader.java | 7 ++----- src/Main.java | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/GraphicalImgurRequest.java b/src/GraphicalImgurRequest.java index cf6c3fe..9bcbda7 100644 --- a/src/GraphicalImgurRequest.java +++ b/src/GraphicalImgurRequest.java @@ -4,6 +4,8 @@ import java.awt.Color; import java.awt.FontMetrics; import java.awt.Graphics2D; +import MAndEngine.Engine; + /** * this is a wrapper for imgur request. it simply takes any imgur request and * makes it into a small rectangular progress bar with a title and other assorted bits. @@ -47,19 +49,19 @@ public class GraphicalImgurRequest { double x2 = desiredPoint.x; double y2 = desiredPoint.y; - y -= (y - y2) / 8d; - x -= (x - x2) / 8d; + y -= ((y - y2) / 8d) * Engine.deltaTime; + x -= ((x - x2) / 8d) * Engine.deltaTime; point.x = x; point.y = y; double newProgress = req.getProgress(); if (newProgress == newProgress) - progress -= (progress - newProgress) / 8d; + progress -= ((progress - newProgress) / 8d) * Engine.deltaTime; double newScanProgress = req.getScanProgress(); if (newScanProgress == newScanProgress) - scanProgress -= (scanProgress - newScanProgress) / 8d; + scanProgress -= ((scanProgress - newScanProgress) / 8d) * Engine.deltaTime; } diff --git a/src/ImgurDownloader.java b/src/ImgurDownloader.java index c16d4c0..d91756d 100644 --- a/src/ImgurDownloader.java +++ b/src/ImgurDownloader.java @@ -97,6 +97,8 @@ public class ImgurDownloader implements BasicApp, ImageListener { @Override public void initialize() { + Engine.timeScale = .00005; + settings = new Button(0, new Color(230, 230, 230), WIDTH - 150, 20, 130, 50, "Settings", 10, 10, true); setCurrentProcessExplicitAppUserModelID("MAndWorks.ImgurDownloader.ImgurDownloader.2.0.0.0"); @@ -265,11 +267,6 @@ public class ImgurDownloader implements BasicApp, ImageListener { return null; } - @Override - public int getFramerate() { - return 30; - } - @Override public boolean getResizable() { return true; diff --git a/src/Main.java b/src/Main.java index 9592e0c..bf8e928 100644 --- a/src/Main.java +++ b/src/Main.java @@ -9,7 +9,7 @@ import MAndEngine.Engine; */ public class Main { public static void main(String[] args) { - Engine engine = new Engine(new String[] {"ImgurDownloader"}, false); + Engine engine = new Engine(new String[] {"ImgurDownloader"}, false, false); engine.run(); } }