class

PointClickEngine::UI::FloatingText

Inherits Reference < Object

Floating text that follows a character

Constructors

new(text : String, character_name : String, target_position : RL::Vector2)
Source

Instance methods

add_choice(text : String, &action : -> Nil)

Add a dialog choice

Source
background_color
Source
background_color=(background_color : RL::Color)
Source
character_name
Source
character_name=(character_name : String)
Source
choice_color
Source
choice_color=(choice_color : RL::Color)
Source
choice_hover_color
Source
choice_hover_color=(choice_hover_color : RL::Color)
Source
choice_spacing
Source
choice_spacing=(choice_spacing : Int32)
Source
choices
Source
choices=(choices : Array(DialogChoice))
Source
draw

Draw the floating text

Source
elapsed_time

State

Source
elapsed_time=(elapsed_time : Float32)

State

Source
fade_alpha
Source
fade_alpha=(fade_alpha : Float32)
Source
fade_in_duration

Animation properties

Source
fade_in_duration=(fade_in_duration : Float32)

Animation properties

Source
fade_out_duration
Source
fade_out_duration=(fade_out_duration : Float32)
Source
fade_out_start_time
Source
fade_out_start_time=(fade_out_start_time : Float32)
Source
float_amplitude
Source
float_amplitude=(float_amplitude : Float32)
Source
float_speed
Source
float_speed=(float_speed : Float32)
Source
font_size

Visual properties

Source
font_size=(font_size : Int32)

Visual properties

Source
frame_context
Source
frame_context=(frame_context : PointClickEngine::Graphics::FrameContext | Nil)
Source
is_fading_in
Source
is_fading_in=(is_fading_in : Bool)
Source
is_fading_out
Source
is_fading_out=(is_fading_out : Bool)
Source
line_spacing
Source
line_spacing=(line_spacing : Int32)
Source
max_width
Source
max_width=(max_width : Int32)
Source
on_choice_selected
Source
on_choice_selected=(on_choice_selected : Proc(Int32, Nil) | Nil)
Source
on_text_completed
Source
on_text_completed=(on_text_completed : Proc(Nil) | Nil)
Source
padding
Source
padding=(padding : Int32)
Source
selected_choice
Source
selected_choice=(selected_choice : Int32 | Nil)
Source
start_fade_out

Start fade out animation

Source
target_position
Source
target_position=(target_position : RL::Vector2)
Source
text
Source
text=(text : String)
Source
text_color
Source
text_color=(text_color : RL::Color)
Source
update(dt : Float32) : Bool

Update the floating text

Source
update_position(new_position : RL::Vector2)

Update position to follow character

Source
visible
Source
visible=(visible : Bool)
Source