module AWESOMEGUY
module TITLE
#==============================================================================#
# CONFIGURATION - EDIT HERE #
#==============================================================================#
COMMAND = {
:name => "Controls", # This is the text that will be displayed on the command.
:index => 3, # This is the place where command will be shown, if it's 3, it will show in the 3rd place
}
# The setting of the window
# [x, y, width, height, opacity]
WINDOW = [0, 0, 100, 100, 0 ]
# The picture that should be used as a custom background.
# Set to nil to disable.
CUSTOM_BACKGROUND = "Controls"
#==============================================================================#
# DO NOT EDIT FROM HERE UNLESS I TELL YOU SO (OR YOU KNOW HOW) #
#==============================================================================#
end
end
class Window_TitleCommand < Window_Command
include AWESOMEGUY::TITLE
# By : Sixth
alias add_control_command8632 make_command_list
def make_command_list
add_control_command8632
controlcomm = {
:name => COMMAND[:name], # The name of the command button.
:symbol=> :controls, # The symbol used for the handler.
:enabled => true, # Enable check, can be any method that return true/false.
:ext => nil # Extra data, can be anything, literally.
}
@list.insert(COMMAND[:index] - 1, controlcomm)
end
end
class Scene_Title < Scene_Base
alias :awesomeguy_random_alias_create_command_window_eB2z :create_command_window
def create_command_window
awesomeguy_random_alias_create_command_window_eB2z
@command_window.set_handler

controls, method

command_controls))
end
def command_controls
SceneManager.call(Scene_Controls)
end
end
class Scene_Controls < Scene_MenuBase
include AWESOMEGUY::TITLE
def start
super
create_controls_window
end
def create_controls_window
@controls_window = Window_Controls.new
@controls_window.set_handler

cancel, method

return_scene))
@controls_window.set_handler

ok, method

on_control_ok))
@controls_window.activate
end
def on_control_ok
#==============================================================================#
# CONFIGURATION - READ THE INSTRUCTIONS CAREFULLY #
#==============================================================================#
# This part will handle when you click on an item in your window.
# You must enter your Ruby code here, but if you don't know what,
# feel free to ask.
#==============================================================================#
# STOP EDITING HERE #
#==============================================================================#
end
def create_background
if(CUSTOM_BACKGROUND)
@background_sprite = Sprite.new
@background_sprite.bitmap = Cache.picture(CUSTOM_BACKGROUND)
else super
end
end
# And yeah, @Rikifive, don't worry about the disposal.
# It's automatical.
# Of course, not all Sprites are disposed automatically, but since this scene is
# inheriting from Scene_MenuBase, there is a method that disposes
# @background_sprite. And note it MUST be named @background_sprite.
end
class Window_Controls < Window_Selectable
include AWESOMEGUY::TITLE
def initialize
super(WINDOW[0], WINDOW[1], WINDOW[2], WINDOW[3])
self.opacity = WINDOW[4]
refresh
end
def draw_item(index)
rect = item_rect(index)
#==============================================================================#
# EDITABLE PART - PLEASE FOLLOW THE INSTRUCTIONS GIVEN BELOW #
#==============================================================================#
# do your magic here
# for example to draw text write this:
# draw_text(X, Y, WIDTH, HEIGHT, "ENTER YOUR TEXT HERE")
# or for icon:
# draw_icon(ID, X, Y)
# Change X, Y, WIDTH adn HEIGHT to numbers and set them to your liking.
# EXAMPLE
#change_color(text_color(6))
#draw_text(80, 20, 200, 24, "Action / Interact")
#draw_icon(1, 50, 20) #Here put Z icon
#draw_text(80, 60, 200, 24, "Back / Cancel")
#draw_icon(2, 50, 60) #here put X icon
# PUT STUFF BELOW
# NOTE (from KockaAdmiralac): When using those commands, don't use X and Y like
# direct numbers. Use rect.x and rect.y like this :
# draw_icon(123, rect.x, rect.y)
# draw_text_ex(rect.x, rect.y, "Some text")
#==============================================================================#
# NO MORE EDITING FOR TODAY! #
#==============================================================================#
end
end