pub struct LuaPlayerCreateLocalFlyingTextParams {
pub color: Option<Color>,
pub create_at_cursor: Option<bool>,
pub position: Option<MapPosition>,
pub speed: Option<f64>,
pub surface: Option<SurfaceIdentification>,
pub text: String,
pub time_to_live: Option<u32>,
}Expand description
Spawn flying text that is only visible to this player. Either position or create_at_cursor are required. When create_at_cursor is true, all parameters other than text are ignored.
If no custom speed is set and the text is longer than 25 characters, its time_to_live and speed are dynamically adjusted to give the player more time to read it.
Local flying text is not saved, which means it will disappear after a save/load-cycle.
Fields§
§color: Option<Color>The color of the flying text. Defaults to white text.
create_at_cursor: Option<bool>If true, the flying text is created at the player’s cursor. Defaults to false.
position: Option<MapPosition>The location on the map at which to show the flying text.
speed: Option<f64>The speed at which the text rises upwards in tiles/second. Can’t be a negative value.
surface: Option<SurfaceIdentification>The surface which this text will be shown on. Defaults to player surface.
text: StringThe flying text to show.
time_to_live: Option<u32>The amount of ticks that the flying text will be shown for. Defaults to 80.
Trait Implementations§
Source§impl Clone for LuaPlayerCreateLocalFlyingTextParams
impl Clone for LuaPlayerCreateLocalFlyingTextParams
Source§fn clone(&self) -> LuaPlayerCreateLocalFlyingTextParams
fn clone(&self) -> LuaPlayerCreateLocalFlyingTextParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more