赞 | 287 |
VIP | 11 |
好人卡 | 74 |
积分 | 227 |
经验 | 281171 |
最后登录 | 2024-12-3 |
在线时间 | 9422 小时 |
Lv5.捕梦者 (暗夜天使) 只有笨蛋才会看到
- 梦石
- 1
- 星屑
- 21711
- 在线时间
- 9422 小时
- 注册时间
- 2012-6-19
- 帖子
- 7119
|
本帖最后由 喵呜喵5 于 2014-9-7 14:43 编辑
【效果图】
【素材图片】
FileBackground
Load
Save
【脚本】
=begin =============================================================================== 狂父存档界面 (Author:喵呜喵5) =============================================================================== 使用说明: 仿恐解游戏狂父的界面制作的存/读档界面 请将三个图像文件:Save、FileBackground、Load 放到Graphics\System目录下 =end module MadFather #============================================================================== # 设定部分 #============================================================================== NAME = "DATA" #存档文件名 EMPTY = " NO DATA" #存档不存在时的提示 SMALL = 2 #地图名/存档不存在提示的缩放大小 WIDTH = 212 #存档界面宽度 HEIGHT = 61 #存档界面高度 X0 = 166 #存档界面X坐标 Y0 = 55 #存档界面Y坐标 X1 = 6 #文件名X坐标 Y1 = 6 #文件名Y坐标 X2 = 100 #游戏时间X坐标(Y坐标同文件名Y坐标) X3 = 8 #提示文字X坐标 Y3 = 35 #提示文字Y坐标 LOADX = 165 #读档符号X坐标 LOADY = 20 #读档符号Y坐标 SAVEX = 164 #存档符号X坐标 SAVEY = 20 #存档符号Y坐标 #============================================================================== # 设定结束 #============================================================================== end class << DataManager alias m5_make_save_header make_save_header def make_save_header header = m5_make_save_header header[:locate] = $game_map.display_name header end end class Window_SaveFile def initialize(height, index) super(MadFather::X0, MadFather::HEIGHT * index, MadFather::WIDTH, MadFather::HEIGHT) @file_index = index refresh @selected = false self.opacity = 0 end def standard_padding return 0 end def refresh contents.clear change_color(normal_color) name = MadFather::NAME + "#{@file_index + 1}" draw_text(MadFather::X1, MadFather::Y1, contents.width, line_height, name) draw_playtime(MadFather::X2, 6, contents.width) draw_locate(MadFather::X3, MadFather::Y3, contents.width) end def draw_playtime(x, y, width) header = DataManager.load_header(@file_index) if header draw_text(x, y, width, line_height, header[:playtime_s]) else draw_text(x, y, width, line_height,"-:--:--") end end def draw_locate(x, y, width) contents.font.size -= MadFather::SMALL header = DataManager.load_header(@file_index) if header and header[:locate] draw_text(x, y, width, line_height, header[:locate]) else draw_text(x, y, width, line_height, MadFather::EMPTY) end contents.font.size += MadFather::SMALL end def update_cursor if @selected cursor_rect.set(0, 0, contents.width, contents.height) else cursor_rect.empty end end end class Scene_File def create_background super @background2 = Sprite.new @background2.bitmap = Cache.system("FileBackground") @background2.z = @background_sprite.z creat_scene_hint end def creat_scene_hint @scene_hint = Sprite.new @scene_hint.bitmap = Cache.system("Save") @scene_hint.z = @background2.z @scene_hint.x,@scene_hint.y = MadFather::SAVEX,MadFather::SAVEY end def dispose_background super @background2.bitmap.dispose @background2.dispose @scene_hint.bitmap.dispose @scene_hint.dispose end alias m5_create_help_window create_help_window def create_help_window m5_create_help_window @help_window.visible = false end def create_savefile_viewport @savefile_viewport = Viewport.new @savefile_viewport.rect.y = MadFather::Y0 @savefile_viewport.rect.height = MadFather::HEIGHT * visible_max end def visible_max return 5 end end class Scene_Load def creat_scene_hint @scene_hint = Sprite.new @scene_hint.bitmap = Cache.system("Load") @scene_hint.z = @background2.z @scene_hint.x,@scene_hint.y = MadFather::LOADX,MadFather::LOADY end end
=begin
===============================================================================
狂父存档界面 (Author:喵呜喵5)
===============================================================================
使用说明:
仿恐解游戏狂父的界面制作的存/读档界面
请将三个图像文件:Save、FileBackground、Load 放到Graphics\System目录下
=end
module MadFather
#==============================================================================
# 设定部分
#==============================================================================
NAME = "DATA"
#存档文件名
EMPTY = " NO DATA"
#存档不存在时的提示
SMALL = 2
#地图名/存档不存在提示的缩放大小
WIDTH = 212
#存档界面宽度
HEIGHT = 61
#存档界面高度
X0 = 166
#存档界面X坐标
Y0 = 55
#存档界面Y坐标
X1 = 6
#文件名X坐标
Y1 = 6
#文件名Y坐标
X2 = 100
#游戏时间X坐标(Y坐标同文件名Y坐标)
X3 = 8
#提示文字X坐标
Y3 = 35
#提示文字Y坐标
LOADX = 165
#读档符号X坐标
LOADY = 20
#读档符号Y坐标
SAVEX = 164
#存档符号X坐标
SAVEY = 20
#存档符号Y坐标
#==============================================================================
# 设定结束
#==============================================================================
end
class << DataManager
alias m5_make_save_header make_save_header
def make_save_header
header = m5_make_save_header
header[:locate] = $game_map.display_name
header
end
end
class Window_SaveFile
def initialize(height, index)
super(MadFather::X0, MadFather::HEIGHT * index, MadFather::WIDTH, MadFather::HEIGHT)
@file_index = index
refresh
@selected = false
self.opacity = 0
end
def standard_padding
return 0
end
def refresh
contents.clear
change_color(normal_color)
name = MadFather::NAME + "#{@file_index + 1}"
draw_text(MadFather::X1, MadFather::Y1, contents.width, line_height, name)
draw_playtime(MadFather::X2, 6, contents.width)
draw_locate(MadFather::X3, MadFather::Y3, contents.width)
end
def draw_playtime(x, y, width)
header = DataManager.load_header(@file_index)
if header
draw_text(x, y, width, line_height, header[:playtime_s])
else
draw_text(x, y, width, line_height,"-:--:--")
end
end
def draw_locate(x, y, width)
contents.font.size -= MadFather::SMALL
header = DataManager.load_header(@file_index)
if header and header[:locate]
draw_text(x, y, width, line_height, header[:locate])
else
draw_text(x, y, width, line_height, MadFather::EMPTY)
end
contents.font.size += MadFather::SMALL
end
def update_cursor
if @selected
cursor_rect.set(0, 0, contents.width, contents.height)
else
cursor_rect.empty
end
end
end
class Scene_File
def create_background
super
@background2 = Sprite.new
@background2.bitmap = Cache.system("FileBackground")
@background2.z = @background_sprite.z
creat_scene_hint
end
def creat_scene_hint
@scene_hint = Sprite.new
@scene_hint.bitmap = Cache.system("Save")
@scene_hint.z = @background2.z
@scene_hint.x,@scene_hint.y = MadFather::SAVEX,MadFather::SAVEY
end
def dispose_background
super
@background2.bitmap.dispose
@background2.dispose
@scene_hint.bitmap.dispose
@scene_hint.dispose
end
alias m5_create_help_window create_help_window
def create_help_window
m5_create_help_window
@help_window.visible = false
end
def create_savefile_viewport
@savefile_viewport = Viewport.new
@savefile_viewport.rect.y = MadFather::Y0
@savefile_viewport.rect.height = MadFather::HEIGHT * visible_max
end
def visible_max
return 5
end
end
class Scene_Load
def creat_scene_hint
@scene_hint = Sprite.new
@scene_hint.bitmap = Cache.system("Load")
@scene_hint.z = @background2.z
@scene_hint.x,@scene_hint.y = MadFather::LOADX,MadFather::LOADY
end
end
|
评分
-
查看全部评分
|