Advertisement
mikb89

[Ace] Shangai FF13 Equip Menu per MihaChan

May 17th, 2012
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 23.54 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # Shanghai Simple Script - Final Fantasy 13 Equip Menu
  4. # Last Date Updated: 2010.06.05
  5. # Level: Normal
  6. #
  7. # NOTE! This requires Yanfly Engine Ace's Ace Equip Engine script to be
  8. # installed and located above this script to work. This makes your equip menu
  9. # ordered like Final Fantasy 13's.
  10. #
  11. # Converted by mikb89 to work for VX Ace.
  12. # UNOFFICIAL porting, all credits go to Shangai.
  13. #===============================================================================
  14. # Instructions
  15. # -----------------------------------------------------------------------------
  16. # To install this script, open up your script editor and copy/paste this script
  17. # to an open slot below ▼ Materials but above ▼ Main. Remember to save.
  18. #
  19. #===============================================================================
  20.  
  21. $imported = {} if $imported == nil
  22. $imported["FinalFantasy13EquipMenu"] = true
  23.  
  24. module SSS
  25.   # This is the image used for the header and footer of the profile scenes.
  26.   # Must be 544x416 pixels or whatever resolution size you're using.
  27.   MENU_BACK_PROFILE_IMAGE = "ProfileBack"
  28.  
  29.   # This is the image used for the item back image. Must be 286x24 pixels.
  30.   MENU_BACK_PROFILE_ITEM = "ProfileItem"
  31.  
  32.   # This sets the menu help window's text color.
  33.   MENU_HELP_TEXT_COLOR = Color.new(0, 0, 0)
  34.  
  35.   # This is the text format used to write out the current map.
  36.   MENU_LOCATION = "Location: %s"
  37.  
  38.   # This hash sets the image files for your actors. These images must be placed
  39.   # inside of the Graphics\System folder and they have to be 544x416 pixels or
  40.   # whatever resolution size you're using.
  41.   MENU_PROFILE_IMAGES ={
  42.     1 => "Charas",
  43.     2 => "Charas",
  44.     3 => "Charas",
  45.     4 => "Charas",
  46.   } # Remove this and perish.
  47.  
  48.   # This is the text used to write out various equip menu text items.
  49.   MENU_TEXT_EQUIP_STATS1  = "Status"
  50.   MENU_TEXT_EQUIP_STATS2  = "Aptitude Rates"
  51.   MENU_TEXT_EQUIP_EQUIP1  = "Option"
  52.   MENU_TEXT_EQUIP_EQUIP2  = "Equipment"
  53.   MENU_TEXT_EQUIP_APT     = "Aptitude"
  54.   MENU_TEXT_EQUIP_PASSIVE = "Passives Abilities"
  55.  
  56.   # This is the text used to write out the passive names.
  57.   MENU_TEXT_SUPER_GUARD   = "Super Guard"
  58.   MENU_TEXT_FAST_ATTACK   = "Fast Attack"
  59.   MENU_TEXT_DUAL_ATTACK   = "Dual Attack"
  60.   MENU_TEXT_PREVENT_CRI   = "Prevent Critical"
  61.   MENU_TEXT_HALF_MP_COST  = "Half MP Cost"
  62.   MENU_TEXT_PHARMACOLOGY  = "Pharmacology"
  63.   MENU_TEXT_DOUBLE_EXP    = "Double EXP Gain"
  64.   MENU_TEXT_AUTO_HP_REC   = "Auto HP Recover"
  65. end
  66.  
  67. #==============================================================================
  68. # ** Window_Base
  69. #==============================================================================
  70.  
  71. class Window_Base < Window
  72.   WLH = 24
  73.   #--------------------------------------------------------------------------
  74.   # * Object Initialization
  75.   #--------------------------------------------------------------------------
  76.   alias initialize_sss_ff13_equip_menu_window_base initialize unless $@
  77.   def initialize(x, y, width, height)
  78.     initialize_sss_ff13_equip_menu_window_base(x, y, width, height)
  79.     self.opacity = 0 if SceneManager.scene_is?(Scene_Equip)
  80.   end
  81. end
  82.  
  83. #===============================================================================
  84. # ** Window_Equip
  85. #===============================================================================
  86.  
  87. class Window_Equip < Window_Selectable
  88.   #--------------------------------------------------------------------------
  89.   # * Draw Equipment Category
  90.   #--------------------------------------------------------------------------
  91.   def draw_equipment_category
  92.     self.contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  93.     self.contents.font.shadow = true
  94.     dy = 0
  95.     for i in 0..(@actor.equip_type.size)
  96.       self.contents.font.color = normal_color
  97.       if i == 0 and @actor.weapons[0] != nil and @actor.weapons[0].two_handed
  98.         text = @actor.weapons[0].two_hand_text
  99.       elsif i == 0
  100.         text = YEA::EQUIP::TYPE[0][0]
  101.       elsif i == 1 and @actor.two_swords_style
  102.         text = YEA::EQUIP::TYPE[0][0]
  103.       else
  104.         type = @actor.equip_slots[i-1]
  105.         text = YEA::EQUIP::TYPE[type][0]
  106.       end
  107.       self.contents.draw_text(4, dy, 76, WLH, text, 1)
  108.       dy += WLH
  109.     end
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # * Draw Equipment Items
  113.   #--------------------------------------------------------------------------
  114.   def draw_equipment_items
  115.     self.contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  116.     self.contents.font.shadow = false
  117.     dy = 0; dx = 76
  118.     for i in 0..(@actor.equip_type.size)
  119.       self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
  120.       item = @data[i]
  121.       if item == nil
  122.         text = YEA::EQUIP::NOTHING_TEXT
  123.         self.contents.font.color.alpha = 128
  124.         self.contents.draw_text(dx, dy, 196, WLH, text)
  125.       else
  126.         draw_item_name(item, dx, dy)
  127.       end
  128.       dy += WLH
  129.     end
  130.   end
  131.   #--------------------------------------------------------------------------
  132.   # * Draw Item Name
  133.   #--------------------------------------------------------------------------
  134.   def draw_item_name(item, x, y, enabled = true)
  135.     if item != nil
  136.       draw_icon(item.icon_index, x, y, enabled)
  137.       self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
  138.       self.contents.font.color.alpha = enabled ? 255 : 128
  139.       self.contents.draw_text(x + 24, y, 172, WLH, item.name)
  140.     end
  141.   end
  142. end
  143.  
  144. #===============================================================================
  145. # ** Window_Equip_Item
  146. #===============================================================================
  147.  
  148. class Window_Equip_Item < Window_Selectable
  149.   #--------------------------------------------------------------------------
  150.   # * Draw Item
  151.   #--------------------------------------------------------------------------
  152.   def draw_item(index)
  153.     rect = item_rect(index)
  154.     self.contents.clear_rect(rect)
  155.     self.contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  156.     self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
  157.     item = @data[index]
  158.     if item == nil
  159.       draw_icon(YEA::EQUIP::NOTHING_ICON, rect.x+12, rect.y)
  160.       text = YEA::EQUIP::NOTHING_TEXT
  161.       self.contents.draw_text(rect.x+36, rect.y, 172, WLH, text)
  162.       return
  163.     end
  164.     number = $game_party.item_number(item)
  165.     enabled = enable?(item)
  166.     rect.width -= 4
  167.     draw_item_name(item, rect.x+12, rect.y, enabled)
  168.     draw_item_number(rect, item)
  169.   end
  170.   #--------------------------------------------------------------------------
  171.   # * Draw Item Name
  172.   #--------------------------------------------------------------------------
  173.   def draw_item_name(item, x, y, enabled = true)
  174.     if item != nil
  175.       draw_icon(item.icon_index, x, y, enabled)
  176.       self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
  177.       self.contents.font.color.alpha = enabled ? 255 : 128
  178.       self.contents.draw_text(x + 24, y, 172, WLH, item.name)
  179.     end
  180.   end
  181. end
  182.  
  183. #==============================================================================
  184. # ** Window_MenuHelp
  185. #==============================================================================
  186.  
  187. class Window_MenuHelp < Window_Help
  188.   #--------------------------------------------------------------------------
  189.   # * Set Text
  190.   #--------------------------------------------------------------------------
  191.   def set_text(text, align = 0)
  192.     if text != @text or align != @align
  193.       self.contents.clear
  194.       self.contents.font.shadow = false
  195.       self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
  196.       self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
  197.       @text = text
  198.       @align = align
  199.     end
  200.   end
  201. end
  202.  
  203. #==============================================================================
  204. # ** Window_MenuTimer
  205. #==============================================================================
  206.  
  207. class Window_MenuTimer < Window_Base
  208.   #--------------------------------------------------------------------------
  209.   # * Object Initialization
  210.   #--------------------------------------------------------------------------
  211.   def initialize
  212.     super(0, Graphics.height - 60, 120, 56)
  213.     self.contents.font.size = Font.default_size - 4
  214.     self.contents.font.shadow = false
  215.     self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
  216.     refresh
  217.   end
  218.   #--------------------------------------------------------------------------
  219.   # * Refresh
  220.   #--------------------------------------------------------------------------
  221.   def refresh
  222.     self.contents.clear
  223.     format = "%03d:%02d:%02d"
  224.     @game_time = Graphics.frame_count / Graphics.frame_rate
  225.     hours = @game_time / 3600
  226.     minutes = @game_time / 60 % 60
  227.     seconds = @game_time % 60
  228.     text = sprintf(format, hours, minutes, seconds)
  229.     self.contents.draw_text(0, 0, contents.width-4, WLH, text, 2)
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # * Update
  233.   #--------------------------------------------------------------------------
  234.   def update
  235.     super
  236.     refresh if @game_time != (Graphics.frame_count / Graphics.frame_rate)
  237.   end
  238. end
  239.  
  240. #==============================================================================
  241. # ** Window_MenuGold
  242. #==============================================================================
  243.  
  244. class Window_MenuGold < Window_Base
  245.   #--------------------------------------------------------------------------
  246.   # * Object Initialization
  247.   #--------------------------------------------------------------------------
  248.   def initialize
  249.     super(100, Graphics.height - 60, 120, 56)
  250.     self.contents.font.size = Font.default_size - 4
  251.     self.contents.font.shadow = false
  252.     self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
  253.     refresh
  254.   end
  255.   #--------------------------------------------------------------------------
  256.   # * Refresh
  257.   #--------------------------------------------------------------------------
  258.   def refresh
  259.     self.contents.clear
  260.     text = sprintf("%d%s", $game_party.gold, Vocab::currency_unit)
  261.     self.contents.draw_text(0, 0, contents.width-4, WLH, text, 0)
  262.   end
  263. end
  264.  
  265. #==============================================================================
  266. # ** Window_MenuLocation
  267. #==============================================================================
  268.  
  269. class Window_MenuLocation < Window_Base
  270.   #--------------------------------------------------------------------------
  271.   # * Object Initialization
  272.   #--------------------------------------------------------------------------
  273.   def initialize
  274.     super(Graphics.width/2-16, Graphics.height - 60, Graphics.width/2+16, 56)
  275.     self.contents.font.size = Font.default_size - 4
  276.     self.contents.font.shadow = false
  277.     self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
  278.     refresh
  279.   end
  280.   #--------------------------------------------------------------------------
  281.   # * Refresh
  282.   #--------------------------------------------------------------------------
  283.   def refresh
  284.     self.contents.clear
  285.     text = sprintf(SSS::MENU_LOCATION, $game_map.display_name)
  286.     self.contents.draw_text(4, 0, contents.width, WLH, text, 0)
  287.   end
  288. end
  289.  
  290. #==============================================================================
  291. # ** Window_Equip
  292. #==============================================================================
  293.  
  294. class Window_Equip < Window_Selectable
  295.   #--------------------------------------------------------------------------
  296.   # * Refresh
  297.   #--------------------------------------------------------------------------
  298.   alias refresh_sss_ff13_equip_menu refresh unless $@
  299.   def refresh
  300.     if SceneManager.scene_is?(Scene_Equip) and not SceneManager.scene.passives_window.nil?
  301.       SceneManager.scene.passives_window.refresh
  302.     end
  303.     refresh_sss_ff13_equip_menu
  304.   end
  305. end
  306.  
  307. #==============================================================================
  308. # ** Window_Underscore
  309. #==============================================================================
  310.  
  311. class Window_Underscore < Window_Base
  312.   #--------------------------------------------------------------------------
  313.   # * Object Initialization
  314.   #--------------------------------------------------------------------------
  315.   def initialize(align = 0)
  316.     super(0, 0, Graphics.width, 56)
  317.     @align = align
  318.     refresh
  319.   end
  320.   #--------------------------------------------------------------------------
  321.   # * Refresh
  322.   #--------------------------------------------------------------------------
  323.   def refresh
  324.     self.contents.clear
  325.     self.contents.font.name = ["UmePlus Gothic", "Courier New"]
  326.     self.contents.font.size += 4
  327.     text = "―――――――――――――――――――――――――――――――――――――――――――――――――――――――"
  328.     self.contents.draw_text(0, 0, contents.width, WLH, text, @align)
  329.   end
  330. end
  331.  
  332. #==============================================================================
  333. # ** Window_MenuEquipPassives
  334. #==============================================================================
  335.  
  336. class Window_MenuEquipPassives < Window_Base
  337.   #--------------------------------------------------------------------------
  338.   # * Object Initialization
  339.   #--------------------------------------------------------------------------
  340.   def initialize(yy, actor)
  341.     super(Graphics.width-240, yy, 240, 6*24+32)
  342.     #refresh(actor)
  343.   end
  344.   #--------------------------------------------------------------------------
  345.   # * Refresh
  346.   #--------------------------------------------------------------------------
  347.   def refresh(actor)
  348.     self.contents.clear
  349.     self.contents.font.color = normal_color
  350.     self.contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  351.     yy = WLH
  352.     xx = 12
  353.     if actor.super_guard
  354.       text = SSS::MENU_TEXT_SUPER_GUARD
  355.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  356.       yy += WLH
  357.     end
  358.     if actor.fast_attack
  359.       text = SSS::MENU_TEXT_FAST_ATTACK
  360.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  361.       yy += WLH
  362.     end
  363.     if actor.dual_attack
  364.       text = SSS::MENU_TEXT_DUAL_ATTACK
  365.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  366.       yy += WLH
  367.     end
  368.     if actor.prevent_critical
  369.       text = SSS::MENU_TEXT_PREVENT_CRI
  370.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  371.       yy += WLH
  372.     end
  373.     if actor.half_mp_cost
  374.       text = SSS::MENU_TEXT_HALF_MP_COST
  375.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  376.       yy += WLH
  377.     end
  378.     if actor.pharmacology
  379.       text = SSS::MENU_TEXT_PHARMACOLOGY
  380.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  381.       yy += WLH
  382.     end
  383.     if actor.double_exp_gain
  384.       text = SSS::MENU_TEXT_DOUBLE_EXP
  385.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  386.       yy += WLH
  387.     end
  388.     if actor.auto_hp_recover
  389.       text = SSS::MENU_TEXT_AUTO_HP_REC
  390.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  391.       yy += WLH
  392.     end
  393.     for state in actor.equip_autostates
  394.       text = state.name
  395.       self.contents.draw_text(xx, yy, contents.width, WLH, text)
  396.       yy += WLH
  397.     end
  398.   end
  399. end
  400.  
  401. #===============================================================================
  402. # Override Equipment Overhaul Settings
  403. #===============================================================================
  404.  
  405. YEA::EQUIP::STATUS_FONT_SIZE = 16
  406.  
  407. #==============================================================================
  408. # ** Scene_Equip
  409. #==============================================================================
  410.  
  411. class Scene_Equip
  412.   #--------------------------------------------------------------------------
  413.   # public instance variables
  414.   #--------------------------------------------------------------------------
  415.   attr_accessor :actor
  416.   attr_accessor :passives_window
  417.   #--------------------------------------------------------------------------
  418.   # * Start
  419.   #--------------------------------------------------------------------------
  420.   alias start_sss_ff13_equip_menu start unless $@
  421.   def start
  422.     start_sss_ff13_equip_menu
  423.     @menuback_sprite.dispose unless @menuback_sprite.nil?
  424.     @menuback_sprite = Sprite.new(@viewport)
  425.     start_ff13_menu_style
  426.     load_actor
  427.     create_background
  428.   end
  429.   #--------------------------------------------------------------------------
  430.   # * Start Final Fantasy 13 Menu Style
  431.   #--------------------------------------------------------------------------
  432.   def start_ff13_menu_style
  433.     @actor_window.x = Graphics.width + 2 # get rid u.u
  434.     @gold_window = Window_MenuGold.new
  435.     @menu_timer_window = Window_MenuTimer.new
  436.     @location_window = Window_MenuLocation.new
  437.     @help_window.dispose if @help_window != nil
  438.     @help_window = Window_MenuHelp.new
  439.     @help_window.x += 48
  440.     @help_window.width -= 48
  441.     @help_window.create_contents
  442.     @help_window.contents.font.size = Font.default_size - 4
  443.     @item_window.help_window = @slot_window.help_window = @help_window
  444.     @command_window.y = @help_window.height+2 - 14
  445.     @command_window.x += (Graphics.width-240-@command_window.width-32)/2
  446.     @help_window.y += 12
  447.     @item_window.height = (@item_window.height-32)/24
  448.     @item_window.height = @item_window.height*24+32
  449.     @status_window.y = @command_window.y + 2
  450.     @status_window.x -= 4
  451.     create_underscore_windows
  452.     create_dummy_text_windows
  453.     create_item_image
  454.     passives_y = @underscore_window2.y+10
  455.     @passives_window = Window_MenuEquipPassives.new(passives_y-24, @actor)
  456.     item_window_height = @command_window.y + @command_window.height - 25 - 16
  457.     @help_window.y = 12
  458.     @slot_window.y = item_window_height
  459.     @item_window.y = @slot_window.y
  460.     @slot_window.width -= 40
  461.     @item_window.width = @slot_window.width
  462.     @item_window.arrows_visible = false
  463.     @slot_window.arrows_visible = false
  464.     @slot_window.update_help
  465.     unless @dummy_stats4_window.nil?
  466.       @dummy_stats4_window.contents.clear
  467.       rect = Rect.new(0, 0, @dummy_stats4_window.contents.width, 24)
  468.       text = SSS::MENU_TEXT_EQUIP_STATS1
  469.       @dummy_stats4_window.contents.draw_text(rect, text, 0)
  470.     end
  471.     unless @item_back_sprite.nil?
  472.       @item_back_sprite.y = item_window_height+16-4
  473.     end
  474.     @status_window.z += 100000
  475.     @help_window.z += 100000
  476.   end
  477.   #--------------------------------------------------------------------------
  478.   # * Create Underscore Windows
  479.   #--------------------------------------------------------------------------
  480.   def create_underscore_windows
  481.     @underscore_window1 = Window_Underscore.new(2)
  482.     @underscore_window2 = Window_Underscore.new(0)
  483.     @underscore_window3 = Window_Underscore.new(0)
  484.     @underscore_window4 = Window_Underscore.new(2)
  485.     @underscore_window1.y = @command_window.y + @command_window.height - 40 - 16
  486.     @underscore_window1.x = -Graphics.width/3-60
  487.     @underscore_window2.y = @status_window.height + @status_window.y - 24
  488.     @underscore_window2.x = @underscore_window1.x + @underscore_window1.width-2
  489.     @underscore_window3.x = @underscore_window1.x
  490.     @underscore_window3.y = @help_window.y + @help_window.height-24 - 14
  491.     @underscore_window4.x = @underscore_window2.x
  492.     @underscore_window4.y = @underscore_window3.y
  493.     for w in [@underscore_window1,@underscore_window2,@underscore_window3,@underscore_window4]
  494.       w.z += 100000
  495.     end
  496.   end
  497.   #--------------------------------------------------------------------------
  498.   # * Create Dummy Text Windows
  499.   #--------------------------------------------------------------------------
  500.   def create_dummy_text_windows
  501.     # Lower Left
  502.     @dummy_stats1_window = Window_Base.new(0, 0, Graphics.width, 56)
  503.     @dummy_stats1_window.contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  504.     rect = Rect.new(0, 0, @dummy_stats1_window.contents.width, 24)
  505.     text = SSS::MENU_TEXT_EQUIP_EQUIP2
  506.     @dummy_stats1_window.contents.draw_text(rect, text, 2)
  507.     @dummy_stats1_window.x = @underscore_window1.x-4
  508.     @dummy_stats1_window.y = @underscore_window1.y-8
  509.     # Lower Right
  510.     @dummy_stats2_window = Window_Base.new(0, 0, Graphics.width, 56)
  511.     @dummy_stats2_window.contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  512.     rect = Rect.new(0, 0, @dummy_stats2_window.contents.width, 24)
  513.     text = SSS::MENU_TEXT_EQUIP_PASSIVE
  514.     @dummy_stats2_window.contents.draw_text(rect, text, 0)
  515.     @dummy_stats2_window.x = @underscore_window2.x+4
  516.     @dummy_stats2_window.y = @underscore_window2.y-8
  517.     # Upper Left
  518.     @dummy_stats3_window = Window_Base.new(0, 0, Graphics.width, 56)
  519.     @dummy_stats3_window.contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  520.     rect = Rect.new(0, 0, @dummy_stats3_window.contents.width, 24)
  521.     text = SSS::MENU_TEXT_EQUIP_EQUIP1
  522.     @dummy_stats3_window.contents.draw_text(rect, text, 2)
  523.     @dummy_stats3_window.x = @underscore_window3.x-4
  524.     @dummy_stats3_window.y = @underscore_window3.y-8
  525.     # Upper Right
  526.     @dummy_stats4_window = Window_Base.new(0, 0, Graphics.width, 56)
  527.     @dummy_stats4_window.contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  528.     rect = Rect.new(0, 0, @dummy_stats4_window.contents.width, 24)
  529.     text = SSS::MENU_TEXT_EQUIP_STATS1
  530.     @dummy_stats4_window.contents.draw_text(rect, text, 0)
  531.     @dummy_stats4_window.x = @underscore_window4.x+4
  532.     @dummy_stats4_window.y = @underscore_window4.y-8
  533.     for w in [@dummy_stats1_window,@dummy_stats2_window,@dummy_stats3_window,@dummy_stats4_window]
  534.       w.z += 100000
  535.     end
  536.   end
  537.   #--------------------------------------------------------------------------
  538.   # * Create Item Image
  539.   #--------------------------------------------------------------------------
  540.   def create_item_image
  541.     @item_back_sprite = Sprite.new(@viewport)
  542.     bitmap_w = 286
  543.     bitmap_h = (@slot_window.height-32)/24
  544.     @item_back_sprite.bitmap = Bitmap.new(bitmap_w, bitmap_h*24)
  545.     rect = Rect.new(0, 0, 286, 24)
  546.     source = Cache.system(SSS::MENU_BACK_PROFILE_ITEM)
  547.     yy = 0
  548.     bitmap_h.times do
  549.       @item_back_sprite.bitmap.blt(0, yy, source, rect)
  550.       yy += 24
  551.     end
  552.   end
  553.   #--------------------------------------------------------------------------
  554.   # * Create Background for Menu Screen
  555.   #--------------------------------------------------------------------------
  556.   def create_background
  557.     super
  558.     @background_sprite.color.set(0, 0, 0, 0)
  559.     b = Cache.system(SSS::MENU_BACK_PROFILE_IMAGE)
  560.     @background_sprite.bitmap.blt(0,0,b,b.rect,128)
  561.   end
  562.   #--------------------------------------------------------------------------
  563.   # * Change actor
  564.   #--------------------------------------------------------------------------
  565.   alias_method :ff13_eqp_on_act_chg, :on_actor_change unless method_defined?(:ff13_eqp_on_act_chg)
  566.   def on_actor_change
  567.     ff13_eqp_on_act_chg
  568.     @status_window.actor = @actor
  569.     load_actor
  570.     @status_window.activate
  571.   end
  572.   #--------------------------------------------------------------------------
  573.   # * Load actor
  574.   #--------------------------------------------------------------------------
  575.   def load_actor
  576.     filename = SSS::MENU_PROFILE_IMAGES[@actor.id]
  577.     filename = SSS::MENU_PROFILE_IMAGES[1] if filename.nil?
  578.     @menuback_sprite.bitmap.dispose if @menuback_sprite.bitmap != nil
  579.     @menuback_sprite.bitmap = Cache.system(filename).clone
  580.     blur_times = 2
  581.     blur_times.times do @menuback_sprite.bitmap.blur end
  582.     @menuback_sprite.color.set(16, 16, 16, 64)
  583.   end
  584. end
  585.  
  586. #===============================================================================
  587. #
  588. # END OF FILE
  589. #
  590. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement