Afbeelding van knopdrukken toegevoegt

This commit is contained in:
Dofensmirtsz
2015-06-08 14:13:29 +02:00
parent 3f7cd5a964
commit ad81242081
3 changed files with 15 additions and 1 deletions
+2 -1
View File
@@ -33,6 +33,7 @@ public class Images {
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/aanwijzers4sho.png"))));
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/MenuAchtergrond.png"))));
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/SubmenuAchtergrond.png"))));
images.add(toCompatibleImage(ImageIO.read(Main.class.getResource("/image/kast.png"))));
} catch (IOException e) {
e.printStackTrace();
}
@@ -43,7 +44,7 @@ public class Images {
}
public enum ImageType {
pulse,cursor,pressstart,colorstrike,background,aanwijzers,menuachtergrond,subMenu
pulse,cursor,pressstart,colorstrike,background,aanwijzers,menuachtergrond,subMenu,kast
}
public static BufferedImage readImage(File f) {
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

+13
View File
@@ -25,6 +25,7 @@ public class TitleState extends GameState {
BufferedImage pressStart = Images.getImage(ImageType.pressstart);
BufferedImage colorStrike = Images.getImage(ImageType.colorstrike);
BufferedImage kast = Images.getImage(ImageType.kast);
VolatileImage background;
Font textFont = new Font("OCR A Extended", Font.BOLD, 15);
Font textFont2 = new Font("OCR A Extended", Font.BOLD, 130);
@@ -34,6 +35,10 @@ public class TitleState extends GameState {
int varx = 0;
int frame;
int indexKast = 0;
int xKast=0;
public TitleState(GameStateManager gsm, SongHandler sh){
super(gsm, sh);
createBackground();
@@ -47,6 +52,7 @@ public class TitleState extends GameState {
public void update(float factor) {
frame++;
indexKast++;
}
@Override
@@ -54,6 +60,13 @@ public class TitleState extends GameState {
g2.drawImage(background, 0, 0, 1280, 1024, null);
int image_x = ((frame / 6) % 6) * 49;
g2.drawImage(pressStart.getSubimage(image_x, 0, 49, 26), 640-122, 512, 245, 130, null);
xKast = indexKast/10;
xKast%=4;
//g2.drawImage(kast.getSubimage(xKast*300,0,300,400), 640-122,650,300,400,null);
g2.drawImage(kast.getSubimage(xKast*300,0,300,400), 100,300,300,400,null);
}
@Override