Project1
标题:
求“地图名显示”和“菜单美化”脚本。。。。。。。。...
[打印本页]
作者:
嘉凉
时间:
2016-5-21 09:44
标题:
求“地图名显示”和“菜单美化”脚本。。。。。。。。...
地图名显示一直没有找到自己想要的,我需要一个左上方一直显示地图名的脚本,不需要图片就能显示的那种,坐标显示也不要。
菜单美化主要是更改对话框和菜单栏之类的透明度,请问这个谁有呢??0 0
作者:
crow2006
时间:
2016-5-21 10:16
#==============================================================================
# ■ Window_MapName 显示地图名称
#==============================================================================
class Window_MapName < Window_Base
#--------------------------------------------------------------------------
# ● 初始化
#--------------------------------------------------------------------------
def initialize
@map_id = $game_map.map_id
super(0, 0, 182, 52)
self.contents.font.size = 20
self.z = 151
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents_opacity = 255
name = $data_mapinfos[@map_id].name
width = self.contents.text_size(name).width
height = self.contents.text_size(name).height
self.width = width + 32
self.height = height + 32
self.contents = Bitmap.new(width, height)
self.contents.font.size = 20
self.contents.font.color = text_color(0)
self.x = 0
self.y = 0
self.contents.draw_text(0, 0, width, 20, name, 1)
self.opacity = 255
end
#--------------------------------------------------------------------------
# ● 更新
#--------------------------------------------------------------------------
def update
if $game_map.map_id != @map_id
@map_id = $game_map.map_id
refresh
self.opacity -= 5
self.contents_opacity = 255
end
return if self.opacity == 0
self.opacity = 0
self.contents_opacity = 255
end
end
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# ● 数据库载入
#--------------------------------------------------------------------------
alias old_ld load_database
def load_database
old_ld
$data_mapinfos = load_data("Data/MapInfos.rvdata")
end
end
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ● 开始
#--------------------------------------------------------------------------
alias old_start start
def start
old_start
@mapname_window = Window_MapName.new
end
#--------------------------------------------------------------------------
# ● 结束
#--------------------------------------------------------------------------
alias old_ter terminate
def terminate
old_ter
@mapname_window.dispose
end
#--------------------------------------------------------------------------
# ● 更新
#--------------------------------------------------------------------------
alias old_update update
def update
old_update
@mapname_window.update
end
end
复制代码
作者:
嘉凉
时间:
2016-5-21 15:21
crow2006 发表于 2016-5-21 10:16
诶,背后的边框能不能一直在
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1