Sign in to follow this  
Followers 0
Slab

[Script]GL 1.0 Menu

7 posts in this topic

Script:
Menu muy simple pero a pesar de eso es bonito

Anotaciones:

>No es mío

>Para ver los otros personajes deberás entrar en ESTADO y apretar Arriba/Abajo

Screens:
user posted image

Script:
[SPOILER]#======================================
# GLMenu v1.0
#------------------------------------------------------------------------------
# Script Base : RMVX
# Criador : Glucas
# Algumas idéias: lb_guilerme
#------------------------------------------------------------------------------
# Descrição:
# Um Script de Menu diferente, para deixar seu jogo com uma aparência melhor.
# Feito por Glucas, da JogosRPG
#------------------------------------------------------------------------------
# Data: 20/03/08
# Versão: 1.0.0
#------------------------------------------------------------------------------
# Log:
# - 20/03/08: Script criado.
#==============================================================================

class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# menu_index : コマンドのカーソル初期位置
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ● 開始処理
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 305)
@status_window = Window_MenuStatus.new(67, 0)
@window_playtime = Window_PlayTime.new(336,360)
@window_steps = Window_Steps.new(370,306)
@window_map = Window_Map.new(0, 360)
end
#--------------------------------------------------------------------------
# ● 終了処理
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@window_playtime.dispose
@window_steps.dispose
@window_map.dispose
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@window_playtime.update
@window_steps.update
@window_map.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.x = 190
@command_window.y = 145
@command_window.index = @menu_index
if $game_party.members.size == 0 # パーティ人数が 0 人の場合
@command_window.draw_item(0, 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
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 = 0
@status_window.index = 0
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
#--------------------------------------------------------------------------
# ● PlayTime
#--------------------------------------------------------------------------
class Window_PlayTime < Window_Base
def initialize(x, y)
super(x, y, 205, 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, "Tiempo:")
@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
#--------------------------------------------------------------------------
# ● Steps
#--------------------------------------------------------------------------
class Window_Steps < Window_Base
def initialize(x, y)
super(x, y, 171, 53)
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, "Pasos: ")
self.contents.font.color = normal_color
self.contents.draw_text(18, 0, 120, 22, $game_party.steps.to_s, 2)
end
end
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
#  メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
#==============================================================================

class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 412, 122)
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@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 = 115
y = 5
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 138, y)
draw_actor_level(actor, x, y + WLH * 1)
draw_actor_state(actor, x, y + WLH * 2)
draw_actor_hp(actor, x + 138, y + WLH * 1)
draw_actor_mp(actor, x + 138, y + WLH * 2)
draw_actor_graphic(actor, x - 30, y + WLH * 2 + 35)
draw_actor_exp(actor, x, y + WLH * 2, 70)
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
#==============================================================================
# ■ Window_Base
#------------------------------------------------------------------------------
#  メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
#==============================================================================
class Window_Base < Window
def draw_actor_exp(actor, x, y, t)
s1 = actor.exp_s
s2 = actor.next_rest_exp_s + s1
text = s1.to_s + "/" + s2.to_s
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, WLH, "Exp")
self.contents.font.color = normal_color
self.contents.draw_text(x + 38, y, t, WLH, text, 2)
end
end
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
#  ゴールドを表示するウィンドウです。
#==============================================================================

class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 171, WLH + 32)
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_currency_value($game_party.gold, 4, 0, 131)
end
end
#==============================================================================
# ■ Window_Map
#------------------------------------------------------------------------------
#  ゴールドを表示するウィンドウです。
#==============================================================================
class Game_Map
def name
$map_infos[@map_id]
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 Window_Map < Window_Base
def initialize(x, y)
super(x, y, 205, 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, 25, "Mapa: ")
self.contents.font.color = normal_color
self.contents.draw_text(70, 0, 286, 25, $game_map.name.to_s)
end
end[/SPOILER] Edited by Slab
0

Share this post


Link to post
Share on other sites
Se ve muy bueno lo probare en mi proyecto...y pongo como se ve laugh.gif happy.gif

Edit: me salio erropr linea 3 cheesy.gif no creo que a otro le suceda o si? Edited by Greed
0

Share this post


Link to post
Share on other sites
Greed, pon en un code la linea (mejor la parte) en la que te dio el error, para verlo de mejor forma, porque si dices linea 3 facilmente puedo pensar que te dio error esto: #------------------------------------

- .-
0

Share this post


Link to post
Share on other sites
Ok lo hare cheesy.gif

Ojala duncione luego edito para ver si resulto auxilio.gif

Edit: habia algo que sobreva eran unos ========== los elimine y listo o.o

XD ahora tdo bien gracias pero me sale el nombre del mapa con el corchete que le puse para dia y noche XD Edited by Greed
0

Share this post


Link to post
Share on other sites
Eso era lo que me temia =P Esto: #=======
Se usa a modo de separadores de las partes del script, la # indica que son anotaciones y no parte del codigo, vamos que eso se lo salta la lectura del RGSS2. Pero si le quitas la # pues se convierte en codigo, erroneo pero codigo xD.
0

Share this post


Link to post
Share on other sites
¡Doup! Creo que no se compatibilizaran bien de esa forma los 2 scripts...

Problema resuelto para los que copiaran luego el script ya quité los = que estaban demás

Edited by Slab
0

Share this post


Link to post
Share on other sites
auxilio.gif hola!!!!soy nuevo..jeje y la verdad..ase tiempo que me eh estado aprovechando con los script. blink.gif .y me decidi a registrarme para participar...y para agradecer a muchos..(entre los que no recuedo)
y pues..en este script.....pues mola mucho pero yo tenia un sistema de menu muy bueno..el cual ponia otro script de opcion(cambio party)y me salia..pero puse el de telefonos y no me salia..(problema espacio que se yo!)y entonces busque busque y encontre este...el cual va de peor porque nisiquiera me muestra las dos opiciones(movil y cambio party+PHS)entonces...como recien estoy entrando en esto de escript tongue.gif
nose si alla un modo de poner las opciones...
pues saludos y gracias de adelantado auxilio.gif cool.gif
0

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0