赞 | 0 |
VIP | 0 |
好人卡 | 5 |
积分 | 6 |
经验 | 53674 |
最后登录 | 2024-3-13 |
在线时间 | 917 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 582
- 在线时间
- 917 小时
- 注册时间
- 2013-3-13
- 帖子
- 557
|
2楼
楼主 |
发表于 2014-9-17 23:48:09
|
只看该作者
第二部分:
#======================================================= #★显示物品提示窗口 #======================================================= class Window_fuye<Window_Base #==================================== #●初始化 #==================================== #-------------------------------------------------------------------------- # ● 初始化对像 # x : 窗口 X 座标 # y : 窗口 Y 座标 # width : 窗口宽度 # height : 窗口高度 #-------------------------------------------------------------------------- def initialize(item) @item=item @item_name = {} n=0 m=0 if @item != nil for itn in @item if @item_name[itn.name]==nil @item_name[itn.name]=[0,""] @item_name[itn.name][1]=itn.icon_index m+=1 end @item_name[itn.name][0] += 1 end end super(200,15, 180,25*m+75 ) self.opacity = 150 refresh end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.size=16 if @item_name.size != 0 self.contents.font.size = 16 self.contents.font.color = Color.new(255,255,0) self.contents.draw_text(10,0,64,32,"获得物品:") i=0 i=0 self.contents.font.size = 14 self.contents.font.color = Color.new(255,255,255,255) for itn in @item_name ################################ #颜色自定 if itn[0].include?("多彩晶矿") or itn[0].include?("紫色夜魇草") or itn[0].include?("黄金果实") or itn[0].include?("蓝魔鱼") or itn[0].include?("魔力果") self.contents.font.color = text_color(44) #颜色请自定义 draw_icon(itn[1][1] ,6 ,32+i*25 , true) self.contents.draw_text(30,32+i*25,160,32,itn[0] + " × "+ itn[1][0].to_s) i+=1 else self.contents.font.color = Color.new(255,255,255,255) draw_icon(itn[1][1] ,6 ,32+i*25 , true) self.contents.draw_text(30,32+i*25,160,32,itn[0] + " × "+ itn[1][0].to_s) i+=1 end ################################ end end end end
#=======================================================
#★显示物品提示窗口
#=======================================================
class Window_fuye<Window_Base
#====================================
#●初始化
#====================================
#--------------------------------------------------------------------------
# ● 初始化对像
# x : 窗口 X 座标
# y : 窗口 Y 座标
# width : 窗口宽度
# height : 窗口高度
#--------------------------------------------------------------------------
def initialize(item)
@item=item
@item_name = {}
n=0
m=0
if @item != nil
for itn in @item
if @item_name[itn.name]==nil
@item_name[itn.name]=[0,""]
@item_name[itn.name][1]=itn.icon_index
m+=1
end
@item_name[itn.name][0] += 1
end
end
super(200,15, 180,25*m+75 )
self.opacity = 150
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size=16
if @item_name.size != 0
self.contents.font.size = 16
self.contents.font.color = Color.new(255,255,0)
self.contents.draw_text(10,0,64,32,"获得物品:")
i=0
i=0
self.contents.font.size = 14
self.contents.font.color = Color.new(255,255,255,255)
for itn in @item_name
################################
#颜色自定
if itn[0].include?("多彩晶矿") or itn[0].include?("紫色夜魇草") or itn[0].include?("黄金果实") or itn[0].include?("蓝魔鱼") or itn[0].include?("魔力果")
self.contents.font.color = text_color(44) #颜色请自定义
draw_icon(itn[1][1] ,6 ,32+i*25 , true)
self.contents.draw_text(30,32+i*25,160,32,itn[0] + " × "+ itn[1][0].to_s)
i+=1
else
self.contents.font.color = Color.new(255,255,255,255)
draw_icon(itn[1][1] ,6 ,32+i*25 , true)
self.contents.draw_text(30,32+i*25,160,32,itn[0] + " × "+ itn[1][0].to_s)
i+=1
end
################################
end
end
end
end
|
|