pub struct Page { /* private fields */ }Expand description
An event page containing most of the event state.
Each event page describes the behaviour of the event, its appearance and the scripts that it
runs as a collection of Command.
Implementations§
Source§impl Page
impl Page
Sourcepub fn parse(bytes: &[u8]) -> (usize, Self)
pub fn parse(bytes: &[u8]) -> (usize, Self)
Parse raw bytes into a single Page struct.
Use of this method is highly discouraged unless you know exactly what you are doing.
Prefer using Map::parse and then extract what you want from the structure tree.
§Panics
This function will panic if the given bytes do not represent a valid page structure.
This might be caused by unaligned bytes, corrupt files, incompatible format updates and library bugs. If you are confident you are doing everything right, feel free to report an issue on GitHub.
Sourcepub fn icon_mut(&mut self) -> &mut String
pub fn icon_mut(&mut self) -> &mut String
Mutable reference accessor for Page::icon.
Sourcepub fn icon_row_mut(&mut self) -> &mut u8
pub fn icon_row_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::icon_row.
Sourcepub fn icon_column(&self) -> u8
pub fn icon_column(&self) -> u8
The column of the selected icon in the selected sprite sheet.
Sourcepub fn icon_column_mut(&mut self) -> &mut u8
pub fn icon_column_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::icon_column.
Sourcepub fn icon_opacity(&self) -> u8
pub fn icon_opacity(&self) -> u8
The opacity the icon should have when rendered.
Sourcepub fn icon_opacity_mut(&mut self) -> &mut u8
pub fn icon_opacity_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::icon_opacity.
Sourcepub fn icon_blend(&self) -> &BlendType
pub fn icon_blend(&self) -> &BlendType
The blend method used for painting the icon onto the background.
Sourcepub fn icon_blend_mut(&mut self) -> &mut BlendType
pub fn icon_blend_mut(&mut self) -> &mut BlendType
Mutable reference accessor for Page::icon_blend.
Sourcepub fn event_trigger(&self) -> &EventTrigger
pub fn event_trigger(&self) -> &EventTrigger
The condition by which the event is triggered.
Sourcepub fn event_trigger_mut(&mut self) -> &mut EventTrigger
pub fn event_trigger_mut(&mut self) -> &mut EventTrigger
Mutable reference accessor for Page::event_trigger.
Sourcepub fn conditions(&self) -> &[Condition; 4]
pub fn conditions(&self) -> &[Condition; 4]
The conditions that must be mut for the script to run.
Sourcepub fn conditions_mut(&mut self) -> &mut [Condition; 4]
pub fn conditions_mut(&mut self) -> &mut [Condition; 4]
Mutable reference accessor for Page::conditions.
Sourcepub fn animation_speed(&self) -> u8
pub fn animation_speed(&self) -> u8
The speed at which the event’s animation advance.
Sourcepub fn animation_speed_mut(&mut self) -> &mut u8
pub fn animation_speed_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::animation_speed.
Sourcepub fn move_speed(&self) -> u8
pub fn move_speed(&self) -> u8
The speed at which the event moves.
Sourcepub fn move_speed_mut(&mut self) -> &mut u8
pub fn move_speed_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::move_speed.
Sourcepub fn move_frequency(&self) -> u8
pub fn move_frequency(&self) -> u8
The frequency at which the event moves.
Sourcepub fn move_frequency_mut(&mut self) -> &mut u8
pub fn move_frequency_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::move_frequency.
Sourcepub fn move_route(&self) -> &MoveRoute
pub fn move_route(&self) -> &MoveRoute
How (and whether) the event should move.
Sourcepub fn move_route_mut(&mut self) -> &mut MoveRoute
pub fn move_route_mut(&mut self) -> &mut MoveRoute
Mutable reference accessor for Page::move_route.
Sourcepub fn options(&self) -> &Options
pub fn options(&self) -> &Options
A set of options that influence the event rendering and behaviour.
Sourcepub fn options_mut(&mut self) -> &mut Options
pub fn options_mut(&mut self) -> &mut Options
Mutable reference accessor for Page::options.
Sourcepub fn moves(&self) -> &Vec<Move>
pub fn moves(&self) -> &Vec<Move>
The pattern the event follows when moving.
This field is only valid if Page::move_route is MoveRoute::Custom, otherwise it’s
empty.
Sourcepub fn moves_mut(&mut self) -> &mut Vec<Move>
pub fn moves_mut(&mut self) -> &mut Vec<Move>
Mutable reference accessor for Page::moves.
Sourcepub fn commands_mut(&mut self) -> &mut Vec<Command>
pub fn commands_mut(&mut self) -> &mut Vec<Command>
Mutable reference accessor for Page::commands.
Sourcepub fn shadow_graphic(&self) -> u8
pub fn shadow_graphic(&self) -> u8
The graphic to use for the shadow, if shadow graphics are enabled.
Sourcepub fn shadow_graphic_mut(&mut self) -> &mut u8
pub fn shadow_graphic_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::shadow_graphic.
Sourcepub fn range_extension_x(&self) -> u8
pub fn range_extension_x(&self) -> u8
How much the trigger area is expanded horizontally.
This field is only valid if Page::event_trigger is EventTrigger::ConfirmKey,
EventTrigger::EventTouch or EventTrigger::PlayerTouch
Sourcepub fn range_extension_x_mut(&mut self) -> &mut u8
pub fn range_extension_x_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::range_extension_x.
Sourcepub fn range_extension_y(&self) -> u8
pub fn range_extension_y(&self) -> u8
How much the trigger area is expanded horizontally.
This field is only valid if Page::event_trigger is EventTrigger::ConfirmKey,
EventTrigger::EventTouch or EventTrigger::PlayerTouch
Sourcepub fn range_extension_y_mut(&mut self) -> &mut u8
pub fn range_extension_y_mut(&mut self) -> &mut u8
Mutable reference accessor for Page::range_extension_y.