class

GSDL::TextBox

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

Constants

Padding = 16

Constructors

new(font : Symbol | FontOld = FontManager.default, font_size : Num = FontManager.default_size, text : String | GSDL::Text = "", origin : Tuple(Float32, Float32) = {0_f32, 0_f32}, scale : Tuple(Float32 | Int32, Float32 | Int32) = {1_f32, 1_f32}, width : Int32 | Nil = nil, height : Int32 | Nil = nil, padding : Int32 | Nil = nil, padding_x : Int32 | Nil = nil, padding_y : Int32 | Nil = nil, align = FontOld::Align::Left, x : Num = 0_f32, y : Num = 0_f32, color = ColorScheme.get(:ui_text), z_index : Int32 = 900, draw_relative_to_camera : Bool = false)
Source

Instance methods

color
Source
color=(value : Color)
Source
draw(draw : Draw)
Source
draw_background(draw : Draw)
Source
draw_border(draw : Draw)
Source
draw_relative_to_camera=(draw_relative_to_camera : Bool)
Source
draw_relative_to_camera?
Source
global_x
Source
global_y
Source
height
Source
origin
Source
origin=(origin : Tuple(Float32, Float32))
Source
origin_x
Source
origin_x=(origin_x : Float32)
Source
origin_y
Source
origin_y=(origin_y : Float32)
Source
padding
Source
padding=(val : Int32)
Source
padding_x
Source
padding_x=(val : Int32)
Source
padding_y
Source
padding_y=(val : Int32)
Source
render_height
Source
render_width
Source
render_x
Source
render_y
Source
scale
Source
scale=(scale : Tuple(Num, Num))
Source
scale=(scale : Num)
Source
scale_x
Source
scale_x=(scale_x : Num)
Source
scale_y
Source
scale_y=(scale_y : Num)
Source
screen_height
Source
screen_width
Source
screen_x

Helpers for screen-space interaction (Mouse/Input)

Source
screen_y
Source
text
Source
text=(text : String)
Source
tweens
Source
update(dt : Float32)
Source
width
Source
x=(x : Num)

requires

Source
y=(y : Num)
Source
z_index
Source
z_index(*args, **options)
Source
z_index(*args, **options, &)
Source
z_index=(z_index : Int32)
Source