-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
eppleton
committed
Jan 10, 2015
1 parent
a9c7998
commit 5c76a8e
Showing
9 changed files
with
650 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/samplegames-bck2brwsr/pom.xml b/samplegames-bck2brwsr/pom.xml | ||
index 7d88cec..cb7e1cb 100644 | ||
--- a/samplegames-bck2brwsr/pom.xml | ||
+++ b/samplegames-bck2brwsr/pom.xml | ||
@@ -3,7 +3,7 @@ | ||
<parent> | ||
<groupId>de.eppleton.fx2d</groupId> | ||
<artifactId>fxgameengine</artifactId> | ||
- <version>0.7-SNAPSHOT</version> | ||
+ <version>1.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
@@ -71,7 +71,7 @@ | ||
<dependency> | ||
<artifactId>net.java.html.sound</artifactId> | ||
<groupId>org.netbeans.html</groupId> | ||
- <version>0.7.5</version> | ||
+ <version>${net.java.html.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>${project.groupId}</groupId> | ||
@@ -86,7 +86,7 @@ | ||
<dependency> | ||
<groupId>org.netbeans.html</groupId> | ||
<artifactId>net.java.html.boot</artifactId> | ||
- <version>1.0</version> | ||
+ <version>${net.java.html.version}</version> | ||
</dependency> | ||
|
||
<dependency> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
dukescript-support/src/main/java/de/eppleton/fx2d/dukescript/Timer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package de.eppleton.fx2d.dukescript; | ||
|
||
import net.java.html.js.JavaScriptBody; | ||
|
||
|
||
|
||
public abstract class Timer implements Runnable { | ||
|
||
Object jsTimer = null; | ||
|
||
public void cancel() { | ||
close(jsTimer); | ||
jsTimer = null; | ||
} | ||
|
||
@Override | ||
public abstract void run(); | ||
|
||
@JavaScriptBody(args = { "r", "millis" }, javacall = true, body = | ||
"return window.setTimeout(function() { r.@java.lang.Runnable::run()(); }, millis);" | ||
) | ||
private static native Object schedule(Runnable r, int millis); | ||
|
||
public void schedule(int millis) { | ||
if (jsTimer != null) { | ||
cancel(); | ||
} | ||
jsTimer = schedule(this, millis); | ||
} | ||
|
||
@JavaScriptBody(args = { "timer" }, body = | ||
"window.clearTimeout(timer);" | ||
) | ||
private static native void close(Object self); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters