#-------------------------------------------------------------------------------
# Menu avec l'or, la localisation et le temp de jeu
#-------------------------------------------------------------------------------
# Pour
https://rpg-maker-vx.bbactif.com/# De Blodangan
#-------------------------------------------------------------------------------
module Blodangan
module Menu_1
# Nom du premier fond dans le dossier ...\Graphics\Titles1
FOND1 = "Night"
# Nom du deuxième fond dans le dossier ...\Graphics\Titles1 pour ne pas
# avoir de deuxième fond ne rien mettre.
FOND2 = "Mountains"
# Mettre une musique ? true = oui, false = non
MUSIQUE = true
# Si oui, nom de la musique dans le dossier ...\Audio\BGM
NOM_MUSIQUE = "Theme4"
end
end
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# ● Draw Actor Exp
#--------------------------------------------------------------------------
def draw_actor_exp(actor, x, y, width = 124)
draw_text(x, y, 30, line_height, "XP")
draw_current_and_max_values(x, y, width, actor.exp, actor.next_level_exp,
normal_color, normal_color)
end
#--------------------------------------------------------------------------
# draw_actor_simple_status
#--------------------------------------------------------------------------
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x, y)
draw_actor_level(actor, x, y + line_height * 1)
draw_actor_icons(actor, x, y + line_height * 2)
draw_actor_hp(actor, x + 120, y + line_height * 1)
draw_actor_mp(actor, x + 120, y + line_height * 2)
draw_actor_exp(actor, x + 120, y)
end
end
#==============================================================================
# Window_Or_Localisation_Temps_Jeu
#==============================================================================
class Window_Or_Localisation_Temps_Jeu < Window_Base
#--------------------------------------------------------------------------
# Initialize
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 384, 105)
self.back_opacity = 0
refresh
end
#--------------------------------------------------------------------------
# Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
aff_or
aff_temps_de_jeu
aff_localisation
end
#--------------------------------------------------------------------------
# Affiche l'or
#--------------------------------------------------------------------------
def aff_or
draw_icon(360, 10, 0)
draw_text_ex(40, 0, "Or :")
draw_currency_value($game_party.gold, Vocab::currency_unit, 70, 0, 120)
end
#--------------------------------------------------------------------------
# Affiche le temps de jeu
#--------------------------------------------------------------------------
def aff_temps_de_jeu
draw_icon(280, 10, 29)
draw_text_ex(40, 29, "Temps de jeu : #{$game_system.playtime_s}")
end
#--------------------------------------------------------------------------
# Affiche la localisation
#--------------------------------------------------------------------------
def aff_localisation
draw_icon(231, 10, 58)
draw_text_ex(40, 58, "Localisation : #{$game_map.display_name}")
end
end
#==============================================================================
# ■ Window_MenuStatus
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● Window Height
#--------------------------------------------------------------------------
def window_height
return 311
end
#--------------------------------------------------------------------------
# ● Item Height
#--------------------------------------------------------------------------
def item_height
(height - standard_padding * 2) / 3
end
end
#==============================================================================
# ■ Scene_Menu
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# ● Start
#--------------------------------------------------------------------------
def start
super
create_fond
create_command_window
create_or_localisation_temps_jeu_window
create_status_window
play_menu_musique
end
#--------------------------------------------------------------------------
# ● Terminate
#--------------------------------------------------------------------------
def terminate
super
dispose_fond
end
#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
def update
super
@or_localisation_temps_jeu_window.refresh
end
#--------------------------------------------------------------------------
# ● Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.x = 384
@command_window.back_opacity = 0
@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(: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 Or Localisation Temps Jeu Window
#--------------------------------------------------------------------------
def create_or_localisation_temps_jeu_window
x = 0
y = 311
@or_localisation_temps_jeu_window = Window_Or_Localisation_Temps_Jeu.new(x,y)
end
#--------------------------------------------------------------------------
# ● Create Status Window
#--------------------------------------------------------------------------
def create_status_window
@status_window = Window_MenuStatus.new(0, 0)
@status_window.back_opacity = 0
end
#--------------------------------------------------------------------------
# ● Create Fond
#--------------------------------------------------------------------------
def create_fond
@fond1 = Sprite.new
@fond1.bitmap = Cache.title1(Blodangan::Menu_1::FOND1)
@fond2 = Sprite.new
@fond2.bitmap = Cache.title2(Blodangan::Menu_1::FOND2)
end
#--------------------------------------------------------------------------
# ● Dispose Fond
#--------------------------------------------------------------------------
def dispose_fond
@fond1.bitmap.dispose
@fond1.dispose
@fond2.bitmap.dispose
@fond2.dispose
end
#--------------------------------------------------------------------------
# ● Play Menu Musique
#--------------------------------------------------------------------------
def play_menu_musique
if Blodangan::Menu_1::MUSIQUE
Audio.bgm_play('Audio/BGM/' + Blodangan::Menu_1::NOM_MUSIQUE, 100, 100, 0)
RPG::BGS.stop
RPG::ME.stop
end
end
end