设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 3058|回复: 3
打印 上一主题 下一主题

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

[复制链接]

Lv2.观梦者

梦石
0
星屑
483
在线时间
94 小时
注册时间
2019-6-10
帖子
34
跳转到指定楼层
1
发表于 2020-5-3 23:44:43 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

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

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

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

<font color=&quot;RoyalBlue&quot;>furry<font color=&quot;Black&quot;>画师一个
WWW
头像被屏蔽

Lv4.逐梦者 (禁止发言)

梦石
0
星屑
5706
在线时间
922 小时
注册时间
2013-8-29
帖子
1468
2
发表于 2020-5-3 23:54:41 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-24 18:03

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表