master
marcus13345 2015-04-12 00:47:25 -04:00
parent f80e1b870d
commit 818b240a03
3 changed files with 9 additions and 10 deletions

View File

@ -4,6 +4,8 @@ import java.awt.Color;
import java.awt.FontMetrics; import java.awt.FontMetrics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import MAndEngine.Engine;
/** /**
* this is a wrapper for imgur request. it simply takes any imgur request and * 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. * 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 x2 = desiredPoint.x;
double y2 = desiredPoint.y; double y2 = desiredPoint.y;
y -= (y - y2) / 8d; y -= ((y - y2) / 8d) * Engine.deltaTime;
x -= (x - x2) / 8d; x -= ((x - x2) / 8d) * Engine.deltaTime;
point.x = x; point.x = x;
point.y = y; point.y = y;
double newProgress = req.getProgress(); double newProgress = req.getProgress();
if (newProgress == newProgress) if (newProgress == newProgress)
progress -= (progress - newProgress) / 8d; progress -= ((progress - newProgress) / 8d) * Engine.deltaTime;
double newScanProgress = req.getScanProgress(); double newScanProgress = req.getScanProgress();
if (newScanProgress == newScanProgress) if (newScanProgress == newScanProgress)
scanProgress -= (scanProgress - newScanProgress) / 8d; scanProgress -= ((scanProgress - newScanProgress) / 8d) * Engine.deltaTime;
} }

View File

@ -97,6 +97,8 @@ public class ImgurDownloader implements BasicApp, ImageListener {
@Override @Override
public void initialize() { public void initialize() {
Engine.timeScale = .00005;
settings = new Button(0, new Color(230, 230, 230), WIDTH - 150, 20, 130, 50, "Settings", 10, 10, true); 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"); setCurrentProcessExplicitAppUserModelID("MAndWorks.ImgurDownloader.ImgurDownloader.2.0.0.0");
@ -265,11 +267,6 @@ public class ImgurDownloader implements BasicApp, ImageListener {
return null; return null;
} }
@Override
public int getFramerate() {
return 30;
}
@Override @Override
public boolean getResizable() { public boolean getResizable() {
return true; return true;

View File

@ -9,7 +9,7 @@ import MAndEngine.Engine;
*/ */
public class Main { public class Main {
public static void main(String[] args) { 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(); engine.run();
} }
} }