Module: PFM::Message::State
Overview
Module responsive of helping the message window with states
In order to have everything working properly, the class including this module needs to define:
-
message_width : Returns an integer telling the width of the message window we want to process (can use @properties)
-
width_computer : Returns [PFM::Message::WidthComputer] object helping to compute the width of the words/texts
Instance Attribute Summary collapse
-
#auto_skip ⇒ Boolean
If the message doesn’t wait the player to hit A to terminate.
-
#last_text ⇒ String?
readonly
The last unprocessed text the window has shown.
-
#stay_visible ⇒ Boolean
If the window message doesn’t fade out.
Instance Method Summary collapse
-
#at_end_of_line? ⇒ Boolean
Test if we’re at the end of the line.
-
#done_drawing_message? ⇒ Boolean
Test if we’re done drawing the message.
-
#initialize
Initialize the states.
-
#load_next_instruction
Load the next instruction.
-
#need_to_show_choice? ⇒ Boolean
Tell if the message window need to show a choice.
-
#need_to_show_message? ⇒ Boolean
Tell if the message window need to show a message.
-
#need_to_show_number_input? ⇒ Boolean
Tell if the message window need to show a number input.
-
#need_to_wait_user_input? ⇒ Boolean
Tell if the message window need to wait for user input.
-
#parse_and_show_new_message
Parse the new message and set the window into showing message state.
-
#showing_message? ⇒ Boolean
Tell if the message window is showing a message.
Methods included from Parser
#convert_text_to_properties, #make_instructions, register_marker
Instance Attribute Details
#auto_skip ⇒ Boolean
If the message doesn’t wait the player to hit A to terminate
356 357 358 |
# File 'docs/4_Systems_004_Message.rb', line 356 def auto_skip @auto_skip end |
#last_text ⇒ String? (readonly)
The last unprocessed text the window has shown
362 363 364 |
# File 'docs/4_Systems_004_Message.rb', line 362 def last_text @last_text end |
#stay_visible ⇒ Boolean
If the window message doesn’t fade out
359 360 361 |
# File 'docs/4_Systems_004_Message.rb', line 359 def stay_visible @stay_visible end |
Instance Method Details
#at_end_of_line? ⇒ Boolean
Test if we’re at the end of the line
393 394 |
# File 'docs/4_Systems_004_Message.rb', line 393 def at_end_of_line? end |
#done_drawing_message? ⇒ Boolean
Test if we’re done drawing the message
397 398 |
# File 'docs/4_Systems_004_Message.rb', line 397 def end |
#initialize
Initialize the states
375 376 |
# File 'docs/4_Systems_004_Message.rb', line 375 def initialize(...) end |
#load_next_instruction
Load the next instruction
389 390 |
# File 'docs/4_Systems_004_Message.rb', line 389 def load_next_instruction end |
#need_to_show_choice? ⇒ Boolean
Tell if the message window need to show a choice
405 406 |
# File 'docs/4_Systems_004_Message.rb', line 405 def need_to_show_choice? end |
#need_to_show_message? ⇒ Boolean
Tell if the message window need to show a message
379 380 |
# File 'docs/4_Systems_004_Message.rb', line 379 def end |
#need_to_show_number_input? ⇒ Boolean
Tell if the message window need to show a number input
409 410 |
# File 'docs/4_Systems_004_Message.rb', line 409 def need_to_show_number_input? end |
#need_to_wait_user_input? ⇒ Boolean
Tell if the message window need to wait for user input
383 384 |
# File 'docs/4_Systems_004_Message.rb', line 383 def need_to_wait_user_input? end |
#parse_and_show_new_message
Parse the new message and set the window into showing message state
386 387 |
# File 'docs/4_Systems_004_Message.rb', line 386 def end |
#showing_message? ⇒ Boolean
Tell if the message window is showing a message
401 402 |
# File 'docs/4_Systems_004_Message.rb', line 401 def end |