查看: 3539|回复: 3

[已经解决] 如何去掉这个条?

[复制链接]
梦石
0
星屑
483
在线时间
94 小时
注册时间
2019-6-10
回帖
22
发表于 2020-5-3 23:44:43 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 蔡铭衍 于 2020-5-3 23:48 编辑

hp/mp下面的颜色不会去......

怎么搞?

怎么搞?

  1. class Scene_Menu < Scene_MenuBase
  2.   def start
  3.     super
  4.     create_menu_background
  5.     create_command_window
  6.     create_gold_window
  7.     create_timer_window
  8.     create_status_window
  9.   end
  10.   def create_menu_background
  11.     @menu_background = Sprite.new
  12.     @menu_background.bitmap = Cache.system('menu_bg')
  13.   end
  14.   def dispose_menu_background
  15.     @menu_background.bitmap.dispose
  16.     @menu_background.dispose
  17.   end
  18.   def terminate
  19.     super
  20.     dispose_background
  21.     dispose_menu_background
  22.   end
  23.   def create_gold_window
  24.     @gold_window = Window_Gold.new
  25.   end
  26.   def create_timer_window
  27.     @timer_window = Window_Timer.new
  28.   end
  29.   def create_command_window
  30.     @command_window = Window_MenuCommand.new
  31.     @command_window.set_handler(:item,    method(:command_item))
  32.     @command_window.set_handler(:skill,    method(:command_personal))
  33.     @command_window.set_handler(:equip,    method(:command_personal))
  34.     @command_window.set_handler(:status,    method(:command_personal))
  35.     @command_window.set_handler(:formation,    method(:command_formation))

  36.     @command_window.set_handler(:cancel,    method(:return_scene))
  37.   end
  38.   def create_status_window
  39.     @status_window = Window_MenuStatus.new(80, 0)
  40.   end
  41. end
  42. class Window_MenuCommand < Window_Command
  43.   def initialize
  44.     super(40, 200)
  45.     self.opacity = 0 if SceneManager.scene_is?(Scene_Menu)
  46.     select_last
  47.   end
  48.   def window_width
  49.     return 464
  50.   end
  51.   def window_height
  52.     return 192
  53.   end
  54.   def make_command_list
  55.     add_command(Vocab::item,   :item,   main_commands_enabled)
  56.     add_command(Vocab::skill,   :skill,   main_commands_enabled)
  57.     add_command(Vocab::equip,   :equip,   main_commands_enabled)
  58.     add_command(Vocab::status,   :status,   main_commands_enabled)
  59.     add_command(Vocab::formation,   :formation,   formation_enabled)

  60.   end
  61.   def alignment
  62.     return 1
  63.   end
  64.   def visible_line_number
  65.     return 1
  66.   end
  67.   def col_max
  68.     return item_max
  69.   end
  70.   def spacing
  71.     return 8
  72.   end
  73.   def contents_width
  74.     return (item_width + spacing) * item_max - spacing
  75.   end
  76.   def contents_height
  77.     return item_height
  78.   end
  79.   def top_col
  80.     return ox / (item_width + spacing)
  81.   end
  82.   def top_col=(col)
  83.     col = 0 if col < 0
  84.     col = col_max - 1 if col > col_max - 1
  85.     self.ox = col * (item_width + spacing)
  86.   end
  87.   def bottom_col
  88.     top_col + col_max - 1
  89.   end
  90.   def bottom_col=(col)
  91.     self.top_col = col - (col_max - 1)
  92.   end
  93.   def ensure_cursor_visible
  94.     self.top_col = index if index < top_col
  95.     self.bottom_col = index if index > bottom_col
  96.   end
  97.   def item_rect(index)
  98.     rect = super
  99.     rect.x = index * (item_width + spacing)
  100.     rect.y = 0
  101.     rect
  102.   end
  103.   def cursor_down(wrap = false)
  104.   end
  105.   def cursor_up(wrap = false)
  106.   end
  107.   def cursor_pagedown
  108.   end
  109.   def cursor_pageup
  110.   end
  111. end
  112. class Window_MenuStatus < Window_Selectable
  113.   def initialize(x, y)
  114.     super(x, y, window_width, window_height)
  115.     @pending_index = -1
  116.     self.opacity = 0 if SceneManager.scene_is?(Scene_Menu)
  117.     refresh
  118.   end
  119.   def window_width
  120.     return 384
  121.   end
  122.   def window_height
  123.     return 416
  124.   end
  125.   def item_width
  126.     return (width - standard_padding * 2) / 1
  127.   end
  128.   def item_height
  129.     return (height - standard_padding * 2 + spacing) - spacing
  130.   end
  131.   def col_max
  132.     item_max
  133.   end
  134.   def spacing
  135.     return 8
  136.   end
  137.   def item_rect(index)
  138.     rect = Rect.new
  139.     rect.width = item_width
  140.     rect.height = item_height
  141.     rect.x = index * item_width
  142.     rect.y = 0
  143.     rect
  144.   end
  145.   def contents_width
  146.     return [super - super % item_width, col_max * item_width].max
  147.   end
  148.   def contents_height
  149.     return height - standard_padding * 2
  150.   end
  151.   def col
  152.     index / col_max
  153.   end
  154.   def top_col
  155.     ox / item_width
  156.   end
  157.   def top_col=(col)
  158.     col = 0 if col < 0
  159.     col = col_max - 1 if col > col_max - 1
  160.     self.ox = col * item_width
  161.   end
  162.   def page_col_max
  163.     (width - padding - padding_bottom) / item_width
  164.   end
  165.   def page_item_max
  166.     page_col_max * col_max
  167.   end
  168.   def bottom_col
  169.     top_col + page_col_max - 1
  170.   end
  171.   def bottom_col=(col)
  172.     self.top_col = col - (page_col_max - 1)
  173.   end
  174.   def ensure_cursor_visible
  175.     self.top_col = index if index < top_col
  176.     self.bottom_col = index if index > bottom_col
  177.   end
  178.   def cursor_down(wrap = false)
  179.   end
  180.   def cursor_up(wrap = false)
  181.   end
  182.   def cursor_pagedown
  183.   end
  184.   def cursor_pageup
  185.   end
  186.   def draw_item(index)
  187.     actor = $game_party.members[index]
  188.     enabled = $game_party.battle_members.include?(actor)
  189.     rect = item_rect(index)
  190.     draw_item_background(index)
  191.     draw_actor_face(actor, rect.x + 128, rect.y + 0, enabled)
  192.     draw_actor_simple_status(actor, rect.x, rect.y)
  193.   end
  194.   def draw_actor_simple_status(actor, x, y)
  195.     draw_actor_name(actor, x + 120, y + 96)
  196.     draw_actor_level(actor, x + 152, y + 128)
  197.     draw_actor_hp(actor, x + 112, y + 152)
  198.     draw_actor_mp(actor, x + 112, y + 176)
  199.   end
  200.   def draw_face(face_name, face_index, x, y, enabled = true)
  201.     bitmap = Cache.face(face_name)
  202.     rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 96)
  203.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  204.     bitmap.dispose
  205.   end
  206.   def draw_actor_name(actor, x, y, width = 120)
  207.     change_color(hp_color(actor))
  208.     draw_text(x, y, width, 30, actor.name)
  209.   end
  210.   def draw_actor_level(actor, x, y)
  211.     change_color(system_color)
  212.     draw_text(x, y, 32, line_height, Vocab::level_a)
  213.     change_color(normal_color)
  214.     draw_text(x + 56 - 24, y, 24, 24, actor.level, 2)
  215.   end
  216.   def draw_actor_hp(actor, x, y, width = 128)
  217.     draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  218.     change_color(system_color)
  219.     draw_text(x, y, 30, line_height, Vocab::hp_a)
  220.     draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,
  221.     hp_color(actor), normal_color)
  222.     end
  223.   def draw_actor_mp(actor, x, y, width = 128)
  224.     draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  225.     change_color(system_color)
  226.     draw_text(x, y, 30, line_height, Vocab::mp_a)
  227.     draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,
  228.     mp_color(actor), normal_color)
  229.   end
  230. end
  231. class Window_MenuActor < Window_MenuStatus
  232.   def initialize
  233.     super(0, 0)
  234.     self.visible = false
  235.   end
  236.   def window_height
  237.     Graphics.height
  238.   end
  239. end
  240. class Window_Gold < Window_Base
  241.   def initialize
  242.     super(160, 272, window_width, 52)
  243.     self.opacity = 0 if SceneManager.scene_is?(Scene_Menu)
  244.     refresh
  245.   end
  246.   def window_width
  247.     return 160
  248.   end
  249.   def refresh
  250.     contents.clear
  251.     change_color(system_color)
  252.     draw_text(4, 0, contents_width - 8, line_height, '')
  253.     cx = text_size(currency_unit).width
  254.     change_color(normal_color)
  255.     draw_text(4, contents_height - line_height, contents.width - 8 - cx - 2, line_height, value, 2)
  256.     change_color(system_color)
  257.     draw_text(4, contents_height - line_height, contents.width - 8, line_height, currency_unit, 2)
  258.   end
  259. end
  260. class Window_Timer < Window_Base
  261.   def initialize
  262.     super(128, 240, window_width, 48)
  263.     self.opacity = 0 if SceneManager.scene_is?(Scene_Menu)
  264.     refresh
  265.   end
  266.   def window_width
  267.     return 216
  268.   end
  269.   def refresh
  270.     contents.clear
  271.     change_color(system_color)
  272.     draw_text(4, 0, contents_width - 8, line_height, '')
  273.     change_color(normal_color)
  274.     draw_playtime(4, contents_height - line_height, contents.width - 8, 2)
  275.   end
  276.   def open
  277.     refresh
  278.     super
  279.   end
  280.   def draw_playtime(x, y, width, align)
  281.     draw_text(x, y, width, line_height, $game_system.playtime_s, align)
  282.   end
  283.   def update
  284.     refresh
  285.   end
  286. end
复制代码

<font color=&quot;RoyalBlue&quot;>furry<font color=&quot;Black&quot;>画师一个
WWW
头像被屏蔽
梦石
0
星屑
5706
在线时间
922 小时
注册时间
2013-8-29
回帖
1401
发表于 2020-5-3 23:54:41 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部