Advertisement
thiago_d_d

Super Menu XP

Jan 16th, 2013
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 24.47 KB | None | 0 0
  1. #===============================================================================
  2. #  http://thiagodd.blogspot.com.br
  3. # [TSDA] Super Menu
  4. #   by thiago_d_d
  5. #
  6. # -----------------------------------------------------------------------------
  7. # * Features
  8. # -----------------------------------------------------------------------------
  9. #  + No options limits(you can add custom options, easily)
  10. #  + Custom BGs.
  11. #  + These options can be activated by switches.
  12. #  + Changes the Equipments,Habilities,etc options by one option only.
  13. #  + New status menu.
  14. #
  15. # -----------------------------------------------------------------------------
  16. # * Install
  17. # -----------------------------------------------------------------------------
  18. #  Put this script in the aditional scripts section.
  19. #
  20. # -----------------------------------------------------------------------------
  21. # * Configuration
  22. # -----------------------------------------------------------------------------
  23. #  ----To add new options
  24. #  Add an line in this format to the end of this script
  25. #    $game_menu.add_option(name,code,switch_id)
  26. #       in the place of name put the option name
  27. #       --
  28. #       in the place of code put the code that will be executed when the option is
  29. #       activated
  30. #       --
  31. #       in the place of switch_id put the switch id that will activate/deactivate
  32. #       the option, or put nil if you don't want to use switches.
  33. #
  34. #  ----Example
  35. #    $game_menu.add_option("Monsters","$scene = Bestiary.new",nil)
  36. #
  37. #  OBS: The commands order depends on the order you put these lines.
  38. #===============================================================================
  39. module TSDA
  40.   #Background
  41.   #This can be "Black", so there is no BG
  42.   #This can be "Map", so the BG will be the map
  43.   #This can be an image name, so the BG will be custom
  44.   MENU_BACK = "Map"
  45.   #Windows Opacity
  46.   HMENU_OPACITY = 200
  47.   #Use faces?
  48.   USEH_FACES = false
  49.   #If you want to use faces, where they should be?
  50.   #OBS: Faces must have same name as the characters graphics, for example
  51.   #001-Fighter01
  52.   FACESH_PATH = "Faces"  #in this case, the faces must be in Graphics\Faces
  53.   #Vocabulary
  54.   PlayTime = "Tempo de jogo"
  55.   Steps = "Passos"
  56.   Chars = "Heróis"
  57.   Atrib = "Atributos"
  58.   Exper = "Experiência"
  59.   Equipm = "Equipamentos"
  60. end
  61. #-------------------------------------------------------------------------------
  62. class Game_Option
  63.   attr_reader    :name
  64.   attr_reader    :code
  65.   attr_reader    :switch
  66.   #-----------------------------------------------------------------------------
  67.   def initialize(option_name,option_code,switch_id)
  68.     @name = option_name
  69.     @code = option_code
  70.     @switch = switch_id
  71.   end
  72. end
  73. #-------------------------------------------------------------------------------
  74. class Game_Menu
  75.   attr_reader    :options
  76.   attr_accessor  :last_index
  77.   #-----------------------------------------------------------------------------
  78.   def initialize
  79.     @options = []
  80.     @last_index = 0
  81.   end
  82.   #-----------------------------------------------------------------------------
  83.   def add_option(option_name,option_code,switch_id)
  84.     option = Game_Option.new(option_name,option_code,switch_id)
  85.     @options.push(option)
  86.   end
  87. end
  88. $game_menu = Game_Menu.new
  89. #-------------------------------------------------------------------------------
  90. class Scene_Menu
  91.   def initialize(menu_index=nil)
  92.     @menu_index = $game_menu.last_index
  93.     $game_menu.last_index = 0
  94.   end
  95.   def main
  96.     start
  97.     Graphics.transition
  98.     loop do
  99.       Graphics.update
  100.       Input.update
  101.       update
  102.       if $scene != self
  103.         break
  104.       end
  105.     end
  106.     terminate
  107.   end
  108.   def create_menu_background
  109.     if TSDA::MENU_BACK == "Map"
  110.       @menuback_sprite = Spriteset_Map.new
  111.     elsif TSDA::MENU_BACK != "Black"
  112.       @menuback_sprite = Sprite.new
  113.       @menuback_sprite.bitmap = RPG::Cache.picture(TSDA::MENU_BACK)
  114.     end
  115.     update_menu_background
  116.   end
  117.   def dispose_menu_background
  118.     if @menuback_sprite != nil
  119.       @menuback_sprite.dispose
  120.     end
  121.   end
  122.   def update_menu_background
  123.     if @menuback_sprite != nil
  124.       @menuback_sprite.update
  125.     end
  126.   end
  127.   #-----------------------------------------------------------------------------
  128.   def start
  129.     create_menu_background
  130.     @command_window = Window_MenuCommand.new
  131.     @command_window.index = @menu_index
  132.     @command_window.opacity = TSDA::HMENU_OPACITY
  133.     @command_window.back_opacity = TSDA::HMENU_OPACITY
  134.     @time_window = Window_PlayTime.new
  135.     @time_window.opacity = TSDA::HMENU_OPACITY
  136.     @time_window.back_opacity = TSDA::HMENU_OPACITY
  137.     @steps_window = Window_Steps.new
  138.     @steps_window.opacity = TSDA::HMENU_OPACITY
  139.     @steps_window.back_opacity = TSDA::HMENU_OPACITY
  140.     @gold_window = Window_Gold.new
  141.     @gold_window.x = 32
  142.     @gold_window.y = 216
  143.     @gold_window.opacity = TSDA::HMENU_OPACITY
  144.     @gold_window.back_opacity = TSDA::HMENU_OPACITY
  145.     @status_window = Window_MenuStatus.new
  146.     @status_window.x = 192
  147.     @status_window.y = 32
  148.     @status_window.opacity = TSDA::HMENU_OPACITY
  149.     @status_window.back_opacity = TSDA::HMENU_OPACITY
  150.   end
  151.   #-----------------------------------------------------------------------------
  152.   def terminate
  153.     dispose_menu_background
  154.     @command_window.dispose
  155.     @time_window.dispose
  156.     @steps_window.dispose
  157.     @gold_window.dispose
  158.     @status_window.dispose
  159.   end
  160.   #-----------------------------------------------------------------------------
  161.   def update
  162.     update_menu_background
  163.     @command_window.update
  164.     @time_window.update
  165.     @steps_window.update
  166.     @gold_window.update
  167.     @status_window.update
  168.     if @command_window.active
  169.       update_command_selection
  170.     elsif @status_window.active
  171.       update_actor_selection
  172.     end
  173.   end
  174.   #-----------------------------------------------------------------------------
  175.   def update_command_selection
  176.     if Input.trigger?(Input::B)
  177.       $game_system.se_play($data_system.cancel_se)
  178.       $scene = Scene_Map.new
  179.     elsif Input.trigger?(Input::C)
  180.       if $game_party.actors.size == 0 and @command_window.index < 4
  181.         $game_system.se_play($data_system.buzzer_se)
  182.         return
  183.       elsif $game_system.save_disabled and @command_window.index == 4
  184.         $game_system.se_play($data_system.buzzer_se)
  185.         return
  186.       end
  187.       case @command_window.index
  188.       when 0
  189.         $game_system.se_play($data_system.decision_se)
  190.         $scene = Scene_Item.new
  191.         $game_menu.last_index = 0
  192.         return
  193.       when 1
  194.         $game_system.se_play($data_system.decision_se)
  195.         start_actor_selection
  196.         return
  197.       when 2
  198.         $game_system.se_play($data_system.decision_se)
  199.         $scene = Scene_Save.new
  200.         $game_menu.last_index = 2
  201.         return
  202.       end
  203.       options_number = $game_menu.options.size
  204.       if @command_window.index == 3 + options_number
  205.         $game_system.se_play($data_system.decision_se)
  206.         $scene = Scene_End.new
  207.         $game_menu.last_index = 3 + options_number
  208.         return
  209.       end
  210.       selected_index = 3 - @command_window.index
  211.       option = $game_menu.options[selected_index]
  212.       if option.switch != nil
  213.         switch = $game_switches[option.switch]
  214.         unless switch
  215.           $game_system.se_play($data_system.buzzer_se)
  216.           return
  217.         end
  218.       end
  219.       $game_system.se_play($data_system.decision_se)
  220.       $game_menu.last_index = @command_window.index
  221.       eval(option.code)
  222.     end
  223.   end
  224.   def start_actor_selection
  225.     @command_window.active = false
  226.     @status_window.active = true
  227.     @status_window.index = 0
  228.   end
  229.   #-----------------------------------------------------------------------------
  230.   def update_actor_selection
  231.     if Input.trigger?(Input::B)
  232.       $game_system.se_play($data_system.cancel_se)
  233.       end_actor_selection
  234.     elsif Input.trigger?(Input::C)
  235.       $game_system.se_play($data_system.decision_se)
  236.       $game_menu.last_index = 1
  237.       $scene = Scene_Chars.new(@status_window.index)
  238.     end
  239.   end
  240.   def end_actor_selection
  241.     @command_window.active = true
  242.     @status_window.active = false
  243.     @status_window.index = -1
  244.   end
  245. end
  246. #-------------------------------------------------------------------------------
  247. class Window_Base
  248.   def disabled_color
  249.     return Color.new(normal_color.red,normal_color.green,normal_color.blue,128)
  250.   end
  251.   #-----------------------------------------------------------------------------
  252.   def orange_color
  253.     return Color.new(255,126,0)
  254.   end
  255.   def draw_actor_face(actor, x, y, size = 96)
  256.     bitmap = RPG::Cache.load_bitmap("Graphics/" + TSDA::FACESH_PATH + "/",
  257.     actor.character_name)
  258.     rect = Rect.new(0, 0, 0, 0)
  259.     rect.width = size
  260.     rect.height = size
  261.     self.contents.blt(x, y, bitmap, rect)
  262.     bitmap.dispose
  263.   end
  264. end
  265. #-------------------------------------------------------------------------------
  266. class Window_MenuCommand < Window_Selectable
  267.   def initialize
  268.     super(32,272,160,176)
  269.     @index = 0
  270.     refresh
  271.   end
  272.   def update_cursor_rect
  273.     if @index < 0
  274.       self.cursor_rect.empty
  275.     else
  276.       row = @index / @column_max
  277.       if row < top_row
  278.         self.top_row = row
  279.       end
  280.       if row > bottom_row
  281.         self.bottom_row = row
  282.       end
  283.       rect = item_rect(@index)
  284.       rect.y -= self.oy
  285.       self.cursor_rect = rect
  286.     end
  287.   end
  288.   def item_rect(index)
  289.     rect = Rect.new(0, 0, 0, 0)
  290.     rect.width = (self.contents.width) / @column_max
  291.     rect.height = 24
  292.     rect.x = index % @column_max * (rect.width)
  293.     rect.y = index / @column_max * 24
  294.     return rect
  295.   end
  296.   def row_max
  297.     return (@item_max + @column_max - 1) / @column_max
  298.   end
  299.   def top_row
  300.     return self.oy / 24
  301.   end
  302.   def top_row=(row)
  303.     row = 0 if row < 0
  304.     row = row_max - 1 if row > row_max - 1
  305.     self.oy = row * 24
  306.   end
  307.   def page_row_max
  308.     return (self.height - 32) / 24
  309.   end
  310.   def page_item_max
  311.     return page_row_max * @column_max
  312.   end
  313.   def bottom_row
  314.     return top_row + page_row_max - 1
  315.   end
  316.   def bottom_row=(row)
  317.     self.top_row = row - (page_row_max - 1)
  318.   end
  319.   #-----------------------------------------------------------------------------
  320.   def refresh
  321.     s1 = $data_system.words.item
  322.     s2 = TSDA::Chars
  323.     s3 = "Salvar"
  324.     ends = "Sair"
  325.     @item_max = 4 + $game_menu.options.size
  326.     self.contents = Bitmap.new(width - 32,height - 32 + (@item_max - 6) * 24)
  327.     if $game_party.actors.size == 0
  328.       self.contents.font.color = disabled_color
  329.     else
  330.       self.contents.font.color = normal_color
  331.     end
  332.     self.contents.draw_text(item_rect(0),s1)
  333.     self.contents.draw_text(item_rect(1),s2)
  334.     if $game_system.save_disabled
  335.       self.contents.font.color = disabled_color
  336.     else
  337.       self.contents.font.color = normal_color
  338.     end
  339.     self.contents.draw_text(item_rect(2),s3)
  340.     item_count = 0
  341.     for i in $game_menu.options
  342.       if i.switch != nil
  343.         if $game_switches[i.switch]
  344.           self.contents.font.color = normal_color
  345.         else
  346.           self.contents.font.color = disabled_color
  347.         end
  348.       else
  349.         self.contents.font.color = normal_color
  350.       end
  351.       self.contents.draw_text(item_rect(3 + item_count),i.name)
  352.       item_count += 1
  353.     end
  354.     self.contents.font.color = normal_color
  355.     self.contents.draw_text(item_rect(3 + item_count),ends)
  356.   end
  357. end
  358. #-------------------------------------------------------------------------------
  359. class Game_Map
  360.   alias hyper_menu_initialize initialize
  361.   def initialize
  362.     hyper_menu_initialize
  363.     @map_infos = load_data("Data/MapInfos.rxdata")
  364.   end
  365.   #-----------------------------------------------------------------------------
  366.   def map_name
  367.     return @map_infos[@map_id].name
  368.   end
  369. end
  370. #-------------------------------------------------------------------------------
  371. class Window_PlayTime < Window_Base
  372.   def initialize
  373.     super(32,32,160,104)
  374.     self.contents = Bitmap.new(width - 32,height - 32)
  375.     refresh
  376.   end
  377.   #-----------------------------------------------------------------------------
  378.   def update
  379.     super
  380.     if Graphics.frame_count / Graphics.frame_rate != @total_sec
  381.       refresh
  382.     end
  383.   end
  384.   #-----------------------------------------------------------------------------
  385.   def refresh
  386.     self.contents.clear
  387.     self.contents.font.color = orange_color
  388.     self.contents.draw_text(0,0,128,24,$game_map.map_name,1)
  389.     self.contents.font.color = system_color
  390.     self.contents.draw_text(0, 24, 128, 24, TSDA::PlayTime,1)
  391.     @total_sec = Graphics.frame_count / Graphics.frame_rate
  392.     hour = @total_sec / 60 / 60
  393.     min = @total_sec / 60 % 60
  394.     sec = @total_sec % 60
  395.     text = sprintf("%02d:%02d:%02d", hour, min, sec)
  396.     self.contents.font.color = normal_color
  397.     self.contents.draw_text(0, 24 * 2, 128, 24, text, 1)
  398.   end
  399. end
  400. class Window_Gold < Window_Base
  401.   def initialize
  402.     super(32, 32, 160, 56)
  403.     self.contents = Bitmap.new(width - 32, height - 32)
  404.         self.contents.font.name = $fontface
  405.     self.contents.font.size = $fontsize
  406.     refresh
  407.   end
  408.   def refresh
  409.     self.contents.clear
  410.     cx = contents.text_size($data_system.words.gold).width
  411.     self.contents.font.color = normal_color
  412.     self.contents.draw_text(4, 0, 120-cx-2, 24, $game_party.gold.to_s, 2)
  413.     self.contents.font.color = system_color
  414.     self.contents.draw_text(124-cx, 0, cx, 24, $data_system.words.gold, 2)
  415.   end
  416. end
  417. #-------------------------------------------------------------------------------
  418. class Window_Steps < Window_Base
  419.   def initialize
  420.     super(32, 136, 160, 80)
  421.     self.contents = Bitmap.new(width - 32,height - 32)
  422.     refresh
  423.   end
  424.   #-----------------------------------------------------------------------------
  425.   def refresh
  426.     self.contents.clear
  427.     self.contents.font.color = system_color
  428.     self.contents.draw_text(0, 0, 128, 24, TSDA::Steps,1)
  429.     self.contents.font.color = normal_color
  430.     self.contents.draw_text(0, 24, 128, 24, $game_party.steps.to_s, 1)
  431.   end
  432. end
  433. #-------------------------------------------------------------------------------
  434. class Scene_Chars
  435.   def initialize(actor_index = 0,menu_index = 0)
  436.     @actor_index = actor_index
  437.     @menu_index = menu_index
  438.   end
  439.   def main
  440.     start
  441.     Graphics.transition
  442.     loop do
  443.       Graphics.update
  444.       Input.update
  445.       update
  446.       if $scene != self
  447.         break
  448.       end
  449.     end
  450.     terminate
  451.   end
  452.   def create_menu_background
  453.     if TSDA::MENU_BACK == "Map"
  454.       @menuback_sprite = Spriteset_Map.new
  455.     elsif TSDA::MENU_BACK != "Black"
  456.       @menuback_sprite = Sprite.new
  457.       @menuback_sprite.bitmap = RPG::Cache.picture(TSDA::MENU_BACK)
  458.     end
  459.     update_menu_background
  460.   end
  461.   def dispose_menu_background
  462.     if @menuback_sprite != nil
  463.       @menuback_sprite.dispose
  464.     end
  465.   end
  466.   def update_menu_background
  467.     if @menuback_sprite != nil
  468.       @menuback_sprite.update
  469.     end
  470.   end
  471.   #-----------------------------------------------------------------------------
  472.   def start
  473.     create_menu_background
  474.     actor = $game_party.actors[@actor_index]
  475.     @status_window = Window_StatusMenu.new(48,32,544,164,actor)
  476.     @status_window.opacity = TSDA::HMENU_OPACITY
  477.     @status_window.back_opacity = TSDA::HMENU_OPACITY
  478.     @exp_window = Window_ExpStatus.new(48,276,212,172,actor)
  479.     @exp_window.opacity = TSDA::HMENU_OPACITY
  480.     @exp_window.back_opacity = TSDA::HMENU_OPACITY
  481.     @equip_window = Window_EquipHab.new(260,196,332,252,actor)
  482.     @equip_window.opacity = TSDA::HMENU_OPACITY
  483.     @equip_window.back_opacity = TSDA::HMENU_OPACITY
  484.     s1 = "Habilidades"
  485.     s2 = "Equipamento"
  486.     @command_window = Window_Command_Special.new(212, [s1,s2])
  487.     @command_window.x = 48
  488.     @command_window.y = 196
  489.     @command_window.index = @menu_index
  490.     @command_window.opacity = TSDA::HMENU_OPACITY
  491.     @command_window.back_opacity = TSDA::HMENU_OPACITY
  492.   end
  493.   #-----------------------------------------------------------------------------
  494.   def terminate
  495.     dispose_menu_background
  496.     @status_window.dispose
  497.     @command_window.dispose
  498.     @exp_window.dispose
  499.     @equip_window.dispose
  500.   end
  501.   #-----------------------------------------------------------------------------
  502.   def update
  503.     update_menu_background
  504.     @status_window.update
  505.     @command_window.update
  506.     @exp_window.update
  507.     @equip_window.update
  508.     if Input.trigger?(Input::B)
  509.       $game_system.se_play($data_system.cancel_se)
  510.       return_scene
  511.     elsif Input.trigger?(Input::R)
  512.       $game_system.se_play($data_system.cursor_se)
  513.       next_actor
  514.     elsif Input.trigger?(Input::L)
  515.       $game_system.se_play($data_system.cursor_se)
  516.       prev_actor
  517.     elsif Input.trigger?(Input::C)
  518.       if @command_window.index == 1
  519.         $game_system.se_play($data_system.decision_se)
  520.         $scene = Scene_Equip.new(@actor_index)
  521.       else
  522.         $game_system.se_play($data_system.decision_se)
  523.         $scene = Scene_Skill.new(@actor_index)
  524.       end
  525.     end
  526.   end
  527.   #-----------------------------------------------------------------------------
  528.   def return_scene
  529.     $scene = Scene_Menu.new(3)
  530.   end
  531.   #-----------------------------------------------------------------------------
  532.   def next_actor
  533.     @actor_index += 1
  534.     @actor_index %= $game_party.actors.size
  535.     $scene = Scene_Chars.new(@actor_index)
  536.   end
  537.   #-----------------------------------------------------------------------------
  538.   def prev_actor
  539.     @actor_index += $game_party.actors.size - 1
  540.     @actor_index %= $game_party.actors.size
  541.     $scene = Scene_Chars.new(@actor_index)
  542.   end
  543. end
  544. class Window_Command_Special < Window_Selectable
  545.   attr_reader   :commands
  546.   def initialize(width, commands)
  547.     super(0, 0, width, 48 + 32)
  548.     self.contents = Bitmap.new(width - 32,height - 32)
  549.     @commands = commands
  550.     @item_max = commands.size
  551.     refresh
  552.     self.index = 0
  553.   end
  554.   def update_cursor_rect
  555.     if @index < 0
  556.       self.cursor_rect.empty
  557.     else
  558.       rect = item_rect(@index)
  559.       rect.y -= self.oy
  560.       self.cursor_rect = rect
  561.     end
  562.   end
  563.   def item_rect(index)
  564.     rect = Rect.new(0, 0, 0, 0)
  565.     rect.width = (self.contents.width) / @column_max
  566.     rect.height = 24
  567.     rect.x = index % @column_max * (rect.width)
  568.     rect.y = index / @column_max * 24
  569.     return rect
  570.   end
  571.   def refresh
  572.     self.contents.clear
  573.     for i in 0...@item_max
  574.       draw_item(i)
  575.     end
  576.   end
  577.   def draw_item(index, enabled = true)
  578.     rect = item_rect(index)
  579.     rect.x += 4
  580.     rect.width -= 8
  581.     self.contents.font.color = normal_color
  582.     self.contents.font.color.alpha = enabled ? 255 : 128
  583.     self.contents.draw_text(rect, @commands[index])
  584.   end
  585. end
  586.  
  587. #-------------------------------------------------------------------------------
  588. class Scene_Skill
  589.   def return_scene
  590.     $scene = Scene_Chars.new(@actor_index,0)
  591.   end
  592. end
  593. #-------------------------------------------------------------------------------
  594. class Scene_Equip
  595.   def return_scene
  596.     $scene = Scene_Chars.new(@actor_index,1)
  597.   end
  598. end
  599. #-------------------------------------------------------------------------------
  600. class Window_MenuStatus_Base < Window_Base
  601.   def initialize(x,y,width,height,actor)
  602.     super(x,y,width,height)
  603.     self.contents = Bitmap.new(width - 32,height - 32)
  604.     @actor = actor
  605.     refresh
  606.   end
  607.   #-----------------------------------------------------------------------------
  608.   def refresh
  609.     self.contents.clear
  610.   end
  611.   #-----------------------------------------------------------------------------
  612.   def draw_basic_info(x, y)
  613.     draw_actor_level(@actor, x, y)
  614.     draw_actor_state(@actor, x, y + 24)
  615.     draw_actor_hp(@actor, x, y + 48)
  616.     draw_actor_sp(@actor, x, y + 72)
  617.   end
  618.   #-----------------------------------------------------------------------------
  619.   def draw_parameters(x, y)
  620.     draw_actor_parameter(@actor, x, y, 3)
  621.     draw_actor_parameter(@actor, x, y + 24, 4)
  622.     draw_actor_parameter(@actor, x, y + 48, 5)
  623.     draw_actor_parameter(@actor, x, y + 72, 6)
  624.   end
  625.   #-----------------------------------------------------------------------------
  626.   def draw_exp_info(x, y)
  627.     s1 = @actor.exp_s
  628.     s2 = @actor.next_rest_exp_s
  629.     s_next = sprintf("Próximo %s", "Nível")
  630.     self.contents.font.color = system_color
  631.     self.contents.draw_text(x, y + 10, 180, 24, "Experiência Total")
  632.     self.contents.draw_text(x, y + 58, 180, 24, s_next)
  633.     self.contents.font.color = normal_color
  634.     self.contents.draw_text(x, y + 34, 180, 24, s1, 2)
  635.     self.contents.draw_text(x, y + 82, 180, 24, s2, 2)
  636.   end
  637.   #-----------------------------------------------------------------------------
  638.   def draw_equipments(x, y)
  639.     @data = []
  640.     @data.push($data_weapons[@actor.weapon_id])
  641.     @data.push($data_armors[@actor.armor1_id])
  642.     @data.push($data_armors[@actor.armor2_id])
  643.     @data.push($data_armors[@actor.armor3_id])
  644.     @data.push($data_armors[@actor.armor4_id])
  645.     @item_max = @data.size
  646.     self.contents.font.color = system_color
  647.     self.contents.draw_text(4, y, 92, 24, $data_system.words.weapon)
  648.     self.contents.draw_text(4, y + 24 * 1, 92, 24, $data_system.words.armor1)
  649.     self.contents.draw_text(4, y + 24 * 2, 92, 24, $data_system.words.armor2)
  650.     self.contents.draw_text(4, y + 24 * 3, 92, 24, $data_system.words.armor3)
  651.     self.contents.draw_text(4, y + 24 * 4, 92, 24, $data_system.words.armor4)
  652.     draw_item_name(@data[0], 100, y)
  653.     draw_item_name(@data[1], 100, y + 24 * 1)
  654.     draw_item_name(@data[2], 100, y + 24 * 2)
  655.     draw_item_name(@data[3], 100, y + 24 * 3)
  656.     draw_item_name(@data[4], 100, y + 24 * 4)
  657.   end
  658. end
  659. #-------------------------------------------------------------------------------
  660. class Window_StatusMenu < Window_MenuStatus_Base
  661.   def refresh
  662.     super
  663.     draw_actor_name(@actor, 4, 0)
  664.     draw_actor_class(@actor, 128, 0)
  665.     if TSDA::USEH_FACES
  666.       draw_actor_face(@actor,0,32)
  667.     else
  668.       draw_actor_graphic(@actor, 16, 96)
  669.     end
  670.     draw_basic_info(128, 24)
  671.     self.contents.font.color = orange_color
  672.     self.contents.draw_text(280,0,128,32,TSDA::Atrib)
  673.     draw_parameters(310,24)
  674.   end
  675. end
  676. #-------------------------------------------------------------------------------
  677. class Window_ExpStatus < Window_MenuStatus_Base
  678.   def refresh
  679.     super
  680.     self.contents.font.color = orange_color
  681.     self.contents.draw_text(0,0,180,32,TSDA::Exper,1)
  682.     draw_exp_info(0,24)
  683.   end
  684. end
  685. #-------------------------------------------------------------------------------
  686. class Window_EquipHab < Window_MenuStatus_Base
  687.   def refresh
  688.     super
  689.     self.contents.font.color = orange_color
  690.     self.contents.draw_text(0,0,300,24,TSDA::Equipm,1)
  691.     draw_equipments(0,24)
  692.   end
  693. end
  694. class Window_MenuStatus < Window_Selectable
  695.   def initialize
  696.     super(192, 32, 416, 416)
  697.     self.contents = Bitmap.new(width - 32,height - 32)
  698.     refresh
  699.     self.active = false
  700.     self.index = -1
  701.   end
  702.   def refresh
  703.     self.contents.clear
  704.     @item_max = $game_party.actors.size
  705.     for actor in $game_party.actors
  706.       if TSDA::USEH_FACES
  707.         draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
  708.       else
  709.         draw_actor_graphic(actor, 18, actor.index * 96 + 64)
  710.       end
  711.       x = 104
  712.       y = actor.index * 96 + 24 / 2
  713.       draw_actor_name(actor, x, y)
  714.       draw_actor_class(actor, x + 120, y)
  715.       draw_actor_level(actor, x, y + 24 * 1)
  716.       draw_actor_state(actor, x, y + 24 * 2)
  717.       draw_actor_hp(actor, x + 120, y + 24 * 1)
  718.       draw_actor_sp(actor, x + 120, y + 24 * 2)
  719.     end
  720.   end
  721.   def update_cursor_rect
  722.     if @index < 0
  723.       self.cursor_rect.empty
  724.     elsif @index < @item_max
  725.       self.cursor_rect.set(0, @index * 96, contents.width, 96)
  726.     elsif @index >= 100
  727.       self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
  728.     else
  729.       self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
  730.     end
  731.   end
  732. end
  733.  
  734. #-------------------------------------------------------------------------------
  735. class Scene_Title
  736.   alias hyper_menu_command_new_game command_new_game
  737.   def command_new_game
  738.     hyper_menu_command_new_game
  739.     $game_menu.last_index = 0
  740.   end
  741. end
  742. #-------------------------------------------------------------------------------
  743. class Scene_Load
  744.   alias hyper_menu_read_save_data read_save_data
  745.   def read_save_data(file)
  746.     hyper_menu_read_save_data(file)
  747.     $game_menu.last_index = 0
  748.   end
  749. end
  750. #===============================================================================
  751. # ADICIONE AQUI SUAS OPÇÕES!!!!!
  752. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement