LB Moderador
Número de Mensagens : 4 Data de inscrição : 14/06/2009
| Assunto: [v1.0.1] Ring Menu Dom Jun 14, 2009 9:16 am | |
| Função:É um menu rotacional, no qual as opções giram em torno do personagem. Por enquanto é apenas para um personagem. Instalação:Colocar acima de Main ou no mesmo lugar do Scene_Menu original. Imagem:OBS.: Os icones podem ser alterados nas configurações Script:- Spoiler:
- Código:
-
class Scene_Menu < Scene_Base ################################################## def start ######################### R I N G M E N U ########################## ########################################################### v1.0.1 ############# ################ Por LB - ReinoRPG.com ######################################### ################################################################################
# Velocidade de movimento @vel = 2 # Número dos icones das opções @icones = [1,2,3,4,5,6]
# Nome das opções @nomes = [ Vocab::item, Vocab::skill, Vocab::equip, Vocab::status, Vocab::save, Vocab::game_end]
# Posição X e Y de todos os pixels de um circulo de raio 60. @forma = [ [60,0],[61,0],[62,0],[63,0],[64,0],[65,1],[66,1],[67,1],[68,1],[69,1],[70,1], [71,1],[72,1],[73,2],[74,2],[75,2],[76,3],[77,3],[78,3],[79,4],[80,4],[81,4], [82,4],[83,5],[84,5],[85,6],[86,6],[87,7],[88,8],[89,8],[90,9],[91,9],[92,10], [93,10],[94,11],[95,12],[96,13],[97,14],[98,15],[99,15],[100,16],[101,17], [102,18],[103,19],[104,20],[104,21],[105,22],[106,23],[107,24],[108,25], [109,26],[109,27],[110,28],[110,29],[111,30],[111,31],[112,32],[112,33], [113,34],[114,35],[114,36],[115,37],[115,38],[115,39],[115,40],[116,41], [116,42],[116,43],[117,44],[117,45],[117,46],[118,47],[118,48],[118,49], [118,50],[118,51],[118,52],[118,53],[118,54],[119,55],[119,56],[119,57], [119,58],[119,59],[119,60],[119,61],[119,62],[119,63],[119,64],[118,65], [118,66],[118,67],[118,68],[118,69],[118,70],[118,71],[118,72],[117,73], [117,74],[117,75],[116,76],[116,77],[116,78],[115,79],[115,80],[115,81], [115,82],[114,83],[114,84],[113,85],[112,86],[112,87],[111,88],[111,89], [110,90],[110,91],[109,92],[109,93],[108,94],[107,95],[106,96],[105,97], [104,98],[104,99],[103,100],[102,101],[101,102],[100,103],[99,104],[98,104], [97,105],[96,106],[95,107],[94,108],[93,109],[92,109],[91,110],[90,110], [89,111],[88,111],[87,112],[86,113],[85,113],[84,114],[83,114],[82,115], [81,115],[80,115],[79,115],[78,116],[77,116],[76,116],[75,117],[74,117], [73,117],[72,118],[71,118],[70,118],[69,118],[68,118],[67,118],[66,118], [65,118],[64,119],[63,119],[62,119],[61,119],[60,119],[59,119],[58,119], [57,119],[56,119],[55,119],[54,118],[53,118],[52,118],[51,118],[50,118], [49,118],[48,118],[47,118],[46,117],[45,117],[44,117],[43,116],[42,116], [41,116],[40,115],[39,115],[38,115],[37,115],[36,114],[35,114],[34,113], [33,113],[32,112],[31,111],[30,111],[29,110],[28,110],[27,109],[26,109], [25,108],[24,107],[23,106],[22,105],[21,104],[20,104],[19,103],[18,102], [17,101],[16,100],[15,99],[15,98],[14,97],[13,96],[12,95],[11,94],[10,93], [10,92],[9,91],[9,90],[8,89],[8,88],[7,87],[7,86],[6,85],[5,84],[5,83],[4,82], [4,81],[4,80],[4,79],[3,78],[3,77],[3,76],[2,75],[2,74],[2,73],[1,72],[1,71], [1,70],[1,69],[1,68],[1,67],[1,66],[1,65],[0,64],[0,63],[0,62],[0,61],[0,60], [0,59],[0,58],[0,57],[0,56],[0,55],[1,54],[1,53],[1,52],[1,51],[1,50],[1,49], [1,48],[1,47],[2,46],[2,45],[2,44],[3,43],[3,42],[3,41],[4,40],[4,39],[4,38], [4,37],[5,36],[5,35],[6,34],[7,33],[7,32],[8,31],[8,30],[9,29],[9,28],[10,27], [10,26],[11,25],[12,24],[13,23],[14,22],[15,21],[15,20],[16,19],[17,18], [18,17],[19,16],[20,15],[21,15],[22,14],[23,13],[24,12],[25,11],[26,10], [27,10],[28,9],[29,9],[30,8],[31,8],[32,7],[33,6],[34,6],[35,5],[36,5],[37,4], [38,4],[39,4],[40,4],[41,3],[42,3],[43,3],[44,2],[45,2],[46,2],[47,1],[48,1], [49,1],[50,1],[51,1],[52,1],[53,1],[54,1],[55,0],[56,0],[57,0],[58,0],[59,0]] super @menuback_sprite = Sprite.new @menuback_sprite.bitmap = $game_temp.background_bitmap @x = $game_player.screen_x - 70 + 16 @y = $game_player.screen_y - 85 @icons = [] @pos = [] for i in 0...6 @icons[i] = Sprite.new @icons[i].bitmap = Bitmap.new(24,24) bitmap = Cache.system("Iconset") rect = Rect.new(@icones[i] % 16 * 24, @icones[i] / 16 * 24, 24, 24) @icons[i].bitmap.blt(0, 0, bitmap, rect, ($game_system.save_disabled and i == 3) ? 128 : 255) @pos[i] = (@forma.size/6)*(i+@menu_index)+(@forma.size/12) @pos[i] %= @forma.size @icons[i].x = @forma[@pos[i]][0]+@x @icons[i].y = @forma[@pos[i]][1]+@y end @index = @menu_index @win = Window_Base.new(@x+100,@y+42,300,56+6) @win.opacity = 0 if $game_system.save_disabled and @index == 4 @win.contents.font.color.alpha = 128 else @win.contents.font.color.alpha = 255 end @win.contents.draw_text(30,4,200,24,@nomes[@index]) @win.cursor_rect = Rect.new(0,0,35+@win.contents.text_size(@nomes[@index]).width,30) end def initialize(menu_index = 0) @menu_index = menu_index end def rode(t = "+") Sound.play_cursor Graphics.freeze @win.visible = false Graphics.transition(5) for a in 0...(@forma.size/6/@vel) for i in 0...6 eval("@pos[i] #{t}= @vel") @pos[i] %= @forma.size @icons[i].x = @forma[@pos[i]][0]+@x @icons[i].y = @forma[@pos[i]][1]+@y end Graphics.update end eval("@index #{t}= 1") @index %= 6 Graphics.freeze @win.contents.clear if $game_system.save_disabled and @index == 4 @win.contents.font.color.alpha = 128 else @win.contents.font.color.alpha = 255 end @win.contents.draw_text(30,4,200,24,@nomes[@index]) @win.cursor_rect = Rect.new(0,0,35+@win.contents.text_size(@nomes[@index]).width,30) @win.visible = true Graphics.transition(7) end def update super @win.update if Input.trigger?(Input::B) $scene = Scene_Map.new Sound.play_cancel end rode("+") if Input.press?(Input::UP) rode("-") if Input.press?(Input::DOWN) result if Input.trigger?(Input::C) end def result if $game_system.save_disabled and @index == 4 Sound.play_buzzer return end Sound.play_decision case @index when 0 $scene = Scene_Item.new when 1 $scene = Scene_Skill.new(0) when 2 $scene = Scene_Equip.new(0) when 3 $scene = Scene_Status.new(0) when 4 $scene = Scene_File.new(true, false, false) when 5 $scene = Scene_End.new end end def terminate super for i in 0...6 @icons[i].dispose end @win.dispose @menuback_sprite.dispose end end class Scene_Map < Scene_Base def snapshot_for_background $game_temp.background_bitmap.dispose $game_temp.background_bitmap = Graphics.snap_to_bitmap end end
Scripts RGSS2 for RPG Maker VX by LB is licensed under a Creative Commons Atribuição-Uso Não-Comercial-Compartilhamento pela mesma Licença 2.5 Brasil License. Permissions beyond the scope of this license may be available at ReinoRPG.com | |
|