Package foundry.veil.api.resource.type
Record Class TextureResource
java.lang.Object
java.lang.Record
foundry.veil.api.resource.type.TextureResource
- All Implemented Interfaces:
VeilResource<TextureResource>
@Internal
public record TextureResource(VeilResourceInfo resourceInfo)
extends Record
implements VeilResource<TextureResource>
-
Constructor Summary
ConstructorsConstructorDescriptionTextureResource(VeilResourceInfo resourceInfo) Creates an instance of aTextureResourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal booleanIndicates whether some other object is "equal to" this one.intGets the icon code for this resource (ex.final inthashCode()Returns a hash code value for this object.voidhotReload(VeilResourceManager resourceManager) Hot-reloads the resource.voidrender(boolean dragging, boolean fullName) Renders this resource into the resource panel.Returns the value of theresourceInforecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface foundry.veil.api.resource.VeilResource
copyToResources, onFileSystemChange
-
Constructor Details
-
TextureResource
Creates an instance of aTextureResourcerecord class.- Parameters:
resourceInfo- the value for theresourceInforecord component
-
-
Method Details
-
render
public void render(boolean dragging, boolean fullName) Description copied from interface:VeilResourceRenders this resource into the resource panel.- Specified by:
renderin interfaceVeilResource<TextureResource>- Parameters:
dragging- Whether the user is dragging the resourcefullName- Whether to render the location of the resource
-
getActions
- Specified by:
getActionsin interfaceVeilResource<TextureResource>- Returns:
- All actions that can be performed on this resource
-
canHotReload
public boolean canHotReload()- Specified by:
canHotReloadin interfaceVeilResource<TextureResource>- Returns:
- If this resource can be hot-reloaded
-
hotReload
Description copied from interface:VeilResourceHot-reloads the resource.- Specified by:
hotReloadin interfaceVeilResource<TextureResource>- Parameters:
resourceManager- The resource manager reloading the resource- Throws:
IOException- If any error occurs while trying to reload
-
getIconCode
public int getIconCode()Description copied from interface:VeilResourceGets the icon code for this resource (ex. 0xED0F)- Specified by:
getIconCodein interfaceVeilResource<TextureResource>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
resourceInfo
Returns the value of theresourceInforecord component.- Specified by:
resourceInfoin interfaceVeilResource<TextureResource>- Returns:
- the value of the
resourceInforecord component
-