- VictoriaMembre
- Nombre de messages : 142
Localisation : Royaume de gaia
Distinction : aucune
Date d'inscription : 09/03/2013
(résolu)Ajout de menu
Sam 28 Mar 2015 - 18:18
Bonjour,je possede un script que j'adore et j'adorerais pouvoir le mettre dans le menu ou il y a Objet,Status...
Mais cette option n'est pas incluse dans le script savez vous comment la rajouter
Mais cette option n'est pas incluse dans le script savez vous comment la rajouter
- LyseMembre
- Nombre de messages : 374
Distinction : aucune
Date d'inscription : 03/05/2014
Re: (résolu)Ajout de menu
Sam 28 Mar 2015 - 19:38
Tu parles de quel script ?
Re: (résolu)Ajout de menu
Sam 28 Mar 2015 - 19:42
Salut, le mieux et de mettre le script en question!
Et on pourra t'aider a le faire!
Et on pourra t'aider a le faire!
- VictoriaMembre
- Nombre de messages : 142
Localisation : Royaume de gaia
Distinction : aucune
Date d'inscription : 09/03/2013
Re: (résolu)Ajout de menu
Dim 29 Mar 2015 - 11:30
Voila le script:
#==============================================================================
# ** Soulpour - Reputation System Orpheus
# Author: Soulpour777
# Web URL: infinitytears.wordpress.com
# Credits: Animeflow for the Wallpaper
#------------------------------------------------------------------------------
# Description:
# This script allows you to create a reputation system with a graphical user
# interface.
#------------------------------------------------------------------------------
# Installation:
#------------------------------------------------------------------------------
# Put the script below Materials above Main.
# Make sure that the needed graphics are installed under Systems folder.
# For more information, you can download or use the demo.
#------------------------------------------------------------------------------
# Usage:
# Combining with eventing, you can add or subtract your reputation.
#------------------------------------------------------------------------------
# Script Call:
# To call this script, use this script call:
# SceneManager.call(Soul_Orpheus_Reputation)
#==============================================================================
module Soulpour
module Reputation
REPUTATION_VARIABLE = 1 #=> Variable that holds the Reputation
REPUTATION_MAX = 300 #=> Maximum Amount of Reputation (min.f / max)
REPUTATION_GOOD = "good_notif" #=> Good Reputation Graphic
REPUTATION_NEUTRAL = "neutral_notif" #=> Neutral Reputation Graphic
REPUTATION_BAD = "bad_notif" #=> Bad Reputation Graphic
REPUTATION_WALLPAPER = "reputation_wallpaper" #=> Reputation Wallpaper
REPUTATION_BANNER = "reputation_banner" #=> Reputation Banner Graphic
REPUTATION_PARTICLE = "reputation_particle" #=> Reputation Particle Graphic
GAUGE_HEIGHT = 24 #=> Height Value of the Gauge
WINDOW_OPACITY = 0 #=> Window Opacity
GRAPHICS_HEIGHT = 250
#--------------------------------------------------------------------------
# * Change Width
#--------------------------------------------------------------------------
def self.graphics_width_form
return Graphics.width
end
#--------------------------------------------------------------------------
# * Change Height
#--------------------------------------------------------------------------
def self.graphics_height_form
return Soulpour::Reputation::GRAPHICS_HEIGHT
end
end
end
#==============================================================================
# ** Window_Reputation
#------------------------------------------------------------------------------
# This class performs window reputation processing.
#==============================================================================
class Window_Reputation < Window_Base
#--------------------------------------------------------------------------
# * Reputation Gauge Color
#--------------------------------------------------------------------------
def reputation_gauge_1; text_color(16); end;
def reputation_gauge_2; text_color(9); end;
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, window_height)
refresh
self.opacity = Soulpour::Reputation::WINDOW_OPACITY
self.z = 100
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
Soulpour::Reputation.graphics_width_form
end
#--------------------------------------------------------------------------
# * Window Height
#--------------------------------------------------------------------------
def window_height
Soulpour::Reputation.graphics_height_form
end
#--------------------------------------------------------------------------
# * Draw Reputation Gauge
# rate : Rate (full at 1.0)
# color1 : Left side gradation
# color2 : Right side gradation
#--------------------------------------------------------------------------
def draw_reputation_gauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x, gauge_y, width, Soulpour::Reputation::GAUGE_HEIGHT, gauge_back_color)
contents.gradient_fill_rect(x, gauge_y, fill_w, Soulpour::Reputation::GAUGE_HEIGHT, color1, color2)
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_text_ex(x, 40, "Niveau de Symphatie: " + $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE].to_s + " / " + Soulpour::Reputation::REPUTATION_MAX.to_s)
draw_reputation_gauge(0, 50, 300, $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE].to_f / Soulpour::Reputation::REPUTATION_MAX, reputation_gauge_1, reputation_gauge_2)
end
#--------------------------------------------------------------------------
# * Open Window
#--------------------------------------------------------------------------
def open
refresh
super
end
end
#==============================================================================
# ** Soul_Orpheus_Reputation
#------------------------------------------------------------------------------
# This class performs the Orpheus Reputation Scene processing.
#==============================================================================
class Soul_Orpheus_Reputation < Scene_Base
def start
super
start_reputation_system_window
create_reputation_wallpaper(Soulpour::Reputation::REPUTATION_WALLPAPER)
create_reputation_particle(Soulpour::Reputation::REPUTATION_PARTICLE)
create_reputation_banner_spr(Soulpour::Reputation::REPUTATION_BANNER)
if $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] == 150
create_notification_banner(Soulpour::Reputation::REPUTATION_NEUTRAL)
elsif $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] > 250
create_notification_banner(Soulpour::Reputation::REPUTATION_GOOD)
else
create_notification_banner(Soulpour::Reputation::REPUTATION_BAD)
end
if $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] < 0
$game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] = 0
end
end
#--------------------------------------------------------------------------
# * start_reputation_system_window : new method
#--------------------------------------------------------------------------
def start_reputation_system_window
@reputation_system_window = Window_Reputation.new
end
#--------------------------------------------------------------------------
# * create_reputation_wallpaper : new method
#--------------------------------------------------------------------------
def create_reputation_wallpaper(wallpaper_name)
@reputation_wallpaper = Sprite.new
@reputation_wallpaper.bitmap = Cache.system(wallpaper_name)
end
#--------------------------------------------------------------------------
# * update_reputation_particle : new method
#--------------------------------------------------------------------------
def update_reputation_particle
@reputation_particle.oy -= -1
end
#--------------------------------------------------------------------------
# * dispose_reputation_particle : new method
#--------------------------------------------------------------------------
def dispose_reputation_particle
@reputation_particle.bitmap.dispose
@reputation_particle.dispose
end
#--------------------------------------------------------------------------
# * dispose_reputation_wallpaper : new method
#--------------------------------------------------------------------------
def dispose_reputation_wallpaper
@reputation_wallpaper.bitmap.dispose
@reputation_wallpaper.dispose
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
update_basic
if Input.press?(:B)
Sound.play_cancel
return_scene
end
update_reputation_particle
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
Graphics.freeze
dispose_all_windows
dispose_main_viewport
dispose_reputation_wallpaper
dispose_reputation_particle
dispose_notification_banner
dispose_reputation_banner_spr
end
#--------------------------------------------------------------------------
# * create_reputation_banner_spr : new method
#--------------------------------------------------------------------------
def create_reputation_banner_spr(sprite_name)
@reputation_banner_spr = Sprite.new
@reputation_banner_spr.bitmap = Cache.system(sprite_name)
@reputation_banner_spr.x = 30
@reputation_banner_spr.y = 0
@reputation_banner_spr.z = 110
end
#--------------------------------------------------------------------------
# * dispose_reputation_banner_spr : new method
#--------------------------------------------------------------------------
def dispose_reputation_banner_spr
@reputation_banner_spr.bitmap.dispose
@reputation_banner_spr.dispose
end
#--------------------------------------------------------------------------
# * create_reputation_particle : new method
#--------------------------------------------------------------------------
def create_reputation_particle(particle_name)
@reputation_particle = Plane.new
@reputation_particle.bitmap = Cache.system(particle_name)
@reputation_particle.z = 110
end
#--------------------------------------------------------------------------
# * create_notification_banner : new method
#--------------------------------------------------------------------------
def create_notification_banner(var)
@notif_banner = Plane.new
@notif_banner.bitmap = Cache.system(var)
@notif_banner.z = 110
end
#--------------------------------------------------------------------------
# * dispose_notification_banner : new method
#--------------------------------------------------------------------------
def dispose_notification_banner
@notif_banner.bitmap.dispose
@notif_banner.dispose
end
end
$soulpour_reputation_rgss3 = true
#==============================================================================
# ** Soulpour - Reputation System Orpheus
# Author: Soulpour777
# Web URL: infinitytears.wordpress.com
# Credits: Animeflow for the Wallpaper
#------------------------------------------------------------------------------
# Description:
# This script allows you to create a reputation system with a graphical user
# interface.
#------------------------------------------------------------------------------
# Installation:
#------------------------------------------------------------------------------
# Put the script below Materials above Main.
# Make sure that the needed graphics are installed under Systems folder.
# For more information, you can download or use the demo.
#------------------------------------------------------------------------------
# Usage:
# Combining with eventing, you can add or subtract your reputation.
#------------------------------------------------------------------------------
# Script Call:
# To call this script, use this script call:
# SceneManager.call(Soul_Orpheus_Reputation)
#==============================================================================
module Soulpour
module Reputation
REPUTATION_VARIABLE = 1 #=> Variable that holds the Reputation
REPUTATION_MAX = 300 #=> Maximum Amount of Reputation (min.f / max)
REPUTATION_GOOD = "good_notif" #=> Good Reputation Graphic
REPUTATION_NEUTRAL = "neutral_notif" #=> Neutral Reputation Graphic
REPUTATION_BAD = "bad_notif" #=> Bad Reputation Graphic
REPUTATION_WALLPAPER = "reputation_wallpaper" #=> Reputation Wallpaper
REPUTATION_BANNER = "reputation_banner" #=> Reputation Banner Graphic
REPUTATION_PARTICLE = "reputation_particle" #=> Reputation Particle Graphic
GAUGE_HEIGHT = 24 #=> Height Value of the Gauge
WINDOW_OPACITY = 0 #=> Window Opacity
GRAPHICS_HEIGHT = 250
#--------------------------------------------------------------------------
# * Change Width
#--------------------------------------------------------------------------
def self.graphics_width_form
return Graphics.width
end
#--------------------------------------------------------------------------
# * Change Height
#--------------------------------------------------------------------------
def self.graphics_height_form
return Soulpour::Reputation::GRAPHICS_HEIGHT
end
end
end
#==============================================================================
# ** Window_Reputation
#------------------------------------------------------------------------------
# This class performs window reputation processing.
#==============================================================================
class Window_Reputation < Window_Base
#--------------------------------------------------------------------------
# * Reputation Gauge Color
#--------------------------------------------------------------------------
def reputation_gauge_1; text_color(16); end;
def reputation_gauge_2; text_color(9); end;
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, window_height)
refresh
self.opacity = Soulpour::Reputation::WINDOW_OPACITY
self.z = 100
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
Soulpour::Reputation.graphics_width_form
end
#--------------------------------------------------------------------------
# * Window Height
#--------------------------------------------------------------------------
def window_height
Soulpour::Reputation.graphics_height_form
end
#--------------------------------------------------------------------------
# * Draw Reputation Gauge
# rate : Rate (full at 1.0)
# color1 : Left side gradation
# color2 : Right side gradation
#--------------------------------------------------------------------------
def draw_reputation_gauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x, gauge_y, width, Soulpour::Reputation::GAUGE_HEIGHT, gauge_back_color)
contents.gradient_fill_rect(x, gauge_y, fill_w, Soulpour::Reputation::GAUGE_HEIGHT, color1, color2)
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_text_ex(x, 40, "Niveau de Symphatie: " + $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE].to_s + " / " + Soulpour::Reputation::REPUTATION_MAX.to_s)
draw_reputation_gauge(0, 50, 300, $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE].to_f / Soulpour::Reputation::REPUTATION_MAX, reputation_gauge_1, reputation_gauge_2)
end
#--------------------------------------------------------------------------
# * Open Window
#--------------------------------------------------------------------------
def open
refresh
super
end
end
#==============================================================================
# ** Soul_Orpheus_Reputation
#------------------------------------------------------------------------------
# This class performs the Orpheus Reputation Scene processing.
#==============================================================================
class Soul_Orpheus_Reputation < Scene_Base
def start
super
start_reputation_system_window
create_reputation_wallpaper(Soulpour::Reputation::REPUTATION_WALLPAPER)
create_reputation_particle(Soulpour::Reputation::REPUTATION_PARTICLE)
create_reputation_banner_spr(Soulpour::Reputation::REPUTATION_BANNER)
if $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] == 150
create_notification_banner(Soulpour::Reputation::REPUTATION_NEUTRAL)
elsif $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] > 250
create_notification_banner(Soulpour::Reputation::REPUTATION_GOOD)
else
create_notification_banner(Soulpour::Reputation::REPUTATION_BAD)
end
if $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] < 0
$game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] = 0
end
end
#--------------------------------------------------------------------------
# * start_reputation_system_window : new method
#--------------------------------------------------------------------------
def start_reputation_system_window
@reputation_system_window = Window_Reputation.new
end
#--------------------------------------------------------------------------
# * create_reputation_wallpaper : new method
#--------------------------------------------------------------------------
def create_reputation_wallpaper(wallpaper_name)
@reputation_wallpaper = Sprite.new
@reputation_wallpaper.bitmap = Cache.system(wallpaper_name)
end
#--------------------------------------------------------------------------
# * update_reputation_particle : new method
#--------------------------------------------------------------------------
def update_reputation_particle
@reputation_particle.oy -= -1
end
#--------------------------------------------------------------------------
# * dispose_reputation_particle : new method
#--------------------------------------------------------------------------
def dispose_reputation_particle
@reputation_particle.bitmap.dispose
@reputation_particle.dispose
end
#--------------------------------------------------------------------------
# * dispose_reputation_wallpaper : new method
#--------------------------------------------------------------------------
def dispose_reputation_wallpaper
@reputation_wallpaper.bitmap.dispose
@reputation_wallpaper.dispose
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
update_basic
if Input.press?(:B)
Sound.play_cancel
return_scene
end
update_reputation_particle
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
Graphics.freeze
dispose_all_windows
dispose_main_viewport
dispose_reputation_wallpaper
dispose_reputation_particle
dispose_notification_banner
dispose_reputation_banner_spr
end
#--------------------------------------------------------------------------
# * create_reputation_banner_spr : new method
#--------------------------------------------------------------------------
def create_reputation_banner_spr(sprite_name)
@reputation_banner_spr = Sprite.new
@reputation_banner_spr.bitmap = Cache.system(sprite_name)
@reputation_banner_spr.x = 30
@reputation_banner_spr.y = 0
@reputation_banner_spr.z = 110
end
#--------------------------------------------------------------------------
# * dispose_reputation_banner_spr : new method
#--------------------------------------------------------------------------
def dispose_reputation_banner_spr
@reputation_banner_spr.bitmap.dispose
@reputation_banner_spr.dispose
end
#--------------------------------------------------------------------------
# * create_reputation_particle : new method
#--------------------------------------------------------------------------
def create_reputation_particle(particle_name)
@reputation_particle = Plane.new
@reputation_particle.bitmap = Cache.system(particle_name)
@reputation_particle.z = 110
end
#--------------------------------------------------------------------------
# * create_notification_banner : new method
#--------------------------------------------------------------------------
def create_notification_banner(var)
@notif_banner = Plane.new
@notif_banner.bitmap = Cache.system(var)
@notif_banner.z = 110
end
#--------------------------------------------------------------------------
# * dispose_notification_banner : new method
#--------------------------------------------------------------------------
def dispose_notification_banner
@notif_banner.bitmap.dispose
@notif_banner.dispose
end
end
$soulpour_reputation_rgss3 = true
Re: (résolu)Ajout de menu
Dim 29 Mar 2015 - 13:46
- Code:
#==============================================================================
# ** Soulpour - Reputation System Orpheus
# Author: Soulpour777
# Web URL: infinitytears.wordpress.com
# Credits: Animeflow for the Wallpaper
#------------------------------------------------------------------------------
# Description:
# This script allows you to create a reputation system with a graphical user
# interface.
#------------------------------------------------------------------------------
# Installation:
#------------------------------------------------------------------------------
# Put the script below Materials above Main.
# Make sure that the needed graphics are installed under Systems folder.
# For more information, you can download or use the demo.
#------------------------------------------------------------------------------
# Usage:
# Combining with eventing, you can add or subtract your reputation.
#------------------------------------------------------------------------------
# Script Call:
# To call this script, use this script call:
# SceneManager.call(Soul_Orpheus_Reputation)
#==============================================================================
module Soulpour
module Reputation
REPUTATION_VARIABLE = 1 #=> Variable that holds the Reputation
REPUTATION_MAX = 300 #=> Maximum Amount of Reputation (min.f / max)
REPUTATION_GOOD = "good_notif" #=> Good Reputation Graphic
REPUTATION_NEUTRAL = "neutral_notif" #=> Neutral Reputation Graphic
REPUTATION_BAD = "bad_notif" #=> Bad Reputation Graphic
REPUTATION_WALLPAPER = "reputation_wallpaper" #=> Reputation Wallpaper
REPUTATION_BANNER = "reputation_banner" #=> Reputation Banner Graphic
REPUTATION_PARTICLE = "reputation_particle" #=> Reputation Particle Graphic
GAUGE_HEIGHT = 24 #=> Height Value of the Gauge
WINDOW_OPACITY = 0 #=> Window Opacity
GRAPHICS_HEIGHT = 250
ADD_MENU = true
MENU_NAME = "Réputation"
#--------------------------------------------------------------------------
# * Change Width
#--------------------------------------------------------------------------
def self.graphics_width_form
return Graphics.width
end
#--------------------------------------------------------------------------
# * Change Height
#--------------------------------------------------------------------------
def self.graphics_height_form
return Soulpour::Reputation::GRAPHICS_HEIGHT
end
end
end
#==============================================================================
# ** Window_Reputation
#------------------------------------------------------------------------------
# This class performs window reputation processing.
#==============================================================================
class Window_Reputation < Window_Base
#--------------------------------------------------------------------------
# * Reputation Gauge Color
#--------------------------------------------------------------------------
def reputation_gauge_1; text_color(16); end;
def reputation_gauge_2; text_color(9); end;
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, window_height)
refresh
self.opacity = Soulpour::Reputation::WINDOW_OPACITY
self.z = 100
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
Soulpour::Reputation.graphics_width_form
end
#--------------------------------------------------------------------------
# * Window Height
#--------------------------------------------------------------------------
def window_height
Soulpour::Reputation.graphics_height_form
end
#--------------------------------------------------------------------------
# * Draw Reputation Gauge
# rate : Rate (full at 1.0)
# color1 : Left side gradation
# color2 : Right side gradation
#--------------------------------------------------------------------------
def draw_reputation_gauge(x, y, width, rate, color1, color2)
fill_w = (width * rate).to_i
gauge_y = y + line_height - 8
contents.fill_rect(x, gauge_y, width, Soulpour::Reputation::GAUGE_HEIGHT, gauge_back_color)
contents.gradient_fill_rect(x, gauge_y, fill_w, Soulpour::Reputation::GAUGE_HEIGHT, color1, color2)
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_text_ex(x, 40, "Niveau de Symphatie: " + $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE].to_s + " / " + Soulpour::Reputation::REPUTATION_MAX.to_s)
draw_reputation_gauge(0, 50, 300, $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE].to_f / Soulpour::Reputation::REPUTATION_MAX, reputation_gauge_1, reputation_gauge_2)
end
#--------------------------------------------------------------------------
# * Open Window
#--------------------------------------------------------------------------
def open
refresh
super
end
end
#==============================================================================
# ** Soul_Orpheus_Reputation
#------------------------------------------------------------------------------
# This class performs the Orpheus Reputation Scene processing.
#==============================================================================
class Soul_Orpheus_Reputation < Scene_Base
def start
super
start_reputation_system_window
create_reputation_wallpaper(Soulpour::Reputation::REPUTATION_WALLPAPER)
create_reputation_particle(Soulpour::Reputation::REPUTATION_PARTICLE)
create_reputation_banner_spr(Soulpour::Reputation::REPUTATION_BANNER)
if $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] == 150
create_notification_banner(Soulpour::Reputation::REPUTATION_NEUTRAL)
elsif $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] > 250
create_notification_banner(Soulpour::Reputation::REPUTATION_GOOD)
else
create_notification_banner(Soulpour::Reputation::REPUTATION_BAD)
end
if $game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] < 0
$game_variables[Soulpour::Reputation::REPUTATION_VARIABLE] = 0
end
end
#--------------------------------------------------------------------------
# * start_reputation_system_window : new method
#--------------------------------------------------------------------------
def start_reputation_system_window
@reputation_system_window = Window_Reputation.new
end
#--------------------------------------------------------------------------
# * create_reputation_wallpaper : new method
#--------------------------------------------------------------------------
def create_reputation_wallpaper(wallpaper_name)
@reputation_wallpaper = Sprite.new
@reputation_wallpaper.bitmap = Cache.system(wallpaper_name)
end
#--------------------------------------------------------------------------
# * update_reputation_particle : new method
#--------------------------------------------------------------------------
def update_reputation_particle
@reputation_particle.oy -= -1
end
#--------------------------------------------------------------------------
# * dispose_reputation_particle : new method
#--------------------------------------------------------------------------
def dispose_reputation_particle
@reputation_particle.bitmap.dispose
@reputation_particle.dispose
end
#--------------------------------------------------------------------------
# * dispose_reputation_wallpaper : new method
#--------------------------------------------------------------------------
def dispose_reputation_wallpaper
@reputation_wallpaper.bitmap.dispose
@reputation_wallpaper.dispose
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
update_basic
if Input.press?(:B)
Sound.play_cancel
return_scene
end
update_reputation_particle
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
Graphics.freeze
dispose_all_windows
dispose_main_viewport
dispose_reputation_wallpaper
dispose_reputation_particle
dispose_notification_banner
dispose_reputation_banner_spr
end
#--------------------------------------------------------------------------
# * create_reputation_banner_spr : new method
#--------------------------------------------------------------------------
def create_reputation_banner_spr(sprite_name)
@reputation_banner_spr = Sprite.new
@reputation_banner_spr.bitmap = Cache.system(sprite_name)
@reputation_banner_spr.x = 30
@reputation_banner_spr.y = 0
@reputation_banner_spr.z = 110
end
#--------------------------------------------------------------------------
# * dispose_reputation_banner_spr : new method
#--------------------------------------------------------------------------
def dispose_reputation_banner_spr
@reputation_banner_spr.bitmap.dispose
@reputation_banner_spr.dispose
end
#--------------------------------------------------------------------------
# * create_reputation_particle : new method
#--------------------------------------------------------------------------
def create_reputation_particle(particle_name)
@reputation_particle = Plane.new
@reputation_particle.bitmap = Cache.system(particle_name)
@reputation_particle.z = 110
end
#--------------------------------------------------------------------------
# * create_notification_banner : new method
#--------------------------------------------------------------------------
def create_notification_banner(var)
@notif_banner = Plane.new
@notif_banner.bitmap = Cache.system(var)
@notif_banner.z = 110
end
#--------------------------------------------------------------------------
# * dispose_notification_banner : new method
#--------------------------------------------------------------------------
def dispose_notification_banner
@notif_banner.bitmap.dispose
@notif_banner.dispose
end
end
#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
# This command window appears on the menu screen.
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# * Initialize Command Selection Position (Class Method)
#--------------------------------------------------------------------------
def self.init_command_position
@@last_command_symbol = nil
end
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0)
select_last
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Get Number of Lines to Show
#--------------------------------------------------------------------------
def visible_line_number
item_max
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_main_commands
add_formation_command
add_original_commands
add_save_command
add_game_end_command
end
#--------------------------------------------------------------------------
# * Add Main Commands to List
#--------------------------------------------------------------------------
def add_main_commands
add_command(Vocab::item, :item, main_commands_enabled)
add_command(Vocab::skill, :skill, main_commands_enabled)
add_command(Vocab::equip, :equip, main_commands_enabled)
add_command(Vocab::status, :status, main_commands_enabled)
add_command(Soulpour::Reputation::MENU_NAME, :reput, main_commands_enabled) if Soulpour::Reputation::ADD_MENU == true
end
#--------------------------------------------------------------------------
# * Add Formation to Command List
#--------------------------------------------------------------------------
def add_formation_command
add_command(Vocab::formation, :formation, formation_enabled)
end
#--------------------------------------------------------------------------
# * For Adding Original Commands
#--------------------------------------------------------------------------
def add_original_commands
end
#--------------------------------------------------------------------------
# * Add Save to Command List
#--------------------------------------------------------------------------
def add_save_command
add_command(Vocab::save, :save, save_enabled)
end
#--------------------------------------------------------------------------
# * Add Exit Game to Command List
#--------------------------------------------------------------------------
def add_game_end_command
add_command(Vocab::game_end, :game_end)
end
#--------------------------------------------------------------------------
# * Get Activation State of Main Commands
#--------------------------------------------------------------------------
def main_commands_enabled
$game_party.exists
end
#--------------------------------------------------------------------------
# * Get Activation State of Formation
#--------------------------------------------------------------------------
def formation_enabled
$game_party.members.size >= 2 && !$game_system.formation_disabled
end
#--------------------------------------------------------------------------
# * Get Activation State of Save
#--------------------------------------------------------------------------
def save_enabled
!$game_system.save_disabled
end
#--------------------------------------------------------------------------
# * Processing When OK Button Is Pressed
#--------------------------------------------------------------------------
def process_ok
@@last_command_symbol = current_symbol
super
end
#--------------------------------------------------------------------------
# * Restore Previous Selection Position
#--------------------------------------------------------------------------
def select_last
select_symbol(@@last_command_symbol)
end
end
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_command_window
create_gold_window
create_status_window
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.set_handler(:item, method(:command_item))
@command_window.set_handler(:skill, method(:command_personal))
@command_window.set_handler(:equip, method(:command_personal))
@command_window.set_handler(:status, method(:command_personal))
@command_window.set_handler(:reput, method(:command_reput)) if Soulpour::Reputation::ADD_MENU == true
@command_window.set_handler(:formation, method(:command_formation))
@command_window.set_handler(:save, method(:command_save))
@command_window.set_handler(:game_end, method(:command_game_end))
@command_window.set_handler(:cancel, method(:return_scene))
end
#--------------------------------------------------------------------------
# * Create Gold Window
#--------------------------------------------------------------------------
def create_gold_window
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = Graphics.height - @gold_window.height
end
#--------------------------------------------------------------------------
# * Create Status Window
#--------------------------------------------------------------------------
def create_status_window
@status_window = Window_MenuStatus.new(@command_window.width, 0)
end
#--------------------------------------------------------------------------
# * [Reputation] Command
#--------------------------------------------------------------------------
def command_reput
SceneManager.call(Soul_Orpheus_Reputation)
end
#--------------------------------------------------------------------------
# * [Item] Command
#--------------------------------------------------------------------------
def command_item
SceneManager.call(Scene_Item)
end
#--------------------------------------------------------------------------
# * [Skill], [Equipment] and [Status] Commands
#--------------------------------------------------------------------------
def command_personal
@status_window.select_last
@status_window.activate
@status_window.set_handler(:ok, method(:on_personal_ok))
@status_window.set_handler(:cancel, method(:on_personal_cancel))
end
#--------------------------------------------------------------------------
# * [Formation] Command
#--------------------------------------------------------------------------
def command_formation
@status_window.select_last
@status_window.activate
@status_window.set_handler(:ok, method(:on_formation_ok))
@status_window.set_handler(:cancel, method(:on_formation_cancel))
end
#--------------------------------------------------------------------------
# * [Save] Command
#--------------------------------------------------------------------------
def command_save
SceneManager.call(Scene_Save)
end
#--------------------------------------------------------------------------
# * [Exit Game] Command
#--------------------------------------------------------------------------
def command_game_end
SceneManager.call(Scene_End)
end
#--------------------------------------------------------------------------
# * [OK] Personal Command
#--------------------------------------------------------------------------
def on_personal_ok
case @command_window.current_symbol
when :skill
SceneManager.call(Scene_Skill)
when :equip
SceneManager.call(Scene_Equip)
when :status
SceneManager.call(Scene_Status)
end
end
#--------------------------------------------------------------------------
# * [Cancel] Personal Command
#--------------------------------------------------------------------------
def on_personal_cancel
@status_window.unselect
@command_window.activate
end
#--------------------------------------------------------------------------
# * Formation [OK]
#--------------------------------------------------------------------------
def on_formation_ok
if @status_window.pending_index >= 0
$game_party.swap_order(@status_window.index,
@status_window.pending_index)
@status_window.pending_index = -1
@status_window.redraw_item(@status_window.index)
else
@status_window.pending_index = @status_window.index
end
@status_window.activate
end
#--------------------------------------------------------------------------
# * Formation [Cancel]
#--------------------------------------------------------------------------
def on_formation_cancel
if @status_window.pending_index >= 0
@status_window.pending_index = -1
@status_window.activate
else
@status_window.unselect
@command_window.activate
end
end
end
$soulpour_reputation_rgss3 = true
Si ta un problème ou autres, n'hésite pas a le dire!
PS: Met le script dans la Balise CODE, ça fait plus propre!
- VictoriaMembre
- Nombre de messages : 142
Localisation : Royaume de gaia
Distinction : aucune
Date d'inscription : 09/03/2013
Re: (résolu)Ajout de menu
Sam 4 Avr 2015 - 11:07
Merci,beaucoup
- SpytjeAdministrateur
- Nombre de messages : 5935
Localisation : La terre
Distinction : Spiraliste [Korn']
Forestia : Projet du mois juillet 2014
Papy Pulkigrat [Yama']
Date d'inscription : 16/03/2008
Re: (résolu)Ajout de menu
Sam 4 Avr 2015 - 21:53
Problème résolu ?
Re: (résolu)Ajout de menu
Dim 5 Avr 2015 - 7:39
De rien, n'oublie pas de mettre en résolu.Victoria a écrit:Merci,beaucoup
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|