
# 「名前入力の処理」入力文字拡張 ver.1.01 (Since 2006/08/05)
# by Tetra-Z
#
# 「名前入力の処理」の時、入力できる文字を増やします。Aキー・Dキーで切替。
#
# 注意 : RGSSがver.1.00の場合、先頭の文字を「j」(小文字)にすると強制終了することがあります。
#
# 導入箇所 : Tetra-Z作「「名前入力の処理」頭文字大文字化処理」より上
#
# ver.1.01(2006/08/06)
# わずかに内部仕様を変更。配列が多くなってもこちらの方が処理が遅くならないと思われます。
#==============================================================================
# ■ Window_NameInput
#==============================================================================
class Window_NameInput < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_accessor :index
attr_accessor :page
attr_reader :character_table
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias tetraz95_initialize initialize
def initialize
tetraz95_initialize
@character_table = []
#==========================================================================
# □ カスタマイズポイント
#==========================================================================
@character_table.push([
"A", "B", "C", "D", "E",
"F", "G", "H", "I", "J",
"K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y",
"Z", "" , "" , "" , "" ,
",", ".", "_", "!", "?",
"+", "-", "*", "/", "=",
";", ":", "~","〜", "@",
"Α","Β","Γ","Δ","Ε",
"Ζ","Η","Θ","Ι","Κ",
"Λ","Μ","Ν","Ξ","Ο",
"Π","Ρ","Σ","Τ","Υ",
"Φ","Χ","Ψ","Ω", "" ,
"ゐ","ゑ", "" , "" , "" ,
"" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" ,
"a", "b", "c", "d", "e",
"f", "g", "h", "i", "j",
"k", "l", "m", "n", "o",
"p", "q", "r", "s", "t",
"u", "v", "w", "x", "y",
"z", "" , "" , "" , "" ,
"0", "1", "2", "3", "4",
"5", "6", "7", "8", "9",
"(", ")", "<", ">","々",
"α","β","γ","δ","ε",
"ζ","η","θ","ι","κ",
"λ","μ","ν","ξ","ο",
"π","ρ","σ","τ","υ",
"φ","χ","ψ","ω", "" ,
"ヰ","ヱ", "" , "" , "" ,
"" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" ,
"" , "" , "" , "" , "" ,
])
# 上記の形式(1グループ180個の配列)を繰り返すことでいくらでも追加可能
#==========================================================================
@page = 0
end
#--------------------------------------------------------------------------
# ● 文字の取得
#--------------------------------------------------------------------------
alias tetraz95_character character
def character
return @character_table[@page-1][@index] if @page > 0
return tetraz95_character
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
alias tetraz95_refresh refresh
def refresh
if @page.to_i > 0
self.contents.clear
table = @character_table[@page-1]
for i in 0..179
x = 4 + i / 5 / 9 * 152 + i % 5 * 28
y = i / 5 % 9 * 32
self.contents.draw_text(x, y, 28, 32, table[i], 1)
end
self.contents.draw_text(544, 9 * 32, 64, 32, "決定", 1)
return
end
tetraz95_refresh
end
end
#==============================================================================
# ■ Scene_Name
#==============================================================================
class Scene_Name
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias tetraz95_update update
def update
# X ボタンが押された場合
if Input.trigger?(Input::X)
# ウィンドウを更新
@edit_window.update
@input_window.update
@input_window.page = (@input_window.page - 1) % (@input_window.character_table.size + 1)
@input_window.refresh
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
return
end
# Z ボタンが押された場合
if Input.trigger?(Input::Z)
# ウィンドウを更新
@edit_window.update
@input_window.update
@input_window.page = (@input_window.page + 1) % (@input_window.character_table.size + 1)
@input_window.refresh
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
return
end
tetraz95_update
end
end