rebf-gaiden/Scripts/_.35.rb
2025-04-27 02:57:10 -05:00

117 lines
No EOL
4.9 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
# Set the descriptions corresponding to the menu commands
TEXT = []
TEXT[0] = "Use an item" #ITEMS
TEXT[1] = "Use a skill" #SKILL
TEXT[2] = "Learn a new skill" #SKILLGET
TEXT[3] = "Change equipment" #EQUIP
TEXT[4] = "Check the protagonist's stats" #STATUS
TEXT[5] = "Enhance the protagonist's stats" #STATUSSET
TEXT[6] = "List of girls you've fought so far" #MOBDICTIONARY
TEXT[7] = "List of cards obtained so far" #CARDBOOK
TEXT[8] = "Check current quests and such" #Quest
TEXT[9] = "Change party members" #
TEXT[10] = "Learn support skills" #
TEXT[11] = "Options" #
TEXT[12] = "Save current progress" #SAVE
TEXT[13] = "Load save data" #LOAD
TEXT[14] = "Quit the game" #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