赞 | 204 |
VIP | 13 |
好人卡 | 7 |
积分 | 122 |
经验 | 52899 |
最后登录 | 2021-6-29 |
在线时间 | 4435 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 12157
- 在线时间
- 4435 小时
- 注册时间
- 2014-4-11
- 帖子
- 5955
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
怎么使属性也有换行功能
#------------------------------------------------------------------------ # ● 屬性 #------------------------------------------------------------------------ if element_set.size > 0 x = 0 y += 1 text = phrase["elements"] for i in 0...element_set.size break if i > 4 text += $data_system.elements[element_set[i]] end self.contents.font.color = Color.new(255, 0, 255, 255) self.contents.font.size = size self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0) end if element_set.size >= 5 x = (phrase["elements"].size)*5-4 y += 1 text = "" for i in 4...element_set.size text += $data_system.elements[element_set[i]] end self.contents.font.color = Color.new(255, 0, 255, 255) self.contents.font.size = size self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0) end #------------------------------------------------------------------------ # ● 狀態添加 #------------------------------------------------------------------------ unless plus_state_set.empty? text = phrase["plus"] x = 0 y += 1 self.contents.font.color = normal_color self.contents.font.size = size self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0) plus_state_set.each do |plus_state| y += 1 text = $data_states[plus_state].name self.contents.font.color = Color.new(255, 100, 0, 255) self.contents.font.size = size self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0) end end
#------------------------------------------------------------------------
# ● 屬性
#------------------------------------------------------------------------
if element_set.size > 0
x = 0
y += 1
text = phrase["elements"]
for i in 0...element_set.size
break if i > 4
text += $data_system.elements[element_set[i]]
end
self.contents.font.color = Color.new(255, 0, 255, 255)
self.contents.font.size = size
self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
end
if element_set.size >= 5
x = (phrase["elements"].size)*5-4
y += 1
text = ""
for i in 4...element_set.size
text += $data_system.elements[element_set[i]]
end
self.contents.font.color = Color.new(255, 0, 255, 255)
self.contents.font.size = size
self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
end
#------------------------------------------------------------------------
# ● 狀態添加
#------------------------------------------------------------------------
unless plus_state_set.empty?
text = phrase["plus"]
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
plus_state_set.each do |plus_state|
y += 1
text = $data_states[plus_state].name
self.contents.font.color = Color.new(255, 100, 0, 255)
self.contents.font.size = size
self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
end
end
|
|