BORDER_SKIN = "Window" # Name of Window Skin for Border (Mode 0)
BORDER_IMAGE = "borderpic" # Custom Image for Border (Mode 1)
# Custom image must be in folder "Graphics/Pictures" and size 96 x 96 pixel
BORDER_OPACITY = 255 # Face Border's Opacity (0 - 255)
# (true/false)
USE_BORDER_IN_MENU = true
USE_BORDER_IN_MESSAGE = true
USE_BORDER_IN_STATUS_WINDOW = true
USE_BORDER_IN_NAME_WINDOW = true
#------------------------------
# END SETUP SCRIPT
#---------------------------
alias wor_facbor_winbas_ini initialize
alias wor_facbor_winbas_dis dispose
alias wor_facbor_winbas_draf draw_face
def initialize(x, y, width, height)
wor_facbor_winbas_ini(x, y, width, height)
@border = Array.new
end
def dispose
delete_border if @border != []
wor_facbor_winbas_dis
end
def draw_face(face_name, face_index, x, y, size = 96)
if ($scene.is_a?(Scene_Menu) and USE_BORDER_IN_MENU) or ($scene.is_a?(Scene_Map) and USE_BORDER_IN_MESSAGE) or ($scene.is_a?(Scene_Status) and USE_BORDER_IN_STATUS_WINDOW) or ($scene.is_a?(Scene_Name) and USE_BORDER_IN_NAME_WINDOW)
if BORDER_MODE == 0
@border.push Window_Border.new(self.x + x + 16,self.y + y + 16,96,96)
elsif BORDER_MODE == 1
id = @border.size
@border[id] = Sprite.new
@border[id].bitmap = Cache.picture(BORDER_IMAGE)
@border[id].x = self.x + x + 16
@border[id].y = self.y + y + 16
@border[id].z = 500
end
end
wor_facbor_winbas_draf(face_name, face_index, x, y, size)
end
def delete_border
for i in 0..(@border.size - 1)
if BORDER_MODE == 0 and !@border.nil?
@border.dispose
elsif BORDER_MODE == 1 and !@border.nil?
@border.bitmap.dispose
@border.dispose
end
end
@border = []
end
end
$worale = {} if !$worale
$worale["FaceBorder"] = true
class Window_Border < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
self.windowskin = Cache.system(BORDER_SKIN)
self.opacity = BORDER_OPACITY
self.back_opacity = 0
self.z = 500
end
end
class Window_Message < Window_Selectable
alias wor_facbot_winmsg_upd update
def update
wor_facbot_winmsg_upd
if @closing and @border != []
delete_border
end
end
end
-screenshot problema:
http://i53.tinypic.com/33beba1.jpg
poi io avevo pensato sennò ad un'altra soluzione se non si potesse eliminare,pensavo magari se si potesse spostare alla destra dello schermo e facendo apparire i face dei personaggi o.O
Question
Peru
salve,ho un problema:sto usando nel mio progetto lo script per il menù ad anello e quello per la cornice nei face dei messaggi.
il punto è che quando si apre il menù compaiono anche dei quadratini vuoti che sarebbero la cornice dei face impostati dal menù standard di RMVX.
qualcuno può aiutarmi o devo per forza buttare via uno dei due script?
-Script Menù ad anello:
#==============================================================================
# Ring_Menu
#==============================================================================
# By: XRXS, Dubealex, and Hypershadow180
# Converted to RMVX By DouglasMF (RPG Maker Brasil)
#==============================================================================
# Scene_Menu
#------------------------------------------------------------------------------
# Esta classe controla o conjunto de objetos que forma o RingMenu
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# Inicializa
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# Inicia os objetos do menu
#--------------------------------------------------------------------------
def start
super
@spriteset = Spriteset_Map.new
@gold_window = Window_Gold.new(0, 360)
@win_local = Window_Local.new(0,0)
@status_window = Window_MenuStatus.new(160, 0)
px = $game_player.screen_x - 16
py = $game_player.screen_y - 28
@ring_menu = Window_RingMenu_Comando.new(px,py)
@status_window.z = @ring_menu.z + 20
@status_window.visible = false
end
#--------------------------------------------------------------------------
# Fexa os objetos do menu
#--------------------------------------------------------------------------
def terminate
super
@spriteset.dispose
@ring_menu.dispose
@gold_window.dispose
@win_local.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# Atualiza os objetos do menu
#--------------------------------------------------------------------------
def update
super
@ring_menu.update
@gold_window.update
@win_local.update
@spriteset.update
@status_window.update
if @ring_menu.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# Atualiza o comando e a seleção do menu
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @ring_menu.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @ring_menu.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @ring_menu.indice
when 0
$scene = Scene_Item.new
when 1,2,3
start_actor_selection
when 4
$scene = Scene_File.new(true, false, false)
when 5
$scene = Scene_End.new
end
end
if Input.trigger?(Input::UP) or Input.trigger?(Input::LEFT)
Sound.play_cursor
@ring_menu.girar(3)
return
end
if Input.trigger?(Input::DOWN) or Input.trigger?(Input::RIGHT)
Sound.play_cursor
@ring_menu.girar(4)
return
end
end
#--------------------------------------------------------------------------
# Inicia a seleção de personagem
#--------------------------------------------------------------------------
def start_actor_selection
@ring_menu.active = false
@status_window.visible = true
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# Finaliza a seleção de personagens
#--------------------------------------------------------------------------
def end_actor_selection
@ring_menu.active = true
@status_window.active = false
@status_window.visible = false
@status_window.index = -1
end
#--------------------------------------------------------------------------
# Atualiza a seleção de personagens
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @ring_menu.indice
when 1
$scene = Scene_Skill.new(@status_window.index)
when 2
$scene = Scene_Equip.new(@status_window.index)
when 3
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
#==============================================================================
# Window_RingMenu_Comando
#------------------------------------------------------------------------------
# Esta classe cria o ring menu.
#==============================================================================
class Window_RingMenu_Comando < Window_Base
DurIni = 30
DurMov = 15
RaioAnel = 64
ModoIni = 1
ModoEsp = 2
ModoMD = 3
ModoME = 4
SE_Inicio = ""
attr_accessor :indice
#--------------------------------------------------------------------------
# Inicia o objeto
#--------------------------------------------------------------------------
def initialize(centro_x,centro_y)
super(0, 0, 544, 416)
self.opacity = 0
self.contents.font.size = 16
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@item_name = [s1,s2,s3,s4,s5,s6]
@item_max = 6
@item_icon = [144,128,40,137,149,112]
@item_hab = [true,true,true,true,true,true]
@indice = 0
@cx = centro_x - 12
@cy = centro_y - 12
inicia_menu
refresh
end
#--------------------------------------------------------------------------
# Atualiza o objeto
#--------------------------------------------------------------------------
def update
super
refresh
end
#--------------------------------------------------------------------------
# Atualiza o objeto
#--------------------------------------------------------------------------
def refresh
self.contents.clear
case @modo
when ModoIni
refresh_inicio
when ModoEsp
refresh_espera
when ModoMD
refresh_mover(1)
when ModoME
refresh_mover(0)
end
sw = self.contents.width
rect = Rect.new((@cx - ((sw-32)/2))+12, @cy - 40, sw-32, 32)
self.contents.draw_text(rect, @item_name[@indice],1)
end
#--------------------------------------------------------------------------
# Abre o menu
#--------------------------------------------------------------------------
def refresh_inicio
d1 = 2.0 * Math::PI / @item_max
d2 = 1.0 * Math::PI / DurIni
r = RaioAnel - 1.0 * RaioAnel * @passos / DurIni
for i in 0...@item_max
j = i - @indice
d = d1 * j + d2 * @passos
x = @cx + ( r * Math.sin( d ) ).to_i
y = @cy - ( r * Math.cos( d ) ).to_i
desenha_item(x, y, i)
end
@passos -= 1
if @passos < 1
@modo = ModoEsp
end
end
#--------------------------------------------------------------------------
# Atualiza o menu
#--------------------------------------------------------------------------
def refresh_espera
d = 2.0 * Math::PI / @item_max
for i in 0...@item_max
j = i - @indice
x = @cx + ( RaioAnel * Math.sin( d * j ) ).to_i
y = @cy - ( RaioAnel * Math.cos( d * j ) ).to_i
desenha_item(x, y, i)
end
end
#--------------------------------------------------------------------------
# Movimenta o menu
#--------------------------------------------------------------------------
def refresh_mover(modo)
d1 = 2.0 * Math::PI / @item_max
d2 = d1 / DurMov
d2 *= -1 if modo != 0
for i in 0...@item_max
j = i - @indice
d = d1 * j + d2 * @passos
x = @cx + ( RaioAnel * Math.sin( d ) ).to_i
y = @cy - ( RaioAnel * Math.cos( d ) ).to_i
desenha_item(x, y, i)
end
@passos -= 1
if @passos < 1
@modo = ModoEsp
end
end
#--------------------------------------------------------------------------
# Desenha o icone
#--------------------------------------------------------------------------
def desenha_item(x, y, i)
if @indice == i
self.cursor_rect.set(x-4, y-4, 32, 32)
draw_icon(@item_icon, x, y, @item_hab)
else
draw_icon(@item_icon, x, y, @item_hab)
end
end
#--------------------------------------------------------------------------
# Inicia o menu
#--------------------------------------------------------------------------
def inicia_menu
@modo = ModoIni
@passos = DurIni
if SE_Inicio != nil and SE_Inicio != ""
Audio.se_play("Audio/SE/" + SE_Inicio, 80, 100)
end
end
#--------------------------------------------------------------------------
# Gira o menu
#--------------------------------------------------------------------------
def girar(modo)
if modo == ModoMD
@indice -= 1
@indice = @item_hab.size - 1 if @indice < 0
elsif modo == ModoME
@indice += 1
@indice = 0 if @indice >= @item_hab.size
else
return
end
@modo = modo
@passos = DurMov
end
end
#==============================================================================
# Scene_Title
#------------------------------------------------------------------------------
# Faz modificações nescessarias para a exibição do nome do mapa
#==============================================================================
class Scene_Title
alias load_database_old load_database
def load_database
load_database_old
$data_mapinfo = load_data("Data/MapInfos.rvdata")
end
end
#==============================================================================
# Window_Local
#------------------------------------------------------------------------------
# Cria a janela responsavel pela exibição do nome do mapa
#==============================================================================
class Window_Local < Window_Base
#--------------------------------------------------------------------------
# Inicia o objeto
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, 96)
refresh
end
#--------------------------------------------------------------------------
# Atualiza o objeto
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, "Local:")
self.contents.font.color = system_color
self.contents.draw_text(4, 32, 120, 32, $data_mapinfo[$game_map.map_id].name, 2)
end
end
-script cornice:
#------------------------------
# START SETUP SCRIPT
#---------------------------
BORDER_MODE = 0 # Choose Border Mode (0: Use Windowskin, 1:Use Image)
BORDER_SKIN = "Window" # Name of Window Skin for Border (Mode 0)
BORDER_IMAGE = "borderpic" # Custom Image for Border (Mode 1)
# Custom image must be in folder "Graphics/Pictures" and size 96 x 96 pixel
BORDER_OPACITY = 255 # Face Border's Opacity (0 - 255)
# (true/false)
USE_BORDER_IN_MENU = true
USE_BORDER_IN_MESSAGE = true
USE_BORDER_IN_STATUS_WINDOW = true
USE_BORDER_IN_NAME_WINDOW = true
#------------------------------
# END SETUP SCRIPT
#---------------------------
#============================================================
# ● [VX] ◦ Quick Face Border ◦
#------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released Date: 23/02/2008
#------------------------------------------------------------
# Version 1.5
# - Edited Window_Message Bug
# - You can use custom image for border
#------------------------------------------------------------
class Window_Base < Window
#------------------------------
# START SETUP SCRIPT
#---------------------------
BORDER_MODE = 0 # Choose Border Mode (0: Use Windowskin, 1:Use Image)
BORDER_SKIN = "Window" # Name of Window Skin for Border (Mode 0)
BORDER_IMAGE = "borderpic" # Custom Image for Border (Mode 1)
# Custom image must be in folder "Graphics/Pictures" and size 96 x 96 pixel
BORDER_OPACITY = 255 # Face Border's Opacity (0 - 255)
# (true/false)
USE_BORDER_IN_MENU = true
USE_BORDER_IN_MESSAGE = true
USE_BORDER_IN_STATUS_WINDOW = true
USE_BORDER_IN_NAME_WINDOW = true
#------------------------------
# END SETUP SCRIPT
#---------------------------
alias wor_facbor_winbas_ini initialize
alias wor_facbor_winbas_dis dispose
alias wor_facbor_winbas_draf draw_face
def initialize(x, y, width, height)
wor_facbor_winbas_ini(x, y, width, height)
@border = Array.new
end
def dispose
delete_border if @border != []
wor_facbor_winbas_dis
end
def draw_face(face_name, face_index, x, y, size = 96)
if ($scene.is_a?(Scene_Menu) and USE_BORDER_IN_MENU) or ($scene.is_a?(Scene_Map) and USE_BORDER_IN_MESSAGE) or ($scene.is_a?(Scene_Status) and USE_BORDER_IN_STATUS_WINDOW) or ($scene.is_a?(Scene_Name) and USE_BORDER_IN_NAME_WINDOW)
if BORDER_MODE == 0
@border.push Window_Border.new(self.x + x + 16,self.y + y + 16,96,96)
elsif BORDER_MODE == 1
id = @border.size
@border[id] = Sprite.new
@border[id].bitmap = Cache.picture(BORDER_IMAGE)
@border[id].x = self.x + x + 16
@border[id].y = self.y + y + 16
@border[id].z = 500
end
end
wor_facbor_winbas_draf(face_name, face_index, x, y, size)
end
def delete_border
for i in 0..(@border.size - 1)
if BORDER_MODE == 0 and !@border.nil?
@border.dispose
elsif BORDER_MODE == 1 and !@border.nil?
@border.bitmap.dispose
@border.dispose
end
end
@border = []
end
end
$worale = {} if !$worale
$worale["FaceBorder"] = true
class Window_Border < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
self.windowskin = Cache.system(BORDER_SKIN)
self.opacity = BORDER_OPACITY
self.back_opacity = 0
self.z = 500
end
end
class Window_Message < Window_Selectable
alias wor_facbot_winmsg_upd update
def update
wor_facbot_winmsg_upd
if @closing and @border != []
delete_border
end
end
end
-screenshot problema:
http://i53.tinypic.com/33beba1.jpg
poi io avevo pensato sennò ad un'altra soluzione se non si potesse eliminare,pensavo magari se si potesse spostare alla destra dello schermo e facendo apparire i face dei personaggi o.O
in ogni caso,aiuto T_T
e così ricopro la mia nuda perfidia con espressione a me estranea rubata ai sacri testi e sembro un santo quando faccio la parte del diavolo.
[V per Vendetta]
http://www.lusogamer.com/live/teknoplayer_v1_red/gamercard_default/obsidiam.png
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now