[−][src]Struct yy_boss::YypBoss
Implementations
impl YypBoss
[src]
pub fn new(path_to_yyp: &Path) -> AnyResult<YypBoss>
[src]
Creates a new YyBoss Manager and performs startup file reading.
pub fn absolute_path(&self) -> &Path
[src]
pub fn default_texture_path(&self) -> Option<TexturePath>
[src]
Gets the default texture path, if it exists. The "Default" group simply
has the name "Default"
.
pub fn current_resource_names(&self) -> &HashSet<String>
[src]
Gets an unordered HashSet of currently used resource names.
In a project
with a sprite spr_player
and an object obj_player
, this HashSet would contain
"spr_player"
and "obj_player"
.
pub fn overwrite_sprite(
&mut self,
sprite: Sprite,
associated_data: Vec<(FrameId, SpriteImageBuffer)>
) -> AnyResult<()>
[src]
&mut self,
sprite: Sprite,
associated_data: Vec<(FrameId, SpriteImageBuffer)>
) -> AnyResult<()>
Add a sprite into the YYP Boss. If the sprite doesn't exist, throws an error!
pub fn add_sprite(
&mut self,
sprite: Sprite,
associated_data: Vec<(FrameId, SpriteImageBuffer)>
)
[src]
&mut self,
sprite: Sprite,
associated_data: Vec<(FrameId, SpriteImageBuffer)>
)
Add a sprite into the YYP Boss. It is not immediately serialized, but will be serialized the next time the entire YYP Boss is.
Please note -- the name of the Sprite MIGHT change if that name already exists!
pub fn mark_sprite_with_path(
&mut self,
sprite_id: FilesystemPath,
ase_name: String
)
[src]
&mut self,
sprite_id: FilesystemPath,
ase_name: String
)
For the shared data in a sprite. a little messy!
pub fn get_sprite(&self, sprite_name: &str) -> Option<&Sprite>
[src]
This gets the data on a given Sprite with a given name. If no Sprite by that name exists, then a None is returned. It does not return a handle on the Associated Data of the Sprite.
pub fn get_sprite_data(&self) -> Option<<Sprite as YyResource>::SharedData>
[src]
pub fn add_folder_to_end(
&mut self,
parent_path: &ViewPath,
name: String
) -> Result<ViewPath, FolderGraphError>
[src]
&mut self,
parent_path: &ViewPath,
name: String
) -> Result<ViewPath, FolderGraphError>
Adds a subfolder to the folder given at parent_path
at the final order. If a tree looks like:
Sprites/
- spr_player
- spr_enemy
and user adds a folder with name Items
to the Sprites
folder, then the output tree will be:
Sprites/
- spr_player
- spr_enemy
- Items/
add_folder_to_end
returns a Result<ViewPath>
, where ViewPath
is of the newly created folder.
This allows for easy sequential operations, such as adding a folder and then adding a file to that folder.
pub fn add_folder_with_order(
&mut self,
parent_path: ViewPath,
name: String,
order: usize
) -> Result<ViewPath, FolderGraphError>
[src]
&mut self,
parent_path: ViewPath,
name: String,
order: usize
) -> Result<ViewPath, FolderGraphError>
Adds a subfolder to the folder given at parent_path
at given order. If a tree looks like:
Sprites/
- spr_player
- OtherSprites/
- spr_enemy
and user adds a folder with name Items
to the Sprites
folder with an order of 1,
then the output tree will be:
Sprites/
- spr_player
- Items/
- OtherSprites/
- spr_enemy
add_folder_with_order
returns a Result<ViewPath>
, where ViewPath
is of the newly created folder.
This allows for easy sequential operations, such as adding a folder and then adding a file to that folder.
pub fn add_file_at_end(
&mut self,
parent_path: ViewPath,
name: String,
child: FilesystemPath
) -> Result<usize, FolderGraphError>
[src]
&mut self,
parent_path: ViewPath,
name: String,
child: FilesystemPath
) -> Result<usize, FolderGraphError>
Adds a file to the folder given at parent_path
and with the final order. If a tree looks like:
Sprites/
- spr_player
- spr_enemy
and user adds a file with name spr_item
to the Sprites
folder, then the output tree will be:
Sprites/
- spr_player
- spr_enemy
- spr_item
pub fn add_file_with_order(
&mut self,
parent_path: ViewPath,
name: String,
child: FilesystemPath,
order: usize
) -> Result<(), FolderGraphError>
[src]
&mut self,
parent_path: ViewPath,
name: String,
child: FilesystemPath,
order: usize
) -> Result<(), FolderGraphError>
Adds a file to the folder given at parent_path
at the given order. If a tree looks like:
Sprites/
- spr_player
- spr_enemy
and user adds a file with name spr_item
to the Sprites
folder at order 1, then the output tree will be:
Sprites/
- spr_player
- spr_item
- spr_enemy
Additionally, spr_enemy
's order will be updated to be 2
.
pub fn serialize(&mut self) -> AnyResult<()>
[src]
impl YypBoss
[src]
pub fn root_path(&self) -> ViewPath
[src]
pub fn yyp(&self) -> &Yyp
[src]
Shows the underlying Yyp. This is exposed mostly for integration tests.
pub fn root_folder(&self) -> &FolderGraph
[src]
Gives a reference to the current FolderGraph.
pub fn folder(&self, view_path: &ViewPath) -> Option<FolderGraph>
[src]
This could be a very hefty allocation!
impl YypBoss
[src]
Utilities
pub fn ensure_yyboss_data(path: &Path) -> AnyResult<()>
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for YypBoss
impl Send for YypBoss
impl Sync for YypBoss
impl Unpin for YypBoss
impl UnwindSafe for YypBoss
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,