GuiElement interface's mouseClick method returns a boolean which is handled by ComposedElement to prevent mouse clicks on multiple elements at once
ComposedElement's entries are sorted so that GuiDropdown are always drawn on top Modified thrown UnsupportedOperationExceptions in CustomImageObject to not be thrown if asset is null
This commit is contained in:
@@ -16,14 +16,10 @@ import java.util.UUID;
|
||||
|
||||
public class CustomImageObject implements GuiEntryListEntry {
|
||||
|
||||
public CustomImageObject(String name, UUID assetUUID) {
|
||||
public CustomImageObject(String name, UUID assetUUID) throws IOException {
|
||||
this.name = name;
|
||||
|
||||
try {
|
||||
setLinkedAsset(assetUUID);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
setLinkedAsset(assetUUID);
|
||||
}
|
||||
|
||||
@Getter @Setter private String name;
|
||||
@@ -43,7 +39,7 @@ public class CustomImageObject implements GuiEntryListEntry {
|
||||
|
||||
if(asset instanceof ReplayImageAsset) {
|
||||
setImage(((ReplayImageAsset)asset).getObject());
|
||||
} else {
|
||||
} else if(asset != null) {
|
||||
throw new UnsupportedOperationException("A CustomImageObject requires a ReplayImageAsset");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user