class

GSDL::Text

Inherits GSDL::Centerable < GSDL::Entity < GSDL::Saveable < GSDL::Tweenable < Reference < Object

Constants

CharacterDefaultTypingSpeed = 0.075.seconds
Ellipsis = "..."
EllipsisMarker = "|^.~.^|"
WordDefaultTypingSpeed = 0.25.seconds

Constructors

new(font : Symbol = FontManager.default, font_size : Num = FontManager.default_size, text : String = "", x : Num = 0, y : Num = 0, h_align : HorizontalAlign = HorizontalAlign::Left, v_align : VerticalAlign = VerticalAlign::Top, line_spacing : Num = 1.2_f32, character_spacing : Num = 0, typing : GSDL::Text::Typing = Typing::None, typing_speed : Time::Span | Nil = nil, shadow : Tuple(Float32 | Int32, Float32 | Int32) = {0, 0}, shadow_color : Color = Color::Black, outline : Int32 = FontManager.default_outline, outline_color : Color = Color::Black, origin = {0_f32, 0_f32}, scale = {1_f32, 1_f32}, rotation : Num = 0, color : LibSDL3::Color = GSDL::Color::White, width : Float32 | Int32 | Nil = nil, height : Float32 | Int32 | Nil = nil, z_index : Int32 = 0, draw_relative_to_camera : Bool = true, weight : FontWeight = FontWeight::Normal, style : FontStyle = FontStyle::Regular)
Source

Instance methods

_draw(draw : Draw)
Source
character_spacing
Source
character_spacing=(character_spacing : Num)
Source
color
Source
color=(color : Color)
Source
complete
Source
complete?
Source
draw(draw : Draw)
Source
draw_relative_to_camera=(draw_relative_to_camera : Bool)
Source
draw_relative_to_camera?
Source
font
Source
font=(font : Symbol)
Source
font_atlas
Source
font_size
Source
font_size=(font_size : Num)
Source
h_align
Source
h_align=(h_align : HorizontalAlign)
Source
height
Source
height=(height : Num | Nil)
Source
height_fixed?
Source
line_height
Source
line_spacing
Source
line_spacing=(line_spacing : Num)
Source
on_complete
Source
on_complete=(on_complete : Proc(Nil) | Nil)
Source
opacity
Source
opacity=(opacity : UInt8)
Source
outline
Source
outline=(outline : Int32)
Source
outline_color
Source
outline_color=(outline_color : Color)
Source
render_height
Source
render_width
Source
render_x
Source
render_y
Source
restart
Source
rotation
Source
rotation=(rotation : Num)
Source
scale=(scale : Tuple(Num, Num))
Source
scale=(scale : Num)
Source
scale_x=(scale_x : Num)
Source
scale_y=(scale_y : Num)
Source
shadow
Source
shadow=(shadow : Tuple(Num, Num))
Source
shadow_color
Source
shadow_color=(shadow_color : Color)
Source
style
Source
style=(style : FontStyle)
Source
text
Source
text=(text : String)
Source
text_height
Source
text_width
Source
typed?
Source
typing
Source
typing_speed
Source
typing_speed=(typing_speed : TimeSpan | Nil)
Source
update(dt : Float32) : Bool
Source
v_align
Source
v_align=(v_align : VerticalAlign)
Source
weight
Source
weight=(weight : FontWeight)
Source
width
Source
width=(width : Num | Nil)
Source
width_fixed?
Source
wrap_width=(val : Num | Nil)
Source
x=(x : Num)

requires

Source
y=(y : Num)
Source
z_index
Source
z_index=(z_index : Int32)
Source
z_index_max
Source

Nested types