The Sleeping Leonhart
Member
Universal Customizable Menu
Version: 1.9
Introduction
The script allow the user to create is personal menu.
Features
Screenshots
Demo
Is Customizable!:D
Script
UCM_Menu (too big so i put in a txt file)
http://www.savefile.com/files/1631467
Version: 1.9
Introduction
The script allow the user to create is personal menu.
Features
- Possibility to create a Menu with pictures
- Windows animtion In and Out
- Enable disable the windows animation
- You can show the map in background
- Setup the windows position, opacity and animation direction
- You can hide a window
- 3 different status window
- You can set the command horizzontally or vertically
- You can show the face of hero instead the character
- You can add/remove command
- You can show the icons in command window
- Game Progress Window
- Killed Monster Window
- You can resize some windows
- You can change the font size for some windows
- You can add an icon for some windows
- You can play BGM during the menu visualization
- You can choose different windowskin for each window
- You can choose the color for the progress bar
- You can change the size of the status window based on the curent number of member in party
Screenshots
http://img262.imageshack.us/img262/520/ucm19fd3.png[/img]
Example of the menu in his standard configuration
Example of the menu in his standard configuration
Is Customizable!:D
Script
Code:
#==============================================================================
# ** Universal Customizable Menu
#==============================================================================
# The Sleeping Leonhart
# Version 1.9
# 22.1.08
#==============================================================================
# With this script you can customize your main menu.
# Feature:
# * Possibility to create a Menu with pictures(when the picture is active the opacity of the window is automatically setted to 0, picture must be placed in Pictures/Menu)
# * Windows animation In and Out
# * Enable disable the windows animation
# * Setup the windows position, opacity and animation direction
# * You can hide a window
# * You can show the map in background
# * 3 different status window
# * You can set the command horizzontally or vertically
# * You can show the face of hero instead the character (The face go in Characters/Face and name the picture like the character)
# * You can add/remove command
# * You can show the icons in command window (the icons must have the same name of the command)
# * Game Progress Window (To change the game progress: $game_system.progress += value)
# * Killed Monster Window
# * You can resize some windows
# * You can change the font size for some windows
# * You can add an icon for some windows
# * You can play a BGM during the visualization of the menu
# * You can choose the windowskin for each window
# * You can choose the color for the progress bar
# * You can change the size of the status window based on the curent number of member in party
#==============================================================================
# Configuration
#==============================================================================
BG_MAP = true #make the map visible on the background
BG_PICTURE = "" #the name of the background picture
STATUS_PICTURE = "" #the name of the status picture
STEP_PICTURE = "" #the name of the steps picture
LOCATION_PICTURE = "" #the name of the location picture
GOLD_PICTURE = "" #the name of the gold picture
TIME_PICTURE = "" #the name of the steps picture
PROGRESS_PICTURE = "" #the name of the progress picture
KILLED_PICTURE = "" #the name of the killed monster picture
COMMAND_PICTURE = "" #the name of the command picture
COMMAND_ITEM = "Item" #the name of the command item
COMMAND_SKILL = "Skill" #the name of the command skill
COMMAND_EQUIP = "Equip." #the name of the command equipment
COMMAND_STATUS = "Status" #the name of the command status
COMMAND_SAVE = "Save" #the name of the command save
COMMAND_EXIT = "Exit" #the name of the command exit
GOLD_ICON = "" #the name of the gold icon
STEP_ICON = "" #the name of the step icon
TIME_ICON = "" #the name of the time icon
PROGRESS_ICON = "" #the name of the progress icon
KILLED_ICON = "" #the name of the killed monster icon
ANIMATION = true #enable the window animation
ICON = false #enable the icon in the command window
#Syntax: MENU_BGM = [name of the bgm, volume, pitch]
MENU_BGM = ["007-Boss03", 75, 100] #Change the music played during the menu
#Syntax: PROGRESS_BAR_etc.. = Color.new(red, green, blue[, alpha]), alpha is optional
PROGRESS_BAR_COLOR_1 = Color.new(255, 0, 0, 255) #Set the first color for the progress bar
PROGRESS_BAR_COLOR_2 = Color.new(125, 0, 0, 255) #Set the second color for the progress bar
PROGRESS_BAR_FILLED_COLOR_2 = Color.new(0, 125, 125, 255) #Set the second color for the progress bar when it's full
PROGRESS_BAR_FILLED_COLOR_1 = Color.new(0, 255, 255, 255) #Set the first color for the progress bar when it's full
STATUS_WINDOW_PARTY_DEPENDENCY = true #if true the status window 1 & 2 height are adapted to the party size
STATUS_WINDOW_MAX_PARTY = 3 #number of max member in party, this is used to adapt the height of the status window 1 & 2
#if the STATUS_WINDOW_PARTY_DEPENDENCY is true this option is not used
#===============================================================================
# Window Setup
#===============================================================================
# COMMAND_WINDOW Syntax: [Type of command Window, x, y, opacity, animation, windowskin]
# LOCATION_WINDOW, STEP_WINDOW, GOLD_WINDOW, TIME_WINDOW Syntax: [Visible?, x, y, opacity, animation, width, height, fontsize, windowskin]
# STATUS_WINDOW Syntax: [Type of status Window, x, y, opacity, graphic, animation, windowskin]
#-------------------------------------------------------------------------------
# Type of command Window = Set the Command Window in "Horizzontal" or "Vertical"
# Visible? = set to true if the window is visible
# x = Set the x position of the window
# y = Set the y position of the window
# opacity = Set the opacity of the window
# animation = Set the anmation side. "Down", "Up", "Left" or "Right"
# Type of status Window = Choose the type of the status window
# graphic = choose if show the face or the charcter in the status menu
# width = set the width of the window
# height = set the height of the window
# fontsize = set the font size for the text in that window
# windowskin = name of the windoskin for that window
#==============================================================================
COMMAND_WINDOW = ["Horizzontal", 0, 0, 160, "Right", "001-Blue01"]
STEP_WINDOW = [true, 0, 320-32, 160, "Up", 160, 96, 24, "001-Blue01"]
LOCATION_WINDOW = [true, 160, 480-96, 160, "Left", 480, 96, 24, "001-Blue01"]
GOLD_WINDOW = [true, 0, 64, 160, "Left", 160, 64, 24, "001-Blue01"]
TIME_WINDOW = [true, 0, 128, 160, "Up", 160, 96, 24, "001-Blue01"]
PROGRESS_WINDOW = [true, 0, 128+96, 160, "Up", 160, 64, 24, "001-Blue01"]
KILLED_WINDOW = [true, 0, 480-96, 160, "Up", 160, 96, 24, "001-Blue01"]
STATUS_WINDOW = [2, 160, 64, 160, "Character", "Down", "001-Blue01"]
COMMAND_SETUP = [COMMAND_ITEM, COMMAND_SKILL, COMMAND_EQUIP, COMMAND_STATUS,COMMAND_SAVE, COMMAND_EXIT]
Code:
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
class Window_Base < Window
def draw_actor_face(actor, x, y)
bitmap = RPG::Cache.character("Face/"+actor.character_name, actor.character_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
def draw_actor_battler(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y, bitmap, src_rect)
end
def draw_actor_battler_trunc(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0+cw/8, 0, 80, ch)
self.contents.blt(x, y, bitmap, src_rect)
end
def draw_actor_exps(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 28, 32, "Exp")
self.contents.font.color = normal_color
if actor.now_exp != 0
text = (actor.now_exp.to_f / actor.next_exp.to_f)*100.00
text = text.round
else
text = 0
end
self.contents.draw_text(x + 40, y, 84, 32, text.to_s+"%")
end
def draw_actor_parameter(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = $data_system.words.mdef
parameter_value = actor.mdef
when 3
parameter_name = $data_system.words.str
parameter_value = actor.str
when 4
parameter_name = $data_system.words.dex
parameter_value = actor.dex
when 5
parameter_name = $data_system.words.agi
parameter_value = actor.agi
when 6
parameter_name = $data_system.words.int
parameter_value = actor.int
when 7
parameter_name = "Evasion"
parameter_value = actor.eva
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 88, y, 36, 32, parameter_value.to_s, 2)
end
end
class Window_Selectable < Window_Base
def command(index = self.index)
return @commands[index]
end
def commands=(commands)
return if @commands == commands
@commands = commands
item_max = @item_max
@item_max = @commands.size
@column_max = @item_max
unless item_max == @item_max
unless self.contents.nil?
self.contents.dispose
self.contents = nil
end
self.contents = Bitmap.new(@item_max * (width - 32), height - 32)
end
refresh
end
end
class Window_MenuCommandVert < Window_Selectable
def initialize
super(0, 0, 160, COMMAND_SETUP.size * 32 + 32)
@item_max = COMMAND_SETUP.size
@commands = COMMAND_SETUP
self.contents = Bitmap.new(width - 32, @item_max * 32)
if COMMAND_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + COMMAND_PICTURE)
@picture.x = 480
@picture.y = 640
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = COMMAND_WINDOW[3]
end
refresh
self.index = 0
end
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
alias tslums_menucmdv_update update
def update
if COMMAND_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_menucmdv_update
end
def draw_item(index, color)
self.contents.font.color = color
if ICON
rect = Rect.new(24, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(18, 0, 0, 0))
bitmap = RPG::Cache.icon(COMMAND_SETUP[index])
self.contents.blt(0, 32*index, bitmap, Rect.new(0, 0, 24, 24))
else
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
end
self.contents.draw_text(rect, @commands[index])
end
def disable_item(index)
draw_item(index, disabled_color)
end
end
class Window_MenuCommandHoriz < Window_Selectable
def initialize
if COMMAND_SETUP.size > 6
super(COMMAND_WINDOW[1], COMMAND_WINDOW[2], 640, 96)
else
super(COMMAND_WINDOW[1], COMMAND_WINDOW[2], 640, 64)
end
self.contents = Bitmap.new(width - 32, height - 32)
@item_max = COMMAND_SETUP.size
if COMMAND_SETUP.size > 6
@column_max = 6
@row_max = 2
else
@column_max = COMMAND_SETUP.size
@row_max = 1
end
@commands = COMMAND_SETUP
@c_spacing = (640 - 32)
if COMMAND_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + COMMAND_PICTURE)
@picture.x = 480
@picture.y = 640
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = COMMAND_WINDOW[3]
end
refresh
self.index = 0
end
alias tslums_menucmd_update update
def update
if COMMAND_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_menucmd_update
end
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, system_color)
end
end
def draw_item(index, color)
cursor_width = self.width / @column_max - 32
x = 4 + index % @column_max * (cursor_width + 32)
y = index / @column_max * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
if ICON
bitmap = RPG::Cache.icon(COMMAND_SETUP[index])
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text(16+x, y, cursor_width, 32, @commands[index], 0)
else
self.contents.draw_text(x, y, cursor_width, 32, @commands[index], 0)
end
end
def disable_item(index)
draw_item(index, disabled_color)
end
end
class Window_Steps < Window_Base
def initialize
super(STEP_WINDOW[1], STEP_WINDOW[2], STEP_WINDOW[5], STEP_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = STEP_WINDOW[7]
if STEP_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + STEP_PICTURE)
@picture.x = 640
@picture.y = 480
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = STEP_WINDOW[3]
end
refresh
if STEP_ICON != ""
bitmap = RPG::Cache.icon(STEP_ICON)
self.contents.blt(0, STEP_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24))
end
end
alias tslums_step_update update
def update
if STEP_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_step_update
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, STEP_WINDOW[5]-40, 32, "Step Count")
self.contents.font.color = normal_color
self.contents.draw_text(4, STEP_WINDOW[7], STEP_WINDOW[5]-40, 32, $game_party.steps.to_s, 2)
end
end
class Game_Map
def name
$map_infos[@map_id]
end
end
class Scene_Title
$map_infos = load_data("Data/MapInfos.rxdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end
class Window_Location < Window_Base
def initialize
super(LOCATION_WINDOW[1], LOCATION_WINDOW[2], LOCATION_WINDOW[5], LOCATION_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = LOCATION_WINDOW[7]
if LOCATION_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + LOCATION_PICTURE)
@picture.x = 640
@picture.y = 480
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = LOCATION_WINDOW[3]
end
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(0 , 0, LOCATION_WINDOW[5], 32, "Location")
self.contents.font.color = normal_color
self.contents.draw_text(0 , LOCATION_WINDOW[7], LOCATION_WINDOW[5], 32, $game_map.name)
end
alias tslums_loc_update update
def update
if LOCATION_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_loc_update
end
end
class Window_Gold < Window_Base
def initialize
super(GOLD_WINDOW[1], GOLD_WINDOW[2], GOLD_WINDOW[5], GOLD_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = GOLD_WINDOW[7]
if GOLD_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = Bitmap.new("Graphics/Pictures/Menu/" + GOLD_PICTURE)
@picture.x = 640
@picture.y = 480
@picture.bitmap.hue_change($game_system.skin_hue.to_i)
self.opacity = 0
else
self.opacity = GOLD_WINDOW[3]
end
refresh
if GOLD_ICON != ""
bitmap = RPG::Cache.icon(GOLD_ICON)
self.contents.blt(0, 0 + 4, bitmap, Rect.new(0, 0, 24, 24))
end
end
alias tslums_gold_update update
def update
if GOLD_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_gold_update
end
end
class Window_PlayTime < Window_Base
def initialize
super(TIME_WINDOW[1], TIME_WINDOW[2], TIME_WINDOW[5], TIME_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = TIME_WINDOW[7]
if TIME_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + TIME_PICTURE)
@picture.x = 480
@picture.y = 640
@picture.bitmap.hue_change($game_system.skin_hue)
self.opacity = 0
else
self.opacity = TIME_WINDOW[3]
end
refresh
if TIME_ICON != ""
bitmap = RPG::Cache.icon(TIME_ICON)
self.contents.blt(0, TIME_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24))
end
end
alias tslums_time_update update
def update
if TIME_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_time_update
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, TIME_WINDOW[5]-40, 32, "Play Time")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, TIME_WINDOW[7], TIME_WINDOW[5]-40, 32, text, 2)
end
end
class Window_MenuStatus < Window_Selectable
def initialize
super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 96*STATUS_WINDOW_MAX_PARTY+32)
if STATUS_WINDOW_PARTY_DEPENDENCY
self.height = 96*$game_party.actors.size+32
end
self.contents = Bitmap.new(width - 32, height - 32)
if STATUS_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE)
@picture.x = 640
@picture.y = 480
self.opacity = 0
else
self.opacity = STATUS_WINDOW[3]
end
refresh
self.active = false
self.index = -1
end
alias tslums_stat_update update
def update
if STATUS_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_stat_update
end
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 96
actor = $game_party.actors[i]
if STATUS_WINDOW[4] == "Character"
draw_actor_graphic(actor, x - 40, y + 80)
elsif STATUS_WINDOW[4] == "Face"
draw_actor_face(actor, x-20, y + 80)
end
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 144, y)
draw_actor_level(actor, x, y + 32)
draw_actor_state(actor, x + 90, y + 32)
draw_actor_exp(actor, x, y + 64)
draw_actor_hp(actor, x + 236, y + 32)
draw_actor_sp(actor, x + 236, y + 64)
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 96, self.width - 32, 96)
end
end
end
class Window_MenuStatus2 < Window_Selectable
def initialize
super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 96*STATUS_WINDOW_MAX_PARTY+32)
if STATUS_WINDOW_PARTY_DEPENDENCY
self.height = 96*$game_party.actors.size+32
end
self.contents = Bitmap.new(width - 32, height - 32)
if STATUS_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE)
@picture.x = 640
@picture.y = 480
self.opacity = 0
else
self.opacity = STATUS_WINDOW[3]
end
refresh
self.active = false
self.index = -1
end
alias tslums_stat2_update update
def update
if STATUS_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
tslums_stat2_update
end
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 96
actor = $game_party.actors[i]
if STATUS_WINDOW[4] == "Character"
draw_actor_graphic(actor, x - 40, y + 80)
elsif STATUS_WINDOW[4] == "Face"
draw_actor_face(actor, x-10, y + 80)
end
self.contents.font.size = 18
draw_actor_name(actor, x, y)
draw_actor_hp(actor, x + 92, y)
draw_actor_sp(actor, x + 236, y)
draw_actor_state(actor, x, y + 18)
draw_actor_level(actor, x, y + 36)
draw_actor_exps(actor, x, y + 54)
draw_actor_parameter(actor, x + 92, y + 16, 0)
draw_actor_parameter(actor, x + 92, y + 32, 1)
draw_actor_parameter(actor, x + 92, y + 48, 2)
draw_actor_parameter(actor, x + 92, y + 64, 6)
draw_actor_parameter(actor, x + 236, y + 16, 3)
draw_actor_parameter(actor, x + 236, y + 32, 4)
draw_actor_parameter(actor, x + 236, y + 48, 5)
draw_actor_parameter(actor, x + 236, y + 64, 7)
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 96, self.width - 32, 96)
end
end
end
class Window_MenuStatus3 < Window_Selectable
def initialize
super(STATUS_WINDOW[1], STATUS_WINDOW[2], 480, 416)
if STATUS_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + STATUS_PICTURE)
@picture.x = 640
@picture.y = 480
self.opacity = 0
else
self.opacity = STATUS_WINDOW[3]
end
@column_max = 1
refresh
self.index = -1
end
alias tslums_stat2_update update
def update
if STATUS_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
if self.index == -1
self.oy = 0
else
self.oy = self.index*416
end
tslums_stat2_update
end
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@item_max = $game_party.actors.size
if @item_max > 0
self.contents = Bitmap.new(448, 416*@item_max)
for i in 0...@item_max
y = i * 416
actor = $game_party.actors[i]
if STATUS_WINDOW[4] == "Character"
draw_actor_graphic(actor, x - 40, y + 80)
elsif STATUS_WINDOW[4] == "Face"
draw_actor_face(actor, x-80, y+80)
end
draw_actor_name(actor, 4, y + 0)
draw_actor_class(actor, 4 + 144, y + 0)
draw_actor_level(actor, 0, y + 32)
draw_actor_state(actor, 0, y + 64)
draw_actor_hp(actor, 0 + 144, y + 32, 172)
draw_actor_sp(actor, 0 + 144, y + 64, 172)
draw_actor_parameter(actor, 0, y + 160, 0)
draw_actor_parameter(actor, 0, y + 192, 1)
draw_actor_parameter(actor, 0, y + 224, 2)
draw_actor_parameter(actor, 0, y + 256, 3)
draw_actor_parameter(actor, 0, y + 288, 4)
draw_actor_parameter(actor, 0, y + 320, 5)
draw_actor_parameter(actor, 0, y + 352, 6)
self.contents.font.color = system_color
self.contents.draw_text(0, y + 96, 80, 32, "EXP")
self.contents.draw_text(144, y + 96, 80, 32, "NEXT")
self.contents.font.color = normal_color
self.contents.draw_text(0 + 60, y + 96, 84, 32, actor.exp_s, 2)
self.contents.draw_text(144 + 60, y + 96, 84, 32, actor.next_rest_exp_s, 2)
self.contents.font.color = system_color
self.contents.draw_text(192, y + 160, 96, 32, "Equipment")
draw_item_name($data_weapons[actor.weapon_id], 192 + 16, y + 208)
draw_item_name($data_armors[actor.armor1_id], 192 + 16, y + 256)
draw_item_name($data_armors[actor.armor2_id], 192 + 16, y + 304)
draw_item_name($data_armors[actor.armor3_id], 192 + 16, y + 352)
draw_item_name($data_armors[actor.armor4_id], 192 + 16, y + 400)
end
end
end
def update_cursor_rect
self.cursor_rect.empty
end
end
class Window_Base < Window
def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
end
class Game_System
alias squall_leonhart_game_system_initialize initialize
attr_accessor :skin_hue
attr_accessor :progress
attr_accessor :killed_monster
def initialize
@skin_hue = 0
@progress = 0.00
@killed_monster = 0
squall_leonhart_game_system_initialize
end
end
class Window_Progress < Window_Base
def initialize
super(PROGRESS_WINDOW[1], PROGRESS_WINDOW[2], PROGRESS_WINDOW[5], PROGRESS_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = PROGRESS_WINDOW[7]
if PROGRESS_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + PROGRESS_PICTURE)
@picture.x = 640
@picture.y = 480
@picture.bitmap.hue_change($game_system.skin_hue)
self.opacity = 0
else
self.opacity = PROGRESS_WINDOW[3]
end
update
end
def update
self.contents.clear
if PROGRESS_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
if PROGRESS_ICON != ""
bitmap = RPG::Cache.icon(PROGRESS_ICON)
self.contents.blt(0, 4, bitmap, Rect.new(0, 0, 24, 24))
end
self.contents.font.color = system_color
@largezzatesto = self.contents.text_size("Progress").width
self.contents.draw_text(80 - (@largezzatesto/2)- 16, -8, @largezzatesto, 32, "Progress")
if $game_system.progress >= 100
self.contents.font.color = crisis_color
draw_normal_barz(80-((128/2)+15), PROGRESS_WINDOW[7], "horizontal", PROGRESS_WINDOW[5]-34, 6, $game_system.progress, 100, PROGRESS_BAR_FILLED_COLOR_1, PROGRESS_BAR_FILLED_COLOR_2)
else
self.contents.font.color = normal_color
draw_normal_barz(80-((128/2)+15), PROGRESS_WINDOW[7], "horizontal", PROGRESS_WINDOW[5]-34, 6, $game_system.progress, 100, PROGRESS_BAR_COLOR_1, PROGRESS_BAR_COLOR_2)
end
@largezzatesto2 = self.contents.text_size("#{$game_system.progress.to_f} %").width
self.contents.draw_text(80 - (@largezzatesto2/2) - 16, PROGRESS_WINDOW[7] - 16, 128, 32, "#{$game_system.progress.to_f} %")
end
end
class Game_Enemy
alias tsl_ums_enemy_add_state add_state
def add_state(*args)
tsl_ums_enemy_add_state(*args)
$game_system.killed_monster += 1 if dead?
end
end
class Window_Killed < Window_Base
def initialize
super(KILLED_WINDOW[1], KILLED_WINDOW[2], KILLED_WINDOW[5], KILLED_WINDOW[6])
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = KILLED_WINDOW[7]
if KILLED_PICTURE != ""
@picture = Sprite.new
@picture.bitmap = RPG::Cache.picture("Menu/" + KILLED_PICTURE)
@picture.x = 640
@picture.y = 480
@picture.bitmap.hue_change($game_system.skin_hue)
self.opacity = 0
else
self.opacity = KILLED_WINDOW[3]
end
update
end
def update
self.contents.clear
if KILLED_PICTURE != ""
@picture.x = self.x
@picture.y = self.y
end
if KILLED_ICON != ""
bitmap = RPG::Cache.icon(KILLED_ICON)
self.contents.blt(0, KILLED_WINDOW[7] + 4, bitmap, Rect.new(0, 0, 24, 24))
end
self.contents.font.color = system_color
self.contents.draw_text(0, 0, 128, 32, "Killed Monster:")
self.contents.font.color = normal_color
self.contents.draw_text(0, KILLED_WINDOW[7], 128, 32, "#{$game_system.killed_monster.to_s}",2)
end
end
http://www.savefile.com/files/1631467