Trait valence::title::SetTitle

source ·
pub trait SetTitle {
    // Required methods
    fn set_title<'a>(&mut self, text: impl IntoText<'a>);
    fn set_subtitle<'a>(&mut self, text: impl IntoText<'a>);
    fn set_action_bar<'a>(&mut self, text: impl IntoText<'a>);
    fn set_title_times(&mut self, fade_in: i32, stay: i32, fade_out: i32);
    fn clear_title(&mut self);
    fn reset_title(&mut self);
}

Required Methods§

source

fn set_title<'a>(&mut self, text: impl IntoText<'a>)

Displays a title to a client.

A title is a large piece of text displayed in the center of the screen which may also include a subtitle underneath it. The title can be configured to fade in and out using set_title_times.

source

fn set_subtitle<'a>(&mut self, text: impl IntoText<'a>)

source

fn set_action_bar<'a>(&mut self, text: impl IntoText<'a>)

source

fn set_title_times(&mut self, fade_in: i32, stay: i32, fade_out: i32)

  • fade_in: Ticks to spend fading in.
  • stay: Ticks to keep the title displayed.
  • fade_out: Ticks to spend fading out.
source

fn clear_title(&mut self)

source

fn reset_title(&mut self)

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> SetTitle for T
where T: WritePacket,