mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-02-23 15:38:23 +01:00
Add notification for error when opening SpritesheetEditor
This commit is contained in:
@@ -53,9 +53,14 @@ public class SpritesheetEditor extends Editor {
|
|||||||
|
|
||||||
public SpritesheetEditor(Spritesheet sheet) {
|
public SpritesheetEditor(Spritesheet sheet) {
|
||||||
super();
|
super();
|
||||||
this.icon = new ImageIcon(sheet.getIcon(0));
|
|
||||||
this.name = sheet.id;
|
this.name = sheet.id;
|
||||||
this.target = sheet;
|
this.target = sheet;
|
||||||
|
Image icon = sheet.getIcon(0);
|
||||||
|
if (icon == null) {
|
||||||
|
Notification.addError("Unable to open spritesheet " + sheet.id + " because the image is missing. This might be because its an UI spritesheet, which is not supported in ATCS");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.icon = new ImageIcon(icon);
|
||||||
|
|
||||||
JPanel pane = new JPanel();
|
JPanel pane = new JPanel();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user