Struct TextureAtlasRegistration
pub struct TextureAtlasRegistration {
pub atlas: Identifier,
pub definition: Identifier,
}Expand description
An atlas a client mod adds beside the game’s (RegisterTextureAtlasesEvent), as
register_texture_atlases declares it: its id and the atlas definition listing its sprites.
Horizon stitches its sprites into the GUI atlas, each under Self::sprite_name.
Fields§
§atlas: IdentifierThe atlas’s id, in the mod’s own namespace (mymod:icons).
definition: IdentifierIts definition, assets/<namespace>/atlases/<path>.json (mymod:icons): a sources list
like vanilla’s atlas definitions (directory, single, filter, unstitch,
paletted_permutations), which resource packs can change like theirs.
Implementations§
§impl TextureAtlasRegistration
impl TextureAtlasRegistration
pub fn sprite_name(&self, sprite: &Identifier) -> Identifier
pub fn sprite_name(&self, sprite: &Identifier) -> Identifier
The GUI atlas name of this atlas’s sprite sprite (mymod:heart in mymod:icons is
mymod:gui/atlases/icons/mymod/heart): what gui_sprite looks it up by and
DrawContext::sprite draws.
Trait Implementations§
§impl Clone for TextureAtlasRegistration
impl Clone for TextureAtlasRegistration
§fn clone(&self) -> TextureAtlasRegistration
fn clone(&self) -> TextureAtlasRegistration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for TextureAtlasRegistration
impl Debug for TextureAtlasRegistration
impl Eq for TextureAtlasRegistration
§impl PartialEq for TextureAtlasRegistration
impl PartialEq for TextureAtlasRegistration
impl StructuralPartialEq for TextureAtlasRegistration
Auto Trait Implementations§
impl Freeze for TextureAtlasRegistration
impl RefUnwindSafe for TextureAtlasRegistration
impl Send for TextureAtlasRegistration
impl Sync for TextureAtlasRegistration
impl Unpin for TextureAtlasRegistration
impl UnsafeUnpin for TextureAtlasRegistration
impl UnwindSafe for TextureAtlasRegistration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more