[][src]Struct yy_boss::YypBoss

pub struct YypBoss {
    pub directory_manager: DirectoryManager,
    pub pipeline_manager: PipelineManager,
    pub sprites: YyResourceHandler<Sprite>,
    // some fields omitted
}

Fields

directory_manager: DirectoryManagerpipeline_manager: PipelineManagersprites: YyResourceHandler<Sprite>

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 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) -> Vec<(String, Resource)>[src]

Returns a list of resource names already being used by the system.

In a project with a sprite spr_player and an object obj_player, this HashSet would contain "spr_player" and "obj_player".

pub fn new_folder_end(
    &mut self,
    parent_path: &ViewPath,
    name: String
) -> Result<ViewPath, FolderGraphError>
[src]

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 new_folder_order(
    &mut self,
    parent_path: ViewPath,
    name: String,
    order: usize
) -> Result<ViewPath, FolderGraphError>
[src]

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.

Nb: when users have Gms2 in "Alphabetical" sort order, the order value here is largely ignored by the IDE. This can make for odd and unexpected results.

pub fn new_resource_end(
    &mut self,
    parent_path: ViewPath,
    resource_name: &str,
    resource_kind: Resource
) -> Result<CreatedResource, FolderGraphError>
[src]

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

This function returns a FilledResourceToken, which is a required parameter for then assigning the Sprite to the Token.

pub fn remove_resource(
    &mut self,
    resource_name: &str,
    resource_kind: Resource
) -> Result<RemovedResource, FolderGraphError>
[src]

pub fn get_resource(&self, resource_name: &str) -> Option<CreatedResource>[src]

Checks if a resource with a given name exists. If it does, it will return information on that resource in the form of the CreatedResource token, which can tell the user the type of resource.

pub fn serialize(&mut self) -> AnyResult<()>[src]

Serializes the YypBoss data to disk at the path of the Yyp.

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!

Trait Implementations

impl Debug for YypBoss[src]

impl Into<Yyp> for YypBoss[src]

impl PartialEq<YypBoss> for YypBoss[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,