[RGSS2] Menu Compacto por LB [v1.0.0]
2 participantes
Página 1 de 1
[RGSS2] Menu Compacto por LB [v1.0.0]
Créditos: LB
Função:
Menu normal compactado, permitindo melhor visualização do mapa
Incompatibilidade:
Qualquer script que altera, de alguma forma, o menu.
Instalação:
Colocar acima de main. Se quiser pode deletar os scripts "Scene_Menu" e "Window_MenuStatus".
Screen:
- Spoiler:
- Código:
###########################################################
##################### MENU COMPACTO #######################
#### V 1.0.0 ##############################################
################################### Por: LB ###############
################ www.ReinoRpg.com##########################
###########################################################
class Window_MenuStatus < Window_Selectable
def initialize(x, y)
super(x, y, 384, 120)
refresh
self.active = false
self.index = -1
end
def refresh
@item_max = $game_party.members.size
draw_actor
end
def draw_actor
self.contents.clear
if (self.index < 0)
actor = 0
else
actor = self.index
end
actor = $game_party.members[actor]
draw_actor_face(actor, 2, 2, 86)
x = 104
y = 5
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120, y)
draw_actor_level(actor, x, y + WLH * 1)
draw_actor_state(actor, x, y + WLH * 2)
draw_actor_hp(actor, x + 120, y + WLH * 1)
draw_actor_mp(actor, x + 120, y + WLH * 2)
end
def update_cursor
if @index < 0
self.cursor_rect.empty
elsif @index < @item_max
self.cursor_rect.set(0, 0, contents.width, 90)
elsif @index >= 100
self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
else
self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
end
end
end
class Window_PlayTime < Window_Base
def initialize
super(320, 360, 224, WLH + 32)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 22, "Tempo:")
@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(50, 0, 120, 22, text, 2)
end
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
class Scene_Menu < Scene_Base
def initialize(menu_index = 0)
@menu_index = menu_index
end
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(160, 360)
@status_window = Window_MenuStatus.new(160, 240)
@window_playtime = Window_PlayTime.new
end
def terminate
super
dispose_menu_background
@window_playtime.dispose
@command_window.dispose
@gold_window.dispose
@status_window.dispose
end
def update
super
update_menu_background
@window_playtime.update
@command_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
if Input.repeat?(Input::DOWN)
@status_window.draw_actor
end
if Input.repeat?(Input::UP)
@status_window.draw_actor
end
update_actor_selection
end
end
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
@command_window.y = 240
if $game_party.members.size == 0
@command_window.draw_item(0, false)
@command_window.draw_item(1, false)
@command_window.draw_item(2, false)
@command_window.draw_item(3, false)
end
if $game_system.save_disabled
@command_window.draw_item(4, false)
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
$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
end
def start_actor_selection
@command_window.active = false
@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
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
@status_window.draw_actor
end
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 @command_window.index
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
Dark Dudu- Número de Mensagens : 385
Idade : 30
Localização : São Vicente - SP
Especialidade : Eventos
Data de inscrição : 01/12/2008
RMB Games
Nível de Reputação: 2
Reputação:
(61/100)
Gamescore:
(0/0)
Re: [RGSS2] Menu Compacto por LB [v1.0.0]
Interessante, mas prefiro fazer os meus ^^
Alías, não tenhum de FFVII pra VX tem?
Alías, não tenhum de FFVII pra VX tem?
Alan- Número de Mensagens : 224
Idade : 31
Especialidade : Eventos
Data de inscrição : 02/12/2008
RMB Games
Nível de Reputação: 1
Reputação:
(55/100)
Gamescore:
(0/0)
Re: [RGSS2] Menu Compacto por LB [v1.0.0]
Quando eu achar um certamente vou postar ^^.
Dark Dudu- Número de Mensagens : 385
Idade : 30
Localização : São Vicente - SP
Especialidade : Eventos
Data de inscrição : 01/12/2008
RMB Games
Nível de Reputação: 2
Reputação:
(61/100)
Gamescore:
(0/0)
Tópicos semelhantes
» [RGSS2] Eon HUD
» [RGSS2] HP e SP no Mapa
» [RGSS2] Anti-Lag
» [RGSS2] NEL - SHOP!
» [RGSS2] Script de Sombra
» [RGSS2] HP e SP no Mapa
» [RGSS2] Anti-Lag
» [RGSS2] NEL - SHOP!
» [RGSS2] Script de Sombra
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|