Jun 19th, 2014
11419 19th Ave SE Suite B101 Everett, WA 98208 Tel: (425) 385-2702. Ring-1 GO TO FORUM. Prices starting from €75.00! Magic/silent bullet and melee through walls, flyhack without kick violation, silent.
Ring Menu Labview
Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
Ring Menu Addon
- #
- # Ring Menu Addon (for PAC Main Menu Ace)
- # By Pacman
- #
- # This script is an addon for PAC Main Menu Ace. This script will only work
- # reliably if you have PAC Main Menu Ace version 1.2 or higher above it in the
- # scripts menu. (To get PAC Main Menu Ace - http://pastebin.com/Z7JN31gT)
- # This script will turn the main menu in to a ring menu reminiscent of SNES-era
- # This script allows for two different radii of the ring - an x-radius and a
- # y-radius. This means it has the capacity to produce ellipses as well as
- # This script can also scale the selected and deselected icons independently;
- #
- #
- modulePAC::MM::RING
- MENU_RADIUS_Y = 64# Y Radius
- MENU_TEXT = true# Show menu text? (true or false)
- MENU_TEXT_SIZE = 18# Menu Text size. integer or nil for default size
- BACKGROUND_ALPHA = 192# integer (0 - 255)
- SCALE_GAIN = 8# pixels gained in big icon scaling
- SCALE_LOSS = 4# pixels lost in small icon scaling
- #
- # END CONFIG
- #
- #------------------------------------------------------------------------------
- # A module that supports floating-point calculations.
- #
- moduleMath
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- ['sin','cos','tan'].each{|type| trig_eval_code = %Q(
- returnself.#{type}(value * PI / 180)
- eval(trig_eval_code)
- end
- #
- #------------------------------------------------------------------------------
- #
- class Window_MenuCommand < Window_Command
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- attr_reader :angle
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- @gosh_dang_it = false
- super(0, 0)
- self.width = Graphics.width
- self.opacity = 0
- refresh
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- return360/ item_max
- #--------------------------------------------------------------------------
- # enabled : Enabled flag. When false, draw semi-transparently.
- #--------------------------------------------------------------------------
- def draw_big_icon(icon_index, x, y, enabled = true)
- rect = Rect.new(icon_index %16*24, icon_index /16*24, 24, 24)
- dest.width = dest.height = (24+PAC::MM::RING::SCALE_GAIN)
- dest.y = y -PAC::MM::RING::SCALE_GAIN/2
- contents.stretch_blt(dest, bitmap, rect, enabled ? 255 : translucent_alpha)
- #--------------------------------------------------------------------------
- # enabled : Enabled flag. When false, draw semi-transparently.
- #--------------------------------------------------------------------------
- def draw_small_icon(icon_index, x, y, enabled = true)
- rect = Rect.new(icon_index %16*24, icon_index /16*24, 24, 24)
- dest.width = dest.height = (24-PAC::MM::RING::SCALE_LOSS)
- dest.y = y +PAC::MM::RING::SCALE_LOSS/2
- contents.stretch_blt(dest, bitmap, rect, translucent_alpha /2)
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- radius = PAC::MM::RING::MENU_RADIUS_X
- yradius *= -1ifPAC::MM::RING::MENU_ICON_PLACEMENT:top
- n = (method_index -self.index)* angle_size +@angle
- cy = yradius *Math.cosd(n)+(Graphics.height/2)
- self.contents.font.color.alpha = enabled ? 255 : 128
- self.contents.font.size = PAC::MM::RING::MENU_TEXT_SIZE|| s
- self.contents.draw_text(Graphics.width/2-80, Graphics.height/2-
- line_height, 160, line_height, PAC::MM::COMMANDS[method_index][0], 1)if
- self.contents.font.size = s
- draw_big_icon(PAC::MM::COMMANDS[method_index][2], cx -12, cy -12,
- else# All other indexes
- draw_small_icon(PAC::MM::COMMANDS[method_index][2], cx -12, cy -12,
- end
- def okay
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- speed = PAC::MM::RING::MENU_SPEED
- @angle+= (reverse ? -angle_size : angle_size)/ speed.to_f
- refresh
- #--------------------------------------------------------------------------
- # aliasing is for chumps
- #--------------------------------------------------------------------------
- super
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- returnif !active
- if Input.trigger?(:LEFT)|| Input.repeat?(:LEFT)|| Input.trigger?(:UP)||
- Sound.play_cursor
- update_spin
- @index-= 1
- @angle = 0
- elsif Input.trigger?(:RIGHT)|| Input.repeat?(:RIGHT)||
- Sound.play_cursor
- update_spin(true)
- @index+= 1
- @angle = 0
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- cursor_right(*args)
- def cursor_up(*args)
- end
- end
- #
- #------------------------------------------------------------------------------
- # This window displays party member status on the menu screen.
- #
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- def initialize(*args)
- self.x = (Graphics.width-self.width)/2
- end
- #
- #------------------------------------------------------------------------------
- #
- class Scene_Menu < Scene_MenuBase
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- alias pac_mm_rm_cmdpnl command_personal
- alias pac_mm_rm_onfc on_formation_cancel
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- pac_mm_rm_strt(*args)
- @command_window.index = (@@last_index ||= 0)
- @status_window.hideunless @@start_personal
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- @background_sprite = Sprite.new
- @background_sprite.bitmap = SceneManager.background_bitmap
- @background_sprite.color.set(16, 16, 16, PAC::MM::RING::BACKGROUND_ALPHA)
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- @command_window.close
- @status_window.open
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- @command_window.close
- @status_window.open
- end
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- pac_mm_opc(*args)
- @command_window.show
- @@start_personal = false
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- pac_mm_rm_onfc(*args)
- @command_window.show
- @@start_personal = false
- #--------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- @@last_index = @command_window.index
- end
- unless$pac[:main_menu]>= 1.2
- msgbox 'You require PAC Main Menu Ace for the Ring Menu script to work.'
- msgbox 'Find the script at http://pastebin.com/Z7JN31gT'; exit
- #
- # END OF SCRIPT
- #
Ring Bros Menu
RAW Paste Data