Module: PFM::Message::State

Includes:
Parser
Included in:
UI::Message::Window
Defined in:
docs/4_Systems_004_Message.rb

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

Instance Method Summary collapse

Methods included from Parser

#convert_text_to_properties, #make_instructions, register_marker

Instance Attribute Details

#auto_skipBoolean

If the message doesn’t wait the player to hit A to terminate

Returns:

  • (Boolean)


356
357
358
# File 'docs/4_Systems_004_Message.rb', line 356

def auto_skip
  @auto_skip
end

#last_textString? (readonly)

The last unprocessed text the window has shown

Returns:



362
363
364
# File 'docs/4_Systems_004_Message.rb', line 362

def last_text
  @last_text
end

#stay_visibleBoolean

If the window message doesn’t fade out

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


397
398
# File 'docs/4_Systems_004_Message.rb', line 397

def done_drawing_message?
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

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


379
380
# File 'docs/4_Systems_004_Message.rb', line 379

def need_to_show_message?
end

#need_to_show_number_input?Boolean

Tell if the message window need to show a number input

Returns:

  • (Boolean)


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

Returns:

  • (Boolean)


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 parse_and_show_new_message
end

#showing_message?Boolean

Tell if the message window is showing a message

Returns:

  • (Boolean)


401
402
# File 'docs/4_Systems_004_Message.rb', line 401

def showing_message?
end