class

GSF::Message

Inherits Reference < Object

Constants

AnimateArrowDuration = 500.milliseconds
AnimateDuration = 300.milliseconds
ArrowBackgroundColor = SF::Color.new(17, 17, 17)
ArrowRadius = 16
BackgroundColor = SF::Color.new(17, 17, 17, 170)
FontSize = 16
LineSpacing = 16
MaxLines = 4
OutlineColor = SF::Color.new(102, 102, 102)
OutlineThickness = 4
Padding = 24
TextColor = SF::Color::White
TypeDuration = 69.milliseconds

Constructors

new(cx : Float32 | Int32, y : Float32 | Int32 = -1, bot_y = -1, width : Float32 | Int32 = Screen.width, message = "", typing : Bool = false, animate : Bool = false, choices : Array(NamedTuple(key: String, label: String)) = [] of ChoiceData)
Source

Instance methods

animate?
Source
animate_arrow_duration
Source
animate_duration
Source
animated?
Source
arrow_background_color
Source
arrow_radius
Source
background_color
Source
choice_index
Source
choice_padding
Source
choice_selected
Source
choice_text
Source
choices
Source
draw(window : SF::RenderWindow)
Source
draw_arrow(window)
Source
draw_border(window)
Source
draw_choice_border(window, px, py, text_width, selected)
Source
draw_choices(window)
Source
draw_text(window)
Source
font

NOTE: this has to be overridden by a custom font

Source
font_size
Source
get_lines(all_text : Array(SF::Text)) : Array(Array(SF::Text))
Source
get_pages
Source
height
Source
hide?
Source
hide_reset
Source
line_height
Source
line_spacing
Source
max_lines
Source
next_choice_joysticks?(joysticks : Joysticks)
Source
next_choice_keys
Source
next_choice_sound_buffer

NOTE: this has to be overridden by a custom SF::SoundBuffer like @@next_choice_sound_buffer ||= SF::SoundBuffer.from_file("./assets/next_choice.wav")

Source
next_choice_sound_pitch
Source
next_page_joystick_buttons
Source
next_page_keys
Source
next_page_or_hide
Source
next_page_sound_buffer

NOTE: this has to be overridden by a custom SF::SoundBuffer like @@next_page_sound_buffer ||= SF::SoundBuffer.from_file("./assets/next_page.wav")

Source
next_page_sound_pitch
Source
outline_color
Source
outline_thickness
Source
padding
Source
page_index
Source
pages
Source
play_sound(sound_buffer, pitch)
Source
previous_choice_joysticks?(joysticks : Joysticks)
Source
previous_choice_keys
Source
previous_choice_sound_buffer

NOTE: this has to be overridden by a custom SF::SoundBuffer like @@previous_choice_sound_buffer ||= SF::SoundBuffer.from_file("./assets/previous_choice.wav")

Source
previous_choice_sound_pitch
Source
reset_choice_selected
Source
reset_message
Source
show
Source
show?
Source
skip_typing_joystick_buttons
Source
skip_typing_keys
Source
skip_typing_sound_buffer

NOTE: this has to be overridden by a custom SF::SoundBuffer like @@skip_typing_sound_buffer ||= SF::SoundBuffer.from_file("./assets/skip_page.wav")

Source
skip_typing_sound_pitch
Source
sound
Source
text
Source
text_color
Source
type_duration
Source
typed?
Source
typed_message
Source
typing?
Source
update(keys : Keys, joysticks : Joysticks)
Source
update_data(message : String, choices : Array(NamedTuple(key: String, label: String)) = [] of ChoiceData)
Source
width
Source

Nested types