Refactored dimension int local variable
This commit is contained in:
parent
aef1c12b22
commit
eb7ac569b8
@ -15,8 +15,6 @@ public class Display extends JPanel{
|
|||||||
private List<Drawer> visuals;
|
private List<Drawer> visuals;
|
||||||
private Clip clip;
|
private Clip clip;
|
||||||
|
|
||||||
private Dimension dimension;
|
|
||||||
|
|
||||||
public Display() {
|
public Display() {
|
||||||
visuals = new ArrayList<>();
|
visuals = new ArrayList<>();
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
@ -66,7 +64,7 @@ public class Display extends JPanel{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setMapSize(int width, int height) {
|
public void setMapSize(int width, int height) {
|
||||||
dimension = new Dimension(width * 64, height * 64);
|
Dimension dimension = new Dimension(width * 64, height * 64);
|
||||||
setPreferredSize(dimension);
|
setPreferredSize(dimension);
|
||||||
setMinimumSize(dimension);
|
setMinimumSize(dimension);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user