pub struct UiRuntime {
pub mwnd: MwndRuntime,
pub sys: SysOverlayRuntime,
pub msg_back: MsgBackRuntime,
pub editbox: EditBoxOverlayRuntime,
/* private fields */
}Fields§
§mwnd: MwndRuntime§sys: SysOverlayRuntime§msg_back: MsgBackRuntime§editbox: EditBoxOverlayRuntimeImplementations§
Source§impl UiRuntime
impl UiRuntime
pub fn set_text_colors( &mut self, text_color: (u8, u8, u8), shadow_color: (u8, u8, u8), )
pub fn set_text_colors_full( &mut self, text_color: (u8, u8, u8), shadow_color: (u8, u8, u8), fuchi_color: Option<(u8, u8, u8)>, )
pub fn set_mwnd_text_colors_full( &mut self, msg_text_color: (u8, u8, u8), msg_shadow_color: (u8, u8, u8), msg_fuchi_color: Option<(u8, u8, u8)>, name_text_color: (u8, u8, u8), name_shadow_color: (u8, u8, u8), name_fuchi_color: Option<(u8, u8, u8)>, )
pub fn current_mwnd_window_render_state( &self, screen_w: u32, screen_h: u32, ) -> Option<MwndWindowRenderState>
Sourcepub fn sync_layout(&mut self, layers: &mut LayerManager, w: u32, h: u32)
pub fn sync_layout(&mut self, layers: &mut LayerManager, w: u32, h: u32)
Ensure fixed UI sprites exist and are laid out for the given screen size.
Sourcepub fn tick(
&mut self,
layers: &mut LayerManager,
images: &mut ImageManager,
project_dir: &Path,
w: u32,
h: u32,
script: &ScriptRuntimeState,
syscom: &SyscomRuntimeState,
editbox_lists: &HashMap<u32, EditBoxListState>,
focused_editbox: Option<(u32, usize)>,
)
pub fn tick( &mut self, layers: &mut LayerManager, images: &mut ImageManager, project_dir: &Path, w: u32, h: u32, script: &ScriptRuntimeState, syscom: &SyscomRuntimeState, editbox_lists: &HashMap<u32, EditBoxListState>, focused_editbox: Option<(u32, usize)>, )
Called once per frame to update UI and apply visibility.
pub fn set_message_bg(&mut self, img: ImageId)
pub fn show_message_bg(&mut self, on: bool)
pub fn force_message_bg_visible(&mut self, on: bool)
pub fn begin_mwnd_open(&mut self, anime_type: i64, duration_ms: i64)
pub fn begin_mwnd_close(&mut self, anime_type: i64, duration_ms: i64)
pub fn set_message_filter(&mut self, img: Option<ImageId>)
pub fn apply_mwnd_projection(&mut self, proj: &MwndProjectionState)
pub fn set_mwnd_window_state( &mut self, window_pos: Option<(i64, i64)>, window_size: Option<(i64, i64)>, message_pos: Option<(i64, i64)>, message_margin: Option<(i64, i64, i64, i64)>, window_moji_cnt: Option<(i64, i64)>, moji_size: Option<i64>, moji_space: Option<(i64, i64)>, mwnd_extend_type: i64, moji_color: Option<i64>, shadow_color: Option<i64>, fuchi_color: Option<i64>, face_file: Option<&str>, face_no: i64, rep_pos: Option<(i64, i64)>, slide_enabled: bool, slide_time: i64, )
pub fn clear_mwnd_window_state(&mut self)
pub fn set_message(&mut self, msg: String)
pub fn append_message(&mut self, msg: &str)
pub fn append_linebreak(&mut self)
pub fn set_name(&mut self, name: String)
pub fn clear_name(&mut self)
pub fn clear_message(&mut self)
pub fn begin_wait_message(&mut self)
pub fn begin_wait_page_message(&mut self)
pub fn reveal_message_now(&mut self)
pub fn message_wait_text_fully_revealed(&self) -> bool
pub fn message_waiting(&self) -> bool
pub fn message_visible_chars(&self) -> usize
pub fn message_wait_message_len(&self) -> usize
pub fn needs_continuous_frame( &self, script: &ScriptRuntimeState, syscom: &SyscomRuntimeState, ) -> bool
pub fn end_wait_message(&mut self) -> bool
pub fn request_clear_message_on_wait_end(&mut self)
pub fn set_sys_overlay(&mut self, active: bool, text: String)
pub fn message_text(&self) -> Option<&str>
pub fn name_text(&self) -> Option<&str>
pub fn auto_advance_due( &self, script: &ScriptRuntimeState, syscom: &SyscomRuntimeState, ) -> bool
pub fn set_msg_back_projection( &mut self, projection: Option<MsgBackUiProjection>, )
pub fn msg_back_slider_size(&self) -> Option<(u32, u32)>
pub fn msg_back_slider_screen_pos(&self) -> Option<(i32, i32)>
pub fn msg_back_hit_action(&self, x: i32, y: i32) -> Option<MsgBackHitAction>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UiRuntime
impl !RefUnwindSafe for UiRuntime
impl Send for UiRuntime
impl Sync for UiRuntime
impl Unpin for UiRuntime
impl UnsafeUnpin for UiRuntime
impl !UnwindSafe for UiRuntime
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.