查看: 2179|回复: 3

[已经解决] 关于菜单如何让人物信息只保留名字和说明文字

[复制链接]
梦石
0
星屑
50
在线时间
4 小时
注册时间
2016-3-31
回帖
5
发表于 2016-4-2 01:13:27 | 显示全部楼层 |阅读模式

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

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

×
因为菜单右侧的人物面板默认显示的信息是角色名,职业,等级,hp/mp。
只想保留简单的角色名,然后在下面附上人物说明。应该怎么做。_(:зゝ∠)_

(没法截图解释起来好无力啊……)希望有大大带飞,新芽一枚……
梦石
0
星屑
50
在线时间
4 小时
注册时间
2016-3-31
回帖
5
 楼主| 发表于 2016-4-2 01:14:41 | 显示全部楼层
够不够诚意呢……有没有大大注意到我呢……呜呜…………
回复

使用道具 举报

梦石
0
星屑
199
在线时间
1452 小时
注册时间
2010-9-23
回帖
492
发表于 2016-4-2 08:41:25 | 显示全部楼层
尝试小改了一下,只保留名字和说明,不知道是不是楼主想要的。 = =

无标题2.png

  1. #==============================================================================
  2. # ** 人物状态菜单
  3. #------------------------------------------------------------------------------
  4. #  This window displays full status specs on the status screen.
  5. #==============================================================================

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


点评

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

评分

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

查看全部评分

回复

使用道具 举报

梦石
0
星屑
50
在线时间
4 小时
注册时间
2016-3-31
回帖
5
 楼主| 发表于 2016-4-2 23:14:33 | 显示全部楼层
黑崎一护 发表于 2016-4-2 08:41
尝试小改了一下,只保留名字和说明,不知道是不是楼主想要的。 = =

喵喵喵喵……大大的代码好棒,我试了试,确实很棒,一定程度上也解决了我的问题了。2333

虽然我本来是下一个图的意思……我照着教程修改了一下菜单,然后想在右边头像那里直接只显示人物头像,名字,和说明文字(像一些rpg解谜游戏那种感觉)。这样简化菜单看上去比较舒服一点。
1111.png

不过保留状态栏的话也可以~(我状态栏如何去掉多余的信息也不是很清楚,大大的解答刚好达到planB的要求了23333)非常感谢哈~!
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部