文章や選択肢などを表示するメッセージウィンドウの状態を扱うクラスです。この クラスのインスタンスは $game_message で参照されます。

Methods
A
B
C
H
I
N
Attributes
[RW] background
[RW] choice_cancel_type
[RW] choice_proc
[R] choices
[RW] face_index
[RW] face_name
[RW] item_choice_variable_id
[RW] num_input_digits_max
[RW] num_input_variable_id
[RW] position
[RW] scroll_mode
[RW] scroll_no_fast
[RW] scroll_speed
[R] texts

公開インスタンス変数

[RW] visible
Class Public methods
new()

オブジェクト初期化

# File Game_Message.rb, line 30
def initialize
  clear
  @visible = false
end
Instance Public methods
add(text)

テキストの追加

# File Game_Message.rb, line 58
def add(text)
  @texts.push(text)
end
all_text()

改行込みの全テキストを取得

# File Game_Message.rb, line 107
def all_text
  @texts.inject("") {|r, text| r += text + "\n" }
end
busy?()

ビジー判定

# File Game_Message.rb, line 93
def busy?
  has_text? || choice? || num_input? || item_choice?
end
choice?()

選択肢モード判定

# File Game_Message.rb, line 72
def choice?
  @choices.size > 0
end
clear()

クリア

# File Game_Message.rb, line 38
def clear
  @texts = []
  @choices = []
  @face_name = ""
  @face_index = 0
  @background = 0
  @position = 2
  @choice_cancel_type = 0
  @choice_proc = nil
  @num_input_variable_id = 0
  @num_input_digits_max = 0
  @item_choice_variable_id = 0
  @scroll_mode = false
  @scroll_speed = 2
  @scroll_no_fast = false
end
has_text?()

テキストの存在判定

# File Game_Message.rb, line 65
def has_text?
  @texts.size > 0
end
item_choice?()

アイテム選択モード判定

# File Game_Message.rb, line 86
def item_choice?
  @item_choice_variable_id > 0
end
new_page()

改ページ

# File Game_Message.rb, line 100
def new_page
  @texts[-1] += "\f" if @texts.size > 0
end
num_input?()

数値入力モード判定

# File Game_Message.rb, line 79
def num_input?
  @num_input_variable_id > 0
end