New Style Menu

Ver o tópico anterior Ver o tópico seguinte Ir em baixo

New Style Menu

Mensagem por Convidad em Dom 20 Fev - 9:48

New Style Menu
Feito por: Slade
Maker Utilizado: RMVX
|Versão: 1.0|


Descrição:
Menu compacto para 1 player.


Funções:
Menu compatco de 1 jogador, mostra status hp, mp e etc...


Instruções
Apenas cole os scripts acima do main.


ScreenShots

Download:

Não necessario.


Script:
Código: [Selecionar]
class New_Style_Window < Window_Base
def initialize(x,y,l,a)
super(x,y,l,a)
@x,@y,@l,@a = x,y,l,a
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end

def refresh
self.contents.clear
@actor = $game_party.members[0]
@hp = @actor.hp
@hp_max = @actor.maxhp
@mp = @actor.mp
@mp_max = @actor.maxmp
draw_actor_face(@actor,5,35)
self.contents.fill_rect(0,135,104,10,Color.new(0,0,0))
self.contents.fill_rect(0,146,104,10,Color.new(0,0,0))
self.contents.gradient_fill_rect(2,137,100,6,Color.new(0,100,0),Color.new(0,255,0))
self.contents.gradient_fill_rect(2,148,100,6,Color.new(0,0,100),Color.new(0,0,255))
self.contents.fill_rect(0,159,130,50,Color.new(0,0,0))
self.contents.font.name = "Calibri"
self.contents.font.size = 10
self.contents.draw_text(50,129,self.width - 30,19,"/")
self.contents.draw_text(50,140,self.width - 30,19,"/")
self.contents.font.size = 11
self.contents.draw_text(29,129,self.width - 30,19,"#{@hp}")
self.contents.draw_text(29,140,self.width - 30,19,"#{@mp}")
self.contents.draw_text(56,129,self.width - 30,19,"#{@hp_max}")
self.contents.draw_text(56,140,self.width - 30,19,"#{@mp_max}")
draw_actor_state(@actor,4,162)
end
end

class New_Style_Window_Name < Window_Base
def initialize(x,y,l,a)
super(x,y,l,a)
@x,@y,@l,@a = x,y,l,a
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end

def refresh
self.contents.clear
@actor = $game_party.members[0]
@name = @actor.name
self.contents.font.bold = true
self.contents.fill_rect(0,0,137,48,Color.new(0,0,0))
self.contents.font.color = Color.new(255,0,0)
self.contents.draw_text(0,-6,self.width - 30,30,"#{@name}")
self.opacity = 0
end
end

class Window_Map_Name < Window_Base
def initialize(x,y,l,a)
super(x,y,l,a)
@x,@y,@l,@a = x,y,l,a
self.contents = Bitmap.new(width - 32, height - 32)
self.z = 1
refresh
end

def refresh
self.contents.clear
self.contents.draw_text(0,-6,self.width - 30,30,"#{$game_map.name}")
end
end

class Scene_Title
$map_infos = load_data("Data/MapInfos.rvdata")
for key in $map_infos.keys
$map_infos[key] = $map_infos[key].name
end
end

class Game_Map
def name
$map_infos[@map_id]
end
end

class Scene_Menu < Scene_Base
def start
create_menu_background
create_command_window
@new_style = New_Style_Window.new(0,0,136,220)
@new_style_name = New_Style_Window_Name.new(0,0,136,48)
@window_map_name = Window_Map_Name.new(170,0,180,48)
end

def create_command_window
s1 = Vocab::item
s2 = Vocab::equip
s3 = Vocab::skill
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s3, s2, s4, s5, s6])
@command_window.index = @menu_index
@command_window.x = 544 - @command_window.width
if $game_party.members.size == 0 # Se não houver membros na equipe
@command_window.draw_item(0, false) # Desabilita "Items"
@command_window.draw_item(1, false) # Desabilita "Habilidades"
@command_window.draw_item(2, false) # Desabilita "Equipamentos"
@command_window.draw_item(3, false) # Desabilita "Status"
end
if $game_system.save_disabled # Se salvar for proibido
@command_window.draw_item(4, false) # Desabilita "Salvar"
end
end
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 @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1
$scene = Scene_Skill.new(0)
when 2
$scene = Scene_Equip.new(0)
when 3 # Habilidades, equipamento, status
$scene = Scene_Status.new(0)
when 4 # Salvar
$scene = Scene_File.new(true, false, false)
when 5 # Fim de jogo
$scene = Scene_End.new
end
end
end

def update
@new_style.update
@new_style_name.update
@command_window.update
@window_map_name.update
if Input.trigger?(Input::B)
$scene = Scene_Map.new
end
if @command_window.active
update_command_selection
end
end

def terminate
super
dispose_menu_background
@new_style.dispose
@new_style_name.dispose
@command_window.dispose
@window_map_name.dispose
end
end

Créditos
Slade por criar e disponibilizar.

Convidad
Convidado


Voltar ao Topo Ir em baixo

Ver o tópico anterior Ver o tópico seguinte Voltar ao Topo


 
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum