Skip to main content

UiRuntime

Struct UiRuntime 

Source
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: EditBoxOverlayRuntime

Implementations§

Source§

impl UiRuntime

Source

pub fn set_text_colors( &mut self, text_color: (u8, u8, u8), shadow_color: (u8, u8, u8), )

Source

pub fn set_text_colors_full( &mut self, text_color: (u8, u8, u8), shadow_color: (u8, u8, u8), fuchi_color: Option<(u8, u8, u8)>, )

Source

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)>, )

Source

pub fn current_mwnd_window_render_state( &self, screen_w: u32, screen_h: u32, ) -> Option<MwndWindowRenderState>

Source

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.

Source

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.

Source

pub fn set_message_bg(&mut self, img: ImageId)

Source

pub fn show_message_bg(&mut self, on: bool)

Source

pub fn force_message_bg_visible(&mut self, on: bool)

Source

pub fn begin_mwnd_open(&mut self, anime_type: i64, duration_ms: i64)

Source

pub fn begin_mwnd_close(&mut self, anime_type: i64, duration_ms: i64)

Source

pub fn set_message_filter(&mut self, img: Option<ImageId>)

Source

pub fn apply_mwnd_projection(&mut self, proj: &MwndProjectionState)

Source

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, )

Source

pub fn clear_mwnd_window_state(&mut self)

Source

pub fn set_message(&mut self, msg: String)

Source

pub fn append_message(&mut self, msg: &str)

Source

pub fn append_linebreak(&mut self)

Source

pub fn set_name(&mut self, name: String)

Source

pub fn clear_name(&mut self)

Source

pub fn clear_message(&mut self)

Source

pub fn begin_wait_message(&mut self)

Source

pub fn begin_wait_page_message(&mut self)

Source

pub fn reveal_message_now(&mut self)

Source

pub fn message_wait_text_fully_revealed(&self) -> bool

Source

pub fn message_waiting(&self) -> bool

Source

pub fn message_visible_chars(&self) -> usize

Source

pub fn message_wait_message_len(&self) -> usize

Source

pub fn needs_continuous_frame( &self, script: &ScriptRuntimeState, syscom: &SyscomRuntimeState, ) -> bool

Source

pub fn end_wait_message(&mut self) -> bool

Source

pub fn request_clear_message_on_wait_end(&mut self)

Source

pub fn set_sys_overlay(&mut self, active: bool, text: String)

Source

pub fn message_text(&self) -> Option<&str>

Source

pub fn name_text(&self) -> Option<&str>

Source

pub fn auto_advance_due( &self, script: &ScriptRuntimeState, syscom: &SyscomRuntimeState, ) -> bool

Source

pub fn set_msg_back_projection( &mut self, projection: Option<MsgBackUiProjection>, )

Source

pub fn msg_back_slider_size(&self) -> Option<(u32, u32)>

Source

pub fn msg_back_slider_screen_pos(&self) -> Option<(i32, i32)>

Source

pub fn msg_back_hit_action(&self, x: i32, y: i32) -> Option<MsgBackHitAction>

Trait Implementations§

Source§

impl Debug for UiRuntime

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for UiRuntime

Source§

fn default() -> UiRuntime

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: 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>

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)

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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

§

fn into_sample(self) -> T

§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,