Project1
标题:
那个,请问怎么更改窗口显示的背景
[打印本页]
作者:
flzt5354
时间:
2009-8-4 23:23
标题:
那个,请问怎么更改窗口显示的背景
learnrec.rar
(505.61 KB, 下载次数: 43)
2009-8-4 23:23 上传
点击文件名下载附件
这是一个装备打造系统
我就想更改打造界面的背景
背景图片在Graphics\Pictures
作者:
「旅」
时间:
2009-8-5 00:45
本帖最后由 「旅」 于 2009-8-5 00:47 编辑
class Scene_Craft
#--------------------------------------------------------------------------
def main
@craft_window = Window_Craft.new(@craft_type)
@craft_window.index=@craft_index
@confirm_window = Window_Base.new(120, 188, 400, 64)
@confirm_window.contents = Bitmap.new(368, 32)
@confirm_window.contents.font.name = "黑体"
@confirm_window.contents.font.size = 20
@help_window = Window_Help.new
@craft_window.help_window = @help_window
@result_window=Window_CraftResult.new
@ingredients_window=Window_CraftIngredients.new
@yes_no_window = Window_Command.new(100, ["确定", "放弃"])
@confirm_window.visible = false
@confirm_window.z = 1500
@yes_no_window.visible = false
@yes_no_window.active = false
@yes_no_window.index = 1
@yes_no_window.x = 270
@yes_no_window.y = 252
@yes_no_window.z = 1500
@label_window = Window_Base.new(450,200,190,52)
@label_window.contents=Bitmap.new(@label_window.width - 32,@label_window.height - 32)
@label_window.contents.font.size=20
@label_window.contents.font.color = @label_window.normal_color
@label_window.contents.font.name = "黑体"
@label_window.contents.draw_text(0, 0, @label_window.contents.width, 20, " 现有 需要")
#——0可更改,为透明度的数值
@craft_window.opacity = 0
@confirm_window.opacity = 0
@help_window.opacity = 0
@result_window.opacity = 0
@ingredients_window.opacity = 0
@label_window.opacity = 0
#——分割线
@sprite_lv = Sprite.new
@sprite_lv.bitmap = Bitmap.new("Graphics/Pictures/背景")
#——生成图片↑
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@help_window.dispose
@craft_window.dispose
@result_window.dispose
@ingredients_window.dispose
@confirm_window.dispose
@yes_no_window.dispose
@label_window.dispose
@sprite_lv.dispose
end
end
复制代码
将该脚本插到Main前,要比原脚本位置后,否则无效。(覆盖了原本执行的内容)
作者:
flzt5354
时间:
2009-8-5 09:25
谢谢了~~~
认可你吧
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1