Setup project variables
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
4acf3fc708
commit
e99eaa0f43
2
sig
2
sig
@ -1,6 +1,6 @@
|
|||||||
source utils/define.sh
|
source utils/define.sh
|
||||||
|
|
||||||
define PROJECT_NAME "JavaProjectTemplate"
|
define PROJECT_NAME "ArcadeScreenshotHandler"
|
||||||
define PROJECT_DIR "src/sig"
|
define PROJECT_DIR "src/sig"
|
||||||
define MAIN_CLASS "sig.${PROJECT_NAME}"
|
define MAIN_CLASS "sig.${PROJECT_NAME}"
|
||||||
define OUT_DIR "bin"
|
define OUT_DIR "bin"
|
||||||
|
@ -3,7 +3,7 @@ package sig;
|
|||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import sig.engine.Panel;
|
import sig.engine.Panel;
|
||||||
|
|
||||||
public class JavaProjectTemplate {
|
public class ArcadeScreenshotHandler {
|
||||||
public static final String PROGRAM_NAME="Sig's Java Project Template";
|
public static final String PROGRAM_NAME="Sig's Java Project Template";
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
JFrame f = new JFrame(PROGRAM_NAME);
|
JFrame f = new JFrame(PROGRAM_NAME);
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
import sig.JavaProjectTemplate;
|
import sig.ArcadeScreenshotHandler;
|
||||||
|
|
||||||
public class Panel extends JPanel implements Runnable {
|
public class Panel extends JPanel implements Runnable {
|
||||||
JFrame window;
|
JFrame window;
|
||||||
@ -80,7 +80,7 @@ public class Panel extends JPanel implements Runnable {
|
|||||||
|
|
||||||
|
|
||||||
if (window!=null&&System.currentTimeMillis()-lastSecond>=1000) {
|
if (window!=null&&System.currentTimeMillis()-lastSecond>=1000) {
|
||||||
window.setTitle(JavaProjectTemplate.PROGRAM_NAME+" - FPS: "+(frameCount-lastFrameCount));
|
window.setTitle(ArcadeScreenshotHandler.PROGRAM_NAME+" - FPS: "+(frameCount-lastFrameCount));
|
||||||
lastFrameCount=frameCount;
|
lastFrameCount=frameCount;
|
||||||
lastSecond=System.currentTimeMillis();
|
lastSecond=System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user