Class: Yuki::Message

Inherits:
Window show all
Defined in:
scripts/01100 Yuki/02200 Yuki_Message.rb,
scripts/01100 Yuki/02201 Yuki__Message update.rb,
scripts/01100 Yuki/02204 Yuki__Message speaker.rb,
scripts/01100 Yuki/02202 Yuki__Message text_draw.rb,
scripts/01100 Yuki/02203 Yuki__Message sub_window.rb

Overview

Class that helps to show message on screen

To make the message management easily this class will expose its main object through Yuki::Mesage.current with an optional argument to select the current parent

List of functionalities of this class

  • Showing the one who is speaking (name & faceset)

  • Showing emotion of the one who is speaking

  • Choosing the number of lines

  • Choosing the skin of the various elements

  • Choosing the position of the window & the various elements (speaker etc…)

  • Choosing the speed of the text display

Direct Known Subclasses

Battle::Scene::Message

Constant Summary collapse

PauseSkin =

Name of the pause skin in Graphics/Windowskins/

'Pause2'
NAME_SKIN =

Windowskin for the name window

'message'
S_sl =

Anti-slash character

"\\"
S_000 =

Protected Anti-Slash (special_command processing)

"\000"
S_001 =

Color change char

"\001"
S_002 =

Wait char

"\x02"
S_n =

New Line char (add line_height to y)

"\n"
@@instances =

List of message instance (to allow the access to the current message)

{}

Instance Attribute Summary collapse

Attributes inherited from LiteRGSS::Window

#__index__, #active, #back_opacity, #contents_opacity, #cursor_rect, #cursorskin, #height, #opacity, #ox, #oy, #pause, #pause_x, #pause_y, #pauseskin, #stretch, #viewport, #visible, #width, #window_builder, #windowskin, #x, #y, #z

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Window

#simple_mouse_in?, #translate_mouse_coords

Methods inherited from LiteRGSS::Window

#lock, #locked?, new, #set_origin, #set_position, #set_size, #unlock

Methods inherited from LiteRGSS::Disposable

#disposed?

Constructor Details

#initialize(viewport, parent = $scene) ⇒ Message

Create a new Message handler

Parameters:

Instance Attribute Details

#auto_skipBoolean

Returns If the message doesn't wait the player to hit A to terminate.

Returns:

  • (Boolean)

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

#drawing_messageBoolean

Returns If the message is still drawing (block some processes in #update).

Returns:

  • (Boolean)

    If the message is still drawing (block some processes in #update)

#input_number_windowGamePlay::InputNumber

Returns Variable that holds the GamePlay::InputNumber object.

Returns:

  • (GamePlay::InputNumber)

    Variable that holds the GamePlay::InputNumber object

#last_textString? (readonly)

Returns the last text the window showed (used in battle to prevent redisplay of pokemon name).

Returns:

  • (String, nil)

    the last text the window showed (used in battle to prevent redisplay of pokemon name)

#line_number_overwriteInteger?

Returns Overwrite the number of line for the current message.

Returns:

  • (Integer, nil)

    Overwrite the number of line for the current message

#nameskin_overwriteString?

Returns Change the windowskin of the name.

Returns:

  • (String, nil)

    Change the windowskin of the name

#position_overwriteSymbol, ...

Note:

Values can be : :top, :middle, :bottom, :left, :right, [x, y]

Returns Overwrite the message position for the current message.

Returns:

  • (Symbol, Array, nil)

    Overwrite the message position for the current message

#stay_visibleBoolean

Returns If the window message doesn't fade out.

Returns:

  • (Boolean)

    If the window message doesn't fade out

#width_overwriteInteger?

Returns Overwrite the width of the window.

Returns:

  • (Integer, nil)

    Overwrite the width of the window

#windowskin_overwriteString?

Returns Change the windowskin of the window.

Returns:

  • (String, nil)

    Change the windowskin of the window

Class Method Details

.current(parent = $scene) ⇒ Message?

Return the actual instance of message

Parameters:

Returns:

Instance Method Details

#current_layoutScriptLoader::PSDKConfig::LayoutConfig::Message

Retrieve the current layout configuration

#dispose(with_viewport: false)

Dispose the window

Parameters:

  • with_viewport (Boolean) (defaults to: false)

    tell to also dispose the viewport of the Window

#terminate_message

Terminate the message display

#update

Update the message processing

#z=(value)

Change the Z coordinate of the Window

Parameters:

  • value (Integer)

    new z coordinate