Jump to content
Sign in to follow this  
victor souza gomez lucchini

VGZ - Ring Menu

Recommended Posts

VGZ - Ring Menu

VictorGomez

 

Introduction

Hello, I bring you a Ring Menu, a menu very simple and nice.

 

Features

-ring style menu

 

 

Screenshots

bitmap.PNG

 

How to Use

paste the script above main

 

Demo

nil

 

Script

 

 

 

#====================================================================
#Script: Ring Menu [ACE]
#By: Victor Gomez
#====================================================================

module Configuration
#itens name, ["items","sair","equip" etc...]

Item_name = [
"Items",
"Skill",
"Equipamentos",
"Status",
"Formation",
"Salvar",
"Sair"
]

#number max of options
Item_max = 7
#icons of options ["item","skill"...]
Item_icon = [144,128,40,137,149,112,1]
#activate ? ["item","skill"...]
Item_hab = [true,true,true,true,true,true,true]
 end


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  Esta classe executa o processamento da tela de menu.
#==============================================================================

class Scene_Menu < Scene_MenuBase
 #--------------------------------------------------------------------------
 # * Inicialização do processo
 #--------------------------------------------------------------------------
 def start
super
@win_local = Window_Local.new(0,0)
px = $game_player.screen_x - 16
py = $game_player.screen_y - 28
@ring_menu = Window_RingMenu_Comando.new(px,py)
create_status_window
@status_window.visible = false
create_gold_window
 end

 def update
super
@ring_menu.update
@win_local.update
if Input.trigger?(Input::C)
case @ring_menu.indice
  when 0
	command_item
  when 1,2,3
	command_personal
  when 4
	command_formation
  when 5
   command_save
  when 6
	command_game_end
  end
end
if Input.trigger?(:
  return_scene
end

if Input.trigger?(Input::UP) or  Input.trigger?(Input::LEFT) and @ring_menu.lol != false
  Sound.play_cursor
  @ring_menu.girar(3)
  return
end
if Input.trigger?(Input::DOWN) or  Input.trigger?(Input::RIGHT) and @ring_menu.lol != false
  Sound.play_cursor
  @ring_menu.girar(4)
  return
end
 end

 def terminate
super
@ring_menu.dispose
@win_local.dispose
 end

 #--------------------------------------------------------------------------
 # * Criação da janela de comando
 #--------------------------------------------------------------------------
 def create_command_window
@command_window = Window_MenuCommand.new
@command_window.set_handler(:item,	  method(:command_item))
@command_window.set_handler(:skill,	 method(:command_personal))
@command_window.set_handler(:equip,	 method(:command_personal))
@command_window.set_handler(:status,	method(:command_personal))
@command_window.set_handler(:formation, method(:command_formation))
@command_window.set_handler(:save,	  method(:command_save))
@command_window.set_handler(:game_end,  method(:command_game_end))
@command_window.set_handler(:cancel,	method(:return_scene))
 end
 #--------------------------------------------------------------------------
 # * Criação da janela de dinheiro
 #--------------------------------------------------------------------------
 def create_gold_window
@gold_window = Window_Gold.new
@gold_window.x = -20
@gold_window.y = Graphics.height - @gold_window.height
@gold_window.opacity = 0
 end
 #--------------------------------------------------------------------------
 # * Criação da janela de atributos
 #--------------------------------------------------------------------------
 def create_status_window
@status_window = Window_MenuStatus.new(160, 0)
 end
 #--------------------------------------------------------------------------
 # * Comando [item]
 #--------------------------------------------------------------------------
 def command_item
SceneManager.call(Scene_Item)
 end
 #--------------------------------------------------------------------------
 # * Comando [Habilidade] [Equipamentos] [Atributos]
 #--------------------------------------------------------------------------
 def command_personal
@status_window.select_last
@status_window.visible = true
@ring_menu.lol = false
@status_window.activate
@status_window.set_handler(:ok,	 method(:on_personal_ok))
@status_window.set_handler(:cancel, method(:on_personal_cancel))
 end
 #--------------------------------------------------------------------------
 # * Comando [Formação]
 #--------------------------------------------------------------------------
 def command_formation
@status_window.select_last
@status_window.activate
@status_window.set_handler(:ok,	 method(:on_formation_ok))
@status_window.set_handler(:cancel, method(:on_formation_cancel))
 end
 #--------------------------------------------------------------------------
 # * Comando [salvar]
 #--------------------------------------------------------------------------
 def command_save
SceneManager.call(Scene_Save)
 end
 #--------------------------------------------------------------------------
 # * Comando [Fim do Jogo]
 #--------------------------------------------------------------------------
 def command_game_end
SceneManager.call(Scene_End)
 end
 #--------------------------------------------------------------------------
 # * Comandos individuais [Confirmação]
 #--------------------------------------------------------------------------
 def on_personal_ok
case @ring_menu.indice
when 1
  @status_window.visible = false
  SceneManager.call(Scene_Skill)
when 2
  @status_window.visible = false
  SceneManager.call(Scene_Equip)
when 3
  @status_window.visible = false
  SceneManager.call(Scene_Status)
end
 end
 #--------------------------------------------------------------------------
 # * Comandos individuais [Cancelamento]
 #--------------------------------------------------------------------------
 def on_personal_cancel
@status_window.visible = false
@ring_menu.lol = true
@status_window.unselect
 end
 #--------------------------------------------------------------------------
 # * Mudança de Ordem [Confirmação]
 #--------------------------------------------------------------------------
 def on_formation_ok
@status_window.visible = true
if @status_window.pending_index >= 0
  $game_party.swap_order(@status_window.index,
						 @status_window.pending_index)
  @status_window.pending_index = -1
  @status_window.redraw_item(@status_window.index)
else
  @status_window.pending_index = @status_window.index
end
@status_window.activate
 end
 #--------------------------------------------------------------------------
 # * Mudança de Ordem [Cancelamento]
 #--------------------------------------------------------------------------
 def on_formation_cancel
if @status_window.pending_index >= 0
  @status_window.pending_index = -1
  @status_window.activate
else
  @status_window.unselect
  @status_window.visible = false
end
 end
end

class Window_RingMenu_Comando < Window_Base

 DurIni = 30
 DurMov = 15
 RaioAnel = 64
 ModoIni = 1
 ModoEsp = 2
 ModoMD = 3
 ModoME = 4
 SE_Inicio = ""

 attr_accessor :lol
 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
@item_name = Configuration::Item_name
@item_max = Configuration::Item_max
@item_icon = Configuration::Item_icon
@item_hab = Configuration::Item_hab
@indice = 0
@cx = centro_x - 12
@cy = centro_y - 12
inicia_menu
refresh
@lol = true
 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[i], x, y, @item_hab[i])
else
  draw_icon(@item_icon[i], x, y, @item_hab[i])
end
 end
 #--------------------------------------------------------------------------
 # Inicia o menu
 #--------------------------------------------------------------------------
 def inicia_menu
@modo = ModoIni
@passos = DurIni
if  SE_Inicio != nil and SE_Inicio != "" and @activate
  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 and @activate
  @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
#==============================================================================

module DataManager
def self.load_normal_database
$data_actors		= load_data("Data/Actors.rvdata2")
$data_classes	   = load_data("Data/Classes.rvdata2")
$data_skills		= load_data("Data/Skills.rvdata2")
$data_items		 = load_data("Data/Items.rvdata2")
$data_weapons	   = load_data("Data/Weapons.rvdata2")
$data_armors		= load_data("Data/Armors.rvdata2")
$data_enemies	   = load_data("Data/Enemies.rvdata2")
$data_troops		= load_data("Data/Troops.rvdata2")
$data_states		= load_data("Data/States.rvdata2")
$data_animations	= load_data("Data/Animations.rvdata2")
$data_tilesets	  = load_data("Data/Tilesets.rvdata2")
$data_common_events = load_data("Data/CommonEvents.rvdata2")
$data_system		= load_data("Data/System.rvdata2")
$data_mapinfos	  = load_data("Data/MapInfos.rvdata2")
$data_mapinfo = load_data("Data/MapInfos.rvdata2")
 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)
self.opacity = 0
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

 

 

 

FAQ

 

Q: Work in Vx or XP?

A: no.

 

Credit and Thanks

- Victor Gomez

 

Enjoy!

Edited by victor souza gomez lucchini

Share this post


Link to post
Share on other sites

Isn't this just the same with the evgals ring meny? just made window borders transparent, and changed icons of the images...

 

seems like a plagarism.. :S

 

 

Edit:

 

Isnt it just the same with this?..

 

http://www.rpgmakervxace.net/topic/1836-ring-menu-vxace/page__hl__%2Bring+%2Bmenu

Edited by Wyrelade

Share this post


Link to post
Share on other sites

I would advise you guys to take a look at the scripts first before jumping to conclusions. I looked at the scripts and they seemed different enough that it couldn't have been a straight copy and paste. I'm pretty sure this is an original from this site.

Share this post


Link to post
Share on other sites

I would advise you guys to take a look at the scripts first before jumping to conclusions. I looked at the scripts and they seemed different enough that it couldn't have been a straight copy and paste. I'm pretty sure this is an original from this site.

 

Well, I took a look at the script, and theyr anyways little similar.

Even tought, he can modify the command names and vocabs from the originals, and still use copyed script to make it.

 

I am not saying, it is fully plagarised, but just my opinion..

 

It's too much looking just like evgals ring menu ,and evgals is way better than this, so there is no point to have 2 exact same looking scripts, which has just a TIIINY bit of difference in look.

 

People will use evgals just because it less buggy looking.

Share this post


Link to post
Share on other sites

ok i think you should just drop it. Similar scripts are released all the time. A lot of time similar scripts are gonna have some likeness in coding they are different enough so lay off the guy. Good job on the script!

Share this post


Link to post
Share on other sites

I'm going to assume by the link you mean my Ring Menu? And I would like to say this in no way copies my script.

 

The only part they share is the animation of the menu which was originally devised by XRXS, Dubealex & Hypershadow180.

And even that was just using some Mathematics. The only part they should most certainly be credited for is the startup, where it spirals outwards - because that was a ingenious addition :P

Share this post


Link to post
Share on other sites

I'm going to assume by the link you mean my Ring Menu? And I would like to say this in no way copies my script.

 

The only part they share is the animation of the menu which was originally devised by XRXS, Dubealex & Hypershadow180.

And even that was just using some Mathematics. The only part they should most certainly be credited for is the startup, where it spirals outwards - because that was a ingenious addition :P

 

 

Thanks for straighting up this mess ->

 

But it still looks so similar to yours xD..

 

Location window.. gold window... everything in same coordinates and stuff.. what ever :)

Share this post


Link to post
Share on other sites

I would advise you guys to take a look at the scripts first before jumping to conclusions. I looked at the scripts and they seemed different enough that it couldn't have been a straight copy and paste. I'm pretty sure this is an original from this site.

I am not saying, it is fully plagarised, but just my opinion..

 

It's too much looking just like evgals ring menu ,and evgals is way better than this, so there is no point to have 2 exact same looking scripts, which has just a TIIINY bit of difference in look.

 

People will use evgals just because it less buggy looking.

I'm going to assume by the link you mean my Ring Menu? And I would like to say this in no way copies my script.

 

 

Thanks for straighting up this mess ->

 

But it still looks so similar to yours xD..

 

Location window.. gold window... everything in same coordinates and stuff.. what ever :)

Wyrelade, the only mess here is your own misunderstanding. Please learn something and stop fouling up other people's topics before you know what is going on. We all make mistakes, but charging on ahead in ignorance and insulting the OP when he was just trying to contribute is counter-productive.

Share this post


Link to post
Share on other sites

Visually the two scripts are similar, but the scripts are Entirely different, yet I would not have posted if I Knew there was a similar menu

 

anyway, thank you

 

~brazil

 

I hope this won't discourage you from posting more scripts in the future. As gubiD has said, two scripts that do the same thing can have very different components. It's a good learning process for people like me trying to learn scripting to look through other scripts and see alternative ways of doing things. Thanks for sharing.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted