mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-08-26 03:28:57 +00:00
Fixed way that missing tiles are handled: WARNING this update requires JRE 8_40 or higher
This commit is contained in:
parent
fe2a00c46c
commit
e0d16ebd08
@ -8,6 +8,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.image.WritableImage;
|
||||
import javafx.scene.paint.Color;
|
||||
import javax.swing.JOptionPane;
|
||||
@ -197,9 +198,12 @@ public class TileMap extends ArrayList<ArrayList<Tile>> implements Serializable
|
||||
});
|
||||
if (!unknownTiles.isEmpty()) {
|
||||
int numMissing = unknownTiles.size();
|
||||
JOptionPane.showMessageDialog(null, (numMissing > 1
|
||||
? "There were " + numMissing + " missing tiles." : "There was a missing tile.")
|
||||
Alert missingTileAlert = new Alert(Alert.AlertType.WARNING);
|
||||
missingTileAlert.setContentText(
|
||||
(numMissing > 1
|
||||
? "There were " + numMissing + " missing tiles." : "There was a missing tile. ")
|
||||
+ "Blank placeholders have been added.");
|
||||
missingTileAlert.showAndWait();
|
||||
}
|
||||
backingMap = m;
|
||||
backingMapStale = false;
|
||||
|
@ -150,7 +150,7 @@ public class UIAction {
|
||||
|
||||
public static WritableImage getBadImage(int width, int height) {
|
||||
if (badImage == null) {
|
||||
badImage = new Image("/org/badvision/outlaw/resources/icon_brokenLink.png");
|
||||
badImage = new Image("/images/icon_brokenLink.png");
|
||||
}
|
||||
WritableImage img = new WritableImage(width, height);
|
||||
img.getPixelWriter().setPixels(0, 0, (int) badImage.getWidth(), (int) badImage.getHeight(), badImage.getPixelReader(), 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user