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

Project1

 找回密码
 注册会员
搜索

关于菜单如何让人物信息只保留名字和说明文字

查看数: 1740 | 评论数: 3 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2016-4-2 01:13

正文摘要:

因为菜单右侧的人物面板默认显示的信息是角色名,职业,等级,hp/mp。 只想保留简单的角色名,然后在下面附上人物说明。应该怎么做。_(:зゝ∠)_ (没法截图解释起来好无力啊……)希望有大大带飞,新芽一枚…… ...

回复

黑崎一护 发表于 2016-4-2 08:41:25
尝试小改了一下,只保留名字和说明,不知道是不是楼主想要的。 = =



RUBY 代码复制
  1. #==============================================================================
  2. # ** 人物状态菜单
  3. #------------------------------------------------------------------------------
  4. #  This window displays full status specs on the status screen.
  5. #==============================================================================
  6.  
  7. class Window_Status < Window_Selectable
  8.   #--------------------------------------------------------------------------
  9.   # * Object Initialization
  10.   #--------------------------------------------------------------------------
  11.   def initialize(actor)
  12.     super(0, 0, Graphics.width, Graphics.height)
  13.     @actor = actor
  14.     refresh
  15.     activate
  16.   end
  17.   #--------------------------------------------------------------------------
  18.   # * Set Actor
  19.   #--------------------------------------------------------------------------
  20.   def actor=(actor)
  21.     return if @actor == actor
  22.     @actor = actor
  23.     refresh
  24.   end
  25.   #--------------------------------------------------------------------------
  26.   # * Refresh
  27.   #--------------------------------------------------------------------------
  28.   def refresh
  29.     contents.clear
  30.     draw_block1   (line_height * 0)
  31.     draw_horz_line(line_height * 1)
  32.     draw_block2   (line_height * 2)
  33.   end
  34.   #--------------------------------------------------------------------------
  35.   # * Draw Block 1
  36.   #--------------------------------------------------------------------------
  37.   def draw_block1(y)
  38.     draw_actor_name(@actor, 4, y)
  39.   end
  40.   #--------------------------------------------------------------------------
  41.   # * Draw Block 2
  42.   #--------------------------------------------------------------------------
  43.   def draw_block2(y)
  44.     draw_basic_info(136, y)
  45.     draw_description(4, y)
  46.   end
  47.   #--------------------------------------------------------------------------
  48.   # * Draw Horizontal Line
  49.   #--------------------------------------------------------------------------
  50.   def draw_horz_line(y)
  51.     line_y = y + line_height / 2 - 1
  52.     contents.fill_rect(0, line_y, contents_width, 2, line_color)
  53.   end
  54.   #--------------------------------------------------------------------------
  55.   # * Get Color of Horizontal Line
  56.   #--------------------------------------------------------------------------
  57.   def line_color
  58.     color = normal_color
  59.     color.alpha = 48
  60.     color
  61.   end
  62.   #--------------------------------------------------------------------------
  63.   # * Draw Basic Information
  64.   #--------------------------------------------------------------------------
  65.   def draw_basic_info(x, y)
  66.     draw_actor_icons(@actor, x, y + line_height * 1)
  67.   end
  68.   #--------------------------------------------------------------------------
  69.   # * Draw Equipment
  70.   #--------------------------------------------------------------------------
  71.   def draw_equipments(x, y)
  72.     @actor.equips.each_with_index do |item, i|
  73.       draw_item_name(item, x, y + line_height * i)
  74.     end
  75.   end
  76.   #--------------------------------------------------------------------------
  77.   # * Draw Description
  78.   #--------------------------------------------------------------------------
  79.   def draw_description(x, y)
  80.     draw_text_ex(x, y, @actor.description)
  81.   end
  82. end


点评

感谢!QwQ!新人感谢搭理!感谢大大无私帮助!!!  发表于 2016-4-2 23:15

评分

参与人数 1梦石 +1 收起 理由
丿梁丶小柒 + 1 认可答案

查看全部评分

nnnansy 发表于 2016-4-2 01:14:41
够不够诚意呢……有没有大大注意到我呢……呜呜…………
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-9-28 09:24

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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