game: Replace statement with expression

This commit is contained in:
sdburns1998
2019-07-08 17:10:08 +02:00
parent decfd24a7b
commit ec32435155

View File

@@ -110,12 +110,8 @@ public class SpriteManager
public void addSpriteTo(JButton c, int archive, int file) public void addSpriteTo(JButton c, int archive, int file)
{ {
getSpriteAsync(archive, file, img -> getSpriteAsync(archive, file, img ->
{
SwingUtilities.invokeLater(() -> SwingUtilities.invokeLater(() ->
{ c.setIcon(new ImageIcon(img))));
c.setIcon(new ImageIcon(img));
});
});
} }
/** /**
@@ -124,12 +120,8 @@ public class SpriteManager
public void addSpriteTo(JLabel c, int archive, int file) public void addSpriteTo(JLabel c, int archive, int file)
{ {
getSpriteAsync(archive, file, img -> getSpriteAsync(archive, file, img ->
{
SwingUtilities.invokeLater(() -> SwingUtilities.invokeLater(() ->
{ c.setIcon(new ImageIcon(img))));
c.setIcon(new ImageIcon(img));
});
});
} }
public void addSpriteOverrides(SpriteOverride[] add) public void addSpriteOverrides(SpriteOverride[] add)