[][src]Struct gdnative::api::CharFXTransform

pub struct CharFXTransform { /* fields omitted */ }

core class CharFXTransform inherits Reference (reference counted).

Official documentation

See the documentation of this class in the Godot engine's official documentation.

Memory management

The lifetime of this object is automatically managed through reference counting.

Class hierarchy

CharFXTransform inherits methods from:

Safety

All types in the Godot API have "interior mutability" in Rust parlance. To enforce that the official thread-safety guidelines are followed, the typestate pattern is used in the Ref and TRef smart pointers, and the Instance API. The typestate Access in these types tracks whether the access is unique, shared, or exclusive to the current thread. For more information, see the type-level documentation on Ref.

Implementations

impl CharFXTransform[src]

pub fn new() -> Ref<CharFXTransform, Unique>[src]

Creates a new instance of this object.

This is a reference-counted type. The returned object is automatically managed by Ref.

pub fn absolute_index(&self) -> i64[src]

The index of the current character (starting from 0). Setting this property won't affect drawing.

pub fn character(&self) -> i64[src]

The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:
			[codeblock]
			# `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.
			# See the RichTextEffect documentation for details.
			char_fx.character = ord("*")
			[/codeblock]

pub fn color(&self) -> Color[src]

The color the character will be drawn with.

pub fn elapsed_time(&self) -> f64[src]

The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].
			[b]Note:[/b] Time still passes while the [RichTextLabel] is hidden.

pub fn environment(&self) -> Dictionary<Shared>[src]

Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form [code]#rrggbb[/code] or [code]#rgb[/code] will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.
			For example, the opening BBCode tag [code][example foo=hello bar=true baz=42 color=#ffffff][/code] will map to the following [Dictionary]:
			[codeblock]
			{"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)}
			[/codeblock]

pub fn offset(&self) -> Vector2D<f32, UnknownUnit>[src]

The position offset the character will be drawn with (in pixels).

pub fn relative_index(&self) -> i64[src]

The index of the current character (starting from 0). Setting this property won't affect drawing.

pub fn is_visible(&self) -> bool[src]

If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead.

pub fn set_absolute_index(&self, index: i64)[src]

The index of the current character (starting from 0). Setting this property won't affect drawing.

pub fn set_character(&self, character: i64)[src]

The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks:
			[codeblock]
			# `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`.
			# See the RichTextEffect documentation for details.
			char_fx.character = ord("*")
			[/codeblock]

pub fn set_color(&self, color: Color)[src]

The color the character will be drawn with.

pub fn set_elapsed_time(&self, time: f64)[src]

The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS].
			[b]Note:[/b] Time still passes while the [RichTextLabel] is hidden.

pub fn set_environment(&self, environment: Dictionary<Shared>)[src]

Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form [code]#rrggbb[/code] or [code]#rgb[/code] will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.
			For example, the opening BBCode tag [code][example foo=hello bar=true baz=42 color=#ffffff][/code] will map to the following [Dictionary]:
			[codeblock]
			{"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)}
			[/codeblock]

pub fn set_offset(&self, offset: Vector2D<f32, UnknownUnit>)[src]

The position offset the character will be drawn with (in pixels).

pub fn set_relative_index(&self, index: i64)[src]

The index of the current character (starting from 0). Setting this property won't affect drawing.

pub fn set_visibility(&self, visibility: bool)[src]

If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead.

Methods from Deref<Target = Reference>

pub fn init_ref(&self) -> bool[src]

Initializes the internal reference counter. Use this only if you really know what you are doing.
				Returns whether the initialization was successful.

Trait Implementations

impl Debug for CharFXTransform[src]

impl Deref for CharFXTransform[src]

type Target = Reference

The resulting type after dereferencing.

impl DerefMut for CharFXTransform[src]

impl GodotObject for CharFXTransform[src]

type RefKind = RefCounted

The memory management kind of this type. This modifies the behavior of the Ref smart pointer. See its type-level documentation for more information. Read more

impl Instanciable for CharFXTransform[src]

impl SubClass<Object> for CharFXTransform[src]

impl SubClass<Reference> for CharFXTransform[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SubClass<T> for T where
    T: GodotObject
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.