rebf-gaiden/Scripts/_.35.rb
2025-04-26 17:06:34 -05:00

117 lines
No EOL
5 KiB
Ruby
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module MenuCommandHelp
#メニューコマンドに対応した説明文を設定します
TEXT = []
TEXT[0] = "アイテムを使用します" #ITEMS
TEXT[1] = "スキルを使用します" #SKILL
TEXT[2] = "新しいスキルを習得します" #SKILLGET
TEXT[3] = "装備を変更します" #EQUIP
TEXT[4] = "主人公の能力値を確認します" #STATUS
TEXT[5] = "主人公の能力値を強化できます" #STATUSSET
TEXT[6] = "今までに戦った女の子の一覧です" #MOBDICTIONARY
TEXT[7] = "今までに入手したカードの一覧です" #CARDBOOK
TEXT[8] = "進行しているクエスト等を確認します" #クエスト
TEXT[9] = "メンバーチェンジ" #
TEXT[10] = "援護スキル習得" #
TEXT[11] = "オプション" #
TEXT[12] = "現在の状況をセーブします" #SAVE
TEXT[13] = "セーブデータをロードします" #LOAD
TEXT[14] = "ゲームを終了します" #GAMEEND
end
#==============================================================================
# ■ Scene_Menu
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● 開始処理
#--------------------------------------------------------------------------
alias :menu_ex_start :start
def start
menu_ex_start
@mapname_window = Window_Menu_MapName.new(@gold_window.y)
@command_help_window = Window_Menu_CommandHelp.new
@command_window.help_window = @command_help_window
@command_window.select(@command_window.index)
end
end
#==============================================================================
# ■ Window_Menu_MapName
#==============================================================================
class Window_Menu_MapName < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(gold_window_y)
super(0, gold_window_y - window_height, window_width, window_height)
self.opacity = 0#紅茶走透明化
refresh
end
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
return Graphics.width
end
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_height
return fitting_height(1)
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
contents.clear
change_color(system_color)
rect = text_size("        ")
draw_text(rect, "       ")
rect = text_size("       ")
rect.x += rect.width
rect.width = contents.width - rect.x
change_color(normal_color)
draw_text(rect, $game_map.display_name)
end
end
#==============================================================================
# ■ Window_Menu_CommandHelp
#==============================================================================
class Window_Menu_CommandHelp < Window_Help
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super
self.x = 160
self.y = Graphics.height - window_height
self.width = window_width
self.height = window_height
create_contents
end
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_width
return Graphics.width - 160
end
#--------------------------------------------------------------------------
# ● ウィンドウ幅の取得
#--------------------------------------------------------------------------
def window_height
return fitting_height(1)
end
end
#==============================================================================
# ■ Window_MenuCommand
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# ● 項目の選択
#--------------------------------------------------------------------------
def select(index)
self.index = index if index
@help_window.set_text(MenuCommandHelp::TEXT[index]) if index and @help_window
end
end