游戏角色名字字怎么弄图片

信息提示
您的同一ip请求过于频繁,如果希望继续访问,请输入验证码:
Copyright 1998 – 2010 Tencent. All Rights Reserved.我见很多人在留言后都会留下图片,就是有自己名字的,那个要怎么弄啊?还有的图片比以前的更美了,我不会
悬赏分:5
解决时间:2009-2-18 22:24
提问者:
问题补充:
不好意思,是贴吧滴,空间滴我也不会,我太落伍了 ,贴吧滴最先考虑,空间其次啦!俩个都教最好,谢谢啦!
最佳***
教你空间里的,百度贴吧的我没用过所以不知道哦
点个人档 ,个人档分为我的资料,我的爱好,空间资料,头像设置,个人形象5个,点空间资料
会出现空间名称,空间说明,签名档三个,在签名档那个框框里面可以插入图片,图片可以用你电脑里面存的图片。图片别太大。
至于你说的那个图片比以前更美了,那是用Photoshop或者别的图片处理软件经过处理后的效果吧。在图片处理软件里面可以在图片上加上自己的名字,想怎么修改图片都行。还有啊二级以上用户才可以用上传图片啊!
分享给你的朋友吧:
对我有帮助
回答时间:2009-1-14 11:07
回答者:
擅长领域:
暂未定制
参加的活动:
暂时没有参加的活动
提问者对于***的评价:
谢谢你,因为回家过年了所以现在才处理!
相关内容
2006-2-28
2011-2-6
2010-11-13
2007-5-9
2011-2-3
查看同主题问题:
其他回答
去网站找空间代码狠容易做到滴啦
如果你说的是QQ空间的话
回答者:
2009-1-13 23:21
1个人资料
2空间资料
3签名档后插入图片
回答者:
2009-1-13 23:52
教你空间里的,百度贴吧的我没用过所以不知道哦
点个人档 ,个人档分为我的资料,我的爱好,空间资料,头像设置,个人形象5个,点空间资料
会出现空间名称,空间说明,签名档三个,在签名档那个框框里面可以插入图片,图片可以用你电脑里面存的图片。图片别太大。
至于你说的那个图片比以前更美了,那是用Photoshop或者别的图片处理软件经过处理后的效果吧。在图片处理软件里面可以在图片上加上自己的名字,想怎么修改图片都行。
回答者:
2009-1-14 00:21
分享到:
推广链接
用户名:
记住我的登录状态
2011 Baidu自动登录 密码
登录 让不懂编程的人也能做出精美的游戏来。
高效编辑、画面流畅、RGSS2脚本系统
动作游戏制作大师
查看:
回复:
6 当前离线
最后登录
2009-3-5
好人卡
在线时间
0 小时
注册时间
2009-2-9
流浪者, 积分 0, 距离下一级还需 1 积分
在线时间
0 小时
注册时间
2009-2-9
发表于 2009-2-14 00:21:56
就是人物在上面,名字在下面的那种。如何实现??
当前离线
最后登录
2011-7-20
好人卡
在线时间
4 小时
注册时间
2008-6-5
杂兵, 积分 2, 距离下一级还需 1 积分
1 经验
在线时间
4 小时
注册时间
2008-6-5
发表于 2009-2-14 00:27:40
所有下面的脚本,当需要主角显示名字时在return 中添加!比如return 阿尔卑斯这样就可以了!
#========================================================================
# ■ Game_Event
#------------------------------------------------------------------------
#  处理事件的类。条件判断、事件页的切换、并行处理、执行事件功能
# 在 Game_Map 类的内部使用。
###修改的部分请搜索#★,想要名字颜色变绿,在NPC名字输入“名字,8就可以。
#========================================================================
cla Game_Event Game_Character
#————————————————————————————————————
# 用来返回名称
#————————————————————————————————————
def name
return @event.name
def name=(newname)
@event.name = newname
#========================================================================
# ■ Sprite_Character
#------------------------------------------------------------------------
#  角色显示用脚本。监视 Game_Character 类的实例、
# 自动变化脚本状态。
#========================================================================
cla Sprite_Character RPG::Sprite
#------------------------------------------------------------------------
# ● 定义实例变量
#------------------------------------------------------------------------
attr_acce or :character # 角色
#------------------------------------------------------------------------
# ● 初始化对像
# viewport : 查看端口
# character : 角色 (Game_Character)
#------------------------------------------------------------------------
def initialize(viewport, character = nil)
name = character.name
super(viewport)
@character = character
@name rite = Sprite.new
@name rite.bitmap = Bitmap.new(160, 48)
@name rite.bitmap.font.name = 黑体
@name rite.bitmap.font.size = 16
@name rite.bitmap.font.color.set(255, 255, 255)
@evname = name
@evname_ lit = name. lit(/,/)[0]
if name[0, 2]==EV
@evname_ lit =
if name. lit(/,/)[1] != nil
case name. lit(/,/)[1]
when 0 @name rite.bitmap.font.color.set(255, 255, 255)
when 1 @name rite.bitmap.font.color.set(128, 128, 255)
when 2 @name rite.bitmap.font.color.set(255, 128, 128)
when 3 @name rite.bitmap.font.color.set(128, 255, 128)
when 4 @name rite.bitmap.font.color.set(128, 255, 255)
when 5 @name rite.bitmap.font.color.set(255, 128, 255)
when 6 @name rite.bitmap.font.color.set(255, 255, 128)
when 7 @name rite.bitmap.font.color.set(192, 192, 192)
when 8 @name rite.bitmap.font.color.set(0, 255, 0)#★绿色,可改
else @name rite.bitmap.font.color.set(255, 255, 255)
if @evname_ lit != and @evname_ lit != nil
@name rite.bitmap.draw_text(0, 0, 160, 36, @evname_ lit, 1)
#------------------------------------------------------------------------
# ● 更新画面
#------------------------------------------------------------------------
def update
# 元件 ID、文件名、色相与现在的情况存在差异的情况下
if @tile_id != @character.tile_id or @character_name != @character.character_name or @character_hue != @character.character_hue
# 记忆元件 ID 与文件名、色相
@tile_id = @character.tile_id
@character_name = @character.character_name
@character_hue = @character.character_hue
# 元件 ID 为有效值的情况下
if @tile_id = 384 elf.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id, @character.character_hue) elf.src_rect.set(0, 0, 32, 32) elf.ox = 16 elf.oy = 32
# 元件 ID 为无效值的情况下
else elf.bitmap = RPG::Cache.character(@character.character_name, @character.character_hue) @cw = bitmap.width / 4 @ch = bitmap.height / 4 elf.ox = @cw / 2 elf.oy = @ch
if @evname != @character.name
@name rite.bitmap.clear
@evname = @character.name
@evname_ lit = @character.name. lit(/,/)[0]
if @character.name. lit(/,/)[1] != nil case @character.name. lit(/,/)[1] when 0 @name rite.bitmap.font.color.set(255, 255, 255) when 1 @name rite.bitmap.font.color.set(128, 128, 255) when 2 @name rite.bitmap.font.color.set(255, 128, 128) when 3 @name rite.bitmap.font.color.set(128, 255, 128) when 4 @name rite.bitmap.font.color.set(128, 255, 255) when 5 @name rite.bitmap.font.color.set(255, 128, 255) when 6 @name rite.bitmap.font.color.set(255, 255, 128) when 7 @name rite.bitmap.font.color.set(192, 192, 192) when 8 @name rite.bitmap.font.color.set(0, 255, 0)#★绿色,可改 else @name rite.bitmap.font.color.set(255, 255, 255) end
if @evname_ lit != and @evname_ lit != nil @name rite.bitmap.draw_text(0, 0, 160, 36, @evname_ lit, 1)
@name rite.x = self.x-80
@name rite.y = self.y+self.oy-60#★改其纵坐标
#@name rite.visible = $game_switches[39]
# 设置可视状态
self.visible = (not @character.tra arent)
# 图形是角色的情况下
if @tile_id == 0
# 设置传送目标的矩形
sx = @character.pattern * @cw
sy = (@character.direction - 2) / 2 * @ch
self.src_rect.set(sx, sy, @cw, @ch)
# 设置脚本的坐标
self.x = @character.screen_x
self.y = @character.screen_y
self.z = @character.screen_z(@ch)
# 设置不透明度、合成方式、茂密
self.opacity = @character.opacity
self.blend_type = @character.blend_type
self.bush_depth = @character.bush_depth
# 动画
if @character.animation_id != 0
animation = $data_animatio [@character.animation_id]
animation(animation, true)
@character.animation_id = 0
#========================================================================
# ■ Game_Player
#------------------------------------------------------------------------
#  处理主角的类。事件启动的判定、以及地图的滚动等功能。
# 本类的实例请参考 $game_player。
#========================================================================
cla Game_Player Game_Character
def name
return
复制代码
[/img]http:// .66rpg.com/upload_program/files/six_99514744.jpg[/img]
当前离线
最后登录
2011-6-9
好人卡
在线时间
6 小时
注册时间
2006-9-7
骑士, 积分 18, 距离下一级还需 2 积分
在线时间
6 小时
注册时间
2006-9-7
发表于 2009-2-14 00:57:46
LS 发的脚本最后那部分修改成
cla Game_Player Game_Character
def name return $game_party.actors[0].name end
十年磨一剑,蓦然回首,年华如水,青春如歌。
当前离线
最后登录
2011-7-20
好人卡
在线时间
4 小时
注册时间
2008-6-5
杂兵, 积分 2, 距离下一级还需 1 积分
1 经验
在线时间
4 小时
注册时间
2008-6-5
发表于 2009-2-14 01:01:55
#========================================================================
# ■ Game_Player
#------------------------------------------------------------------------
#  处理主角的类。事件启动的判定、以及地图的滚动等功能。
# 本类的实例请参考 $game_player。
#========================================================================
cla Game_Player Game_Character
def name
return 加你角色的名字
[/img]http:// .66rpg.com/upload_program/files/six_99514744.jpg[/img]
当前离线
最后登录
2009-3-5
好人卡
在线时间
0 小时
注册时间
2009-2-9
流浪者, 积分 0, 距离下一级还需 1 积分
在线时间
0 小时
注册时间
2009-2-9
发表于 2009-2-14 19:11:00
改是可以改了!!我在一个NPC旁边!连那个NPC的名字也改了!更气人的人出现4个闪烁的人物,名字也在闪!
当前离线
最后登录
2009-8-28
好人卡
在线时间
0 小时
注册时间
2009-2-8
杂兵, 积分 2, 距离下一级还需 1 积分
1 经验
在线时间
0 小时
注册时间
2009-2-8
发表于 2009-2-14 20:05:36
# ————————————————————————————————————
# 本脚本来自www.66rpg.com,转载请保留此信息
# ————————————————————————————————————
#从此精简版本中去除的标记:
:停顿一刹那(1、2帧)
:停顿片刻(20帧)
:文字不用打字方式
:文字使用打字方式
:等待玩家按回车再继续
:文字直接消失
# \K[今天天气不错]:在出现“今天天气不错”这几个字的时候播放$game_system.soundname_on_ eak设置的音效
#新增的标记:
# \d[4]:空4个字节(2个汉字)的位置
# \t: 显示游戏时间窗口
# \v[7]:显示7号变量的值
# \v[a7]:显示7号防具的名称
# \v[s7]:显示7号特技的名称
# \v[w7]:显示7号武器的名称
# \v[i7]:显示7号道具的名称
# \A:头像及姓名框靠左排列
# \a:头像及姓名框靠右排列
# \u[rrgg ]:直接以RGB值十六进制指定颜色
#强化功能的标记:
# \F[001]:在对话显示头像“Graphics/battlers/66rpg_001_f. g”
# \f[1]:在对话中显示1号角色的头像,没有的话同\F[1]效果
# \L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h. g”
# \l[1]:在左边显示1号角色的半身像,没有的话同\L[1]效果
# \R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h. g”
# \r[1]:在右边显示1号角色的半身像,没有的话同\R[1]效果
# \m[李逍遥]:用默认颜色(颜色0)显示一个“李逍遥”方框,表示说话人姓名
# \m2[\n[1]]:用颜色2显示1号主角的姓名方框 ----不知道有多少人盼这个功能盼了多久了呵呵
#下面是脚本:
#——说明
# 其他在对话中可以使用的功能:
# \n[1]:显示1号角色的姓名
# \m[李逍遥]:用默认颜色(颜色0)显示一个“李逍遥”方框,表示说话人姓名
# \m2[\n[1]]:用颜色2显示1号主角的姓名方框
# \p[1]:对话框出现在1号事件的上方
# \p[0]:主人公上方出现对话框
#——————————————————使用\p功能后可以自动调整对话框大小
# \\:显示\这个符号
# \c[0-7]:更改颜色
# \u[rrgg ]:直接以十六进制指定颜色,注意这里会把透明度重设为255
# \g:显示金钱窗口
# \t: 显示游戏时间窗口
:下一行从这个位置开始
# \o[123]:文字透明度改为123,模拟将死之人(汗)
# \h[12]:改用12号字
# \b[50]:空50象素
# \d[4]:空4个字节(2个汉字)的位置
# \F[001]:在对话显示头像“Graphics/battlers/66rpg_001_f. g”
# \f[1]:在对话中显示1号角色的头像,没有的话同\F[1]效果
# \L[001]:在左边显示图片“Graphics/battlers/66rpg_001_h. g”
# \l[1]:在左边显示1号角色的半身像,没有的话同\L[1]效果
# \R[001]:在右边显示图片“Graphics/battlers/66rpg_001_h. g”
# \r[1]:在右边显示1号角色的半身像,没有的话同\R[1]效果
# \Lk:清除左边的图像
# \Rk:清除右边的图像
# \v[7]:显示7号变量的值
# \v[a7]:显示7号防具的名称
# \v[s7]:显示7号特技的名称
# \v[w7]:显示7号武器的名称
# \v[i7]:显示7号道具的名称
# \A:头像及姓名框靠左排列
# \a:头像及姓名框靠右排列
#==============================================================================
# ■ Window_Me age
#------------------------------------------------------------------------------
cla Window_Me age Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化状态
#--------------------------------------------------------------------------
def initialize
super(80, 304, 480, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.visible = false
self.z = 9998
@fade_in = false
@fade_out = false
@contents_showing = false
@cursor_width = 0
self.active = false
self.index = -1
@popchar = -2
@alignment = true
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def di ose
terminate_me age
$game_temp.me age_window_showing = false
if @i ut_number_window != nil
@i ut_number_window.di ose
#--------------------------------------------------------------------------
# ● 处理信息结束
#--------------------------------------------------------------------------
def terminate_me age
self.active = false
self.pause = false
self.index = -1
self.contents.clear
# 清除显示中标志
@contents_showing = false
# 呼叫信息调用
if $game_temp.me age_proc != nil
$game_temp.me age_proc.call
# 清除文章、选择项、输入数值的相关变量
$game_temp.me age_text = nil
$game_temp.me age_proc = nil
$game_temp.choice_start = 99
$game_temp.choice_max = 0
$game_temp.choice_cancel_type = 0
$game_temp.choice_proc = nil
$game_temp.num_i ut_start = 99
$game_temp.num_i ut_variable_id = 0
$game_temp.num_i ut_digits_max = 0
# 开放金钱窗口
if @gold_window != nil
@gold_window.di ose
@gold_window = nil
# 开放时间窗口
if @playtime_window != nil
@playtime_window.di ose
@playtime_window = nil
# 开放姓名窗口
if @name_window != nil
@name_window.di ose
@name_window = nil
if @name_airtext != nil
@name_airtext.di ose
@name_airtext = nil
# 开放角色图片
if @right_picture != nil and @right_keep == true
@right_picture.di ose
if @left_picture != nil and @left_keep == true
@left_picture.di ose
@face_bitmap = nil
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
# 初期化
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = Font.default_size
x = y = max_x = max_y = @indent = lines = 0
@left_keep = @right_keep = false
@face_indent = 0
@opacity = 255
@cursor_width = 0
face = nil
if $game_temp.choice_start == 0
if $game_temp.me age_text != nil
text = $game_temp.me age_text
#——对齐设置
if (/\\([Aa])/.match(text))!=nil then
if $1 == A
@alignment = true
@alignment = false
text.gsub!(/\\([Aa])/) { }
#——头像设置
if (/\\([Ff])\[(.+?)\]/.match(text))!=nil then
face = 66rpg_ + $2 + _f. g
if $1 == f and $game_actors[$2.to_i] != nil
face = $game_actors[$2.to_i].battler_name + _f. g
if FileTest.exist?(Graphics/Battlers/#{face})
@face_bitmap = Bitmap.new(Graphics/Battlers/#{face})
if @alignment
x = @face_indent = 128
self.contents.blt(16, 16, @face_bitmap, Rect.new(0, 0, 96, 96))
self.contents.blt(self.contents.width - 112, 16, @face_bitmap,
Rect.new(0, 0, 96, 96))
face = nil
@face_bitmap = nil
text.gsub!(/\\([Ff])\[(.*?)\]/) { }
#——左半身像设置
if (/\\([Ll])\[(.+?)\]/.match(text))!=nil then
face = 66rpg_ + $2 + _h. g
if $1 == l and $game_actors[$2.to_i] != nil
face = $game_actors[$2.to_i].battler_name + _h. g
if $加密 == true
if @left_picture != nil
@left_picture.di ose
@left_picture = Sprite.new
@left_picture.bitmap = Bitmap.new(Graphics/battlers/#{face})
@left_picture.y = 480-@left_picture.bitmap.height
@left_picture.x = 0
@left_picture.mirror = true
text.gsub!(/\\([Ll])\[(.*?)\]/) { }
if FileTest.exist?(Graphics/battlers/#{face})
if @left_picture != nil
@left_picture.di ose
@left_picture = Sprite.new
@left_picture.bitmap = Bitmap.new(Graphics/battlers/#{face})
@left_picture.y = 480-@left_picture.bitmap.height
@left_picture.x = 0
@left_picture.mirror = true
text.gsub!(/\\([Ll])\[(.*?)\]/) { }
#——右半身像设置
if (/\\([Rr])\[(.+?)\]/.match(text))!=nil then
face = 66rpg_ + $2 + _h. g
if $1 == r and $game_actors[$2.to_i] != nil
face = $game_actors[$2.to_i].battler_name + _h. g
if $加密 == true
if @right_picture != nil
@right_picture.di ose
@right_picture = Sprite.new
@right_picture.bitmap = Bitmap.new(Graphics/battlers/#{face})
@right_picture.y = 480-@right_picture.bitmap.height
@right_picture.x = 640-@right_picture.bitmap.width
text.gsub!(/\\([Rr])\[(.*?)\]/) { }
if FileTest.exist?(Graphics/battlers/#{face})
if @right_picture != nil
@right_picture.di ose
@right_picture = Sprite.new
@right_picture.bitmap = Bitmap.new(Graphics/battlers/#{face})
@right_picture.y = 480-@right_picture.bitmap.height
@right_picture.x = 640-@right_picture.bitmap.width
text.gsub!(/\\([Rr])\[(.*?)\]/) { }
if (/\\[Rr]k/.match(text)) != nil
@right_keep = true
text.sub!(/\\[Rr]k/) { }
if (/\\[Ll]k/.match(text)) != nil
@left_keep = true
text.sub!(/\\[Ll]k/) { }
# 替换人物姓名
text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
$game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name :
# 显示人物姓名
name_window_set = false
if (/\\[Mm]([0-9]*?)\[(.+?)\]/.match(text)) != nil
name_window_set = true
if $1 ==
color = 0
color = $1.to_i
if color = 0 and color = 7
name_color = color
name_text = $2
text.sub!(/\\[Mm]([0-9]*?)\[(.*?)\]/) { }
# 文字位置的判定
if (/\\[Pp]\[([-1,0-9]+)\]/.match(text))!=nil then
@popchar = $1.to_i
if @popchar == -1
x = @indent = 48
text.gsub!(/\\[Pp]\[([-1,0-9]+)\]/) { }
# 开始
last_text = text.clone
text.gsub!(/\\[Vv]\[([IiWwAaSs]?)([0-9]+)\]/) { convart_value($1, $2.to_i) }
end until text == last_text
text.gsub!(/\\\\/) { \000 }
text.gsub!(/\\[Cc]\[([0-9]+)\]/) { \001[#{$1}] }
text.gsub!(/\\[Gg]/) { \002 }
text.gsub!(/\\[Tt]/) { \003 }
text.gsub!(/\\[Uu]\[([0-9A-Fa-f]{6})\]/) { \004[#{$1}] }
text.gsub!(/\\[Ii]/) { \023 }
text.gsub!(/\\[Oo]\[([0-9]+)\]/) { \024[#{$1}] }
text.gsub!(/\\[Hh]\[([0-9]+)\]/) { \025[#{$1}] }
text.gsub!(/\\[Bb]\[([0-9]+)\]/) { \026[#{$1}] }
text.gsub!(/\\[Dd]\[([0-9]+)\]/) { \027[#{$1}] }
if @popchar = 0
max_x = 0
max_y = 4
for i in 0..3
line = text. lit(/\n/)[3-i]
max_y -= 1 if line == nil and max_y = 4-i
next if line == nil
cx = contents.text_size(line).width
max_x = cx if cx max_x
self.width = max_x + 48 + @face_indent
self.height = (max_y - 1) * 32 + 64
max_x = self.width - 32 - @face_indent
reset_window
if name_window_set
w = self.contents.text_size(name_text).width + 16
xn = @alignment ? self.x : self.x + self.width - w
yn = self.y = 40 ? self.y - 40 : self.y + self.height
@name_window = Window_Name.new(xn, yn, w)
@name_window.z = self.z + 1
@name_airtext = Window_AirText.new(xn + 8, yn + 8, name_text, name_color)
@name_airtext.z = self.z + 2
while ((c = text.slice!(/./m)) != nil)
if c == \000
if c == \001
text.sub!(/\[([0-9]+)\]/, )
color = $1.to_i
if color = 0 and color = 7
self.contents.font.color = text_color(color)
if c == \002
if @gold_window == nil and @popchar = 0
@gold_window = Window_Gold.new
@gold_window.x = 560 - @gold_window.width
if $game_temp.in_battle
@gold_window.y = 192
@gold_window.y = self.y = 128 ? 32 : 384
@gold_window.opacity = self.opacity
@gold_window.back_opacity = self.back_opacity
if c == \003
if @playtime_window == nil and @popchar =0
@playtime_window = Window_PlayTime.new
@playtime_window.x = 80
if $game_temp.in_battle
@playtime_window.y = 192
@playtime_window.y = self.y = 128 ? 32 : 384
@playtime_window.opacity = self.opacity
@playtime_window.back_opacity = self.back_opacity
if c == \004
text.sub!(/\[([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})\]/, )
self.contents.font.color = Color.new($1.to_i(16), $2.to_i(16), $3.to_i(16), 255)
if c == \023
@indent = x
if c == \024
text.sub!(/\[([0-9]+)\]/, )
self.contents.font.color.alpha = [[0, $1.to_i].max, 255].min
if c == \025
text.sub!(/\[([0-9]+)\]/, )
self.contents.font.size = [[$1.to_i, 6].max, 32].min
if c == \026
text.sub!(/\[([0-9]+)\]/, )
x += $1.to_i
if c == \027
text.sub!(/\[([0-9]+)\]/, )
x += $1.to_i * self.contents.font.size / 2
if c == \030
text.sub!(/\[(.*?)\]/, )
self.contents.blt(x , y * line_height + 4, RPG::Cache.icon($1), Rect.new(0, 0, 24, 24))
x += 24
if c == \ quot;
if lines = $game_temp.choice_start
@cursor_width = [@cursor_width, max_x - @face_indent].max
lines += 1
x = 0 + @indent + @face_indent
if lines = $game_temp.choice_start
x = 8 + @indent + @face_indent
# 描绘文字
self.contents.draw_text(x, line_height * y, 40, 32, c)
# x 为要描绘文字的加法运算
x += self.contents.text_size(c).width
if $game_temp.choice_max 0
@item_max = $game_temp.choice_max
self.active = true
self.index = 0
if $game_temp.num_i ut_variable_id 0
digits_max = $game_temp.num_i ut_digits_max
number = $game_variables[$game_temp.num_i ut_variable_id]
@i ut_number_window = Window_I utNumber.new(digits_max)
@i ut_number_window.number = number
@i ut_number_window.x = self.x + 8
@i ut_number_window.y = self.y + $game_temp.num_i ut_start * 32
#--------------------------------------------------------------------------
# ● 更新
#--------------------------------------------------------------------------
def update
# 渐变的情况下
if @fade_in
self.contents_opacity += 24
if @i ut_number_window != nil
@i ut_number_window.contents_opacity += 24
if self.contents_opacity == 255
@fade_in = false
# 输入数值的情况下
if @i ut_number_window != nil
@i ut_number_window.update
# 确定
if I ut.trigger?(I ut::C)
$game_system.se_play($data_system.decision_se)
$game_variables[$game_temp.num_i ut_variable_id] =
@i ut_number_window.number
$game_map.need_refresh = true
# 释放输入数值窗口
@i ut_number_window.di ose
@i ut_number_window = nil
terminate_me age
# 显示信息中的情况下
if @contents_showing
# 如果不是在显示选择项中就显示暂停标志
if $game_temp.choice_max == 0
self.pause = true
# 取消
if I ut.trigger?(I ut::B)
if $game_temp.choice_max 0 and $game_temp.choice_cancel_type 0
$game_system.se_play($data_system.cancel_se)
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
terminate_me age
# 确定
if I ut.trigger?(I ut::C)
if $game_temp.choice_max 0
$game_system.se_play($data_system.decision_se)
$game_temp.choice_proc.call(self.index)
terminate_me age
# 在渐变以外的状态下有等待显示的信息与选择项的场合
if @fade_out == false and $game_temp.me age_text != nil
@contents_showing = true
$game_temp.me age_window_showing = true
reset_window
refresh
Graphics.frame_reset
self.visible = true
self.contents_opacity = 0
if @i ut_number_window != nil
@i ut_number_window.contents_opacity = 0
@fade_in = true
# 没有可以显示的信息、但是窗口为可见的情况下
if self.visible
@fade_out = true
self.opacity -= 48
if self.opacity == 0
self.visible = false
@fade_out = false
$game_temp.me age_window_showing = false
#--------------------------------------------------------------------------
# ● 获得字符
#--------------------------------------------------------------------------
def get_character(parameter)
case parameter
return $game_player
events = $game_map.events
return events == nil ? nil : events[parameter]
#--------------------------------------------------------------------------
# ● 设置窗口位置与不透明度
#--------------------------------------------------------------------------
def reset_window
# 判定
if @popchar = 0
events = $game_map.events
if events != nil
character = get_character(@popchar)
x = [[character.screen_x - 0 - self.width / 2, 4].max, 636 - self.width].min
y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
self.x = x
self.y = y
elsif @popchar == -1
self.x = -4
self.y = -4
self.width = 648
self.height = 488
if $game_temp.in_battle
self.y = 16
case $game_system.me age_position
when 0 # 上
self.y = 16
when 1 # 中
self.y = 160
when 2 # 下
self.y = 304
self.x = 80
if @face_bitmap == nil
self.width = 480
self.width = 600
self.x -= 60
self.height = 160
self.contents = Bitmap.new(self.width - 32, self.height - 32)
if @face_bitmap != nil
if @alignment
self.contents.blt(16, 16, @face_bitmap, Rect.new(0, 0, 96, 96))
self.contents.blt(self.contents.width - 112, 16, @face_bitmap,
Rect.new(0, 0, 96, 96))
if @popchar == -1
self.opacity = 255
self.back_opacity = 0
elsif $game_system.me age_frame == 0
self.opacity = 255
self.back_opacity = 160
self.opacity = 0
self.back_opacity = 160
#--------------------------------------------------------------------------
# ● line_height
#--------------------------------------------------------------------------
# 返回値:行高
#--------------------------------------------------------------------------
def line_height
if self.contents.font.size = 20 and self.contents.font.size = 24
return 32
return self.contents.font.size * 15 / 10
#--------------------------------------------------------------------------
# ● \V 变换
#--------------------------------------------------------------------------
def convart_value(option, index)
option == nil ? option = : nil
option.downcase!
case option
unle $data_items[index].name == nil
r = rintf(\030[%s]% quot;, $data_items[index].icon_name, $data_items[index].name)
unle $data_weapo [index].name == nil
r = rintf(\030[%s]% quot;, $data_weapo [index].icon_name, $data_weapo [index].name)
unle $data_armors[index].name == nil
r = rintf(\030[%s]% quot;, $data_armors[index].icon_name, $data_armors[index].name)
unle $data_skills[index].name == nil
r = rintf(\030[%s]% quot;, $data_skills[index].icon_name, $data_skills[index].name)
r = $game_variables[index]
r == nil ? r = : nil
return r
#--------------------------------------------------------------------------
# ● 矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
if @index = 0
n = $game_temp.choice_start + @index
self.cursor_rect.set(4 + @indent + @face_indent, n * 32 + 4, @cursor_width, 32)
self.cursor_rect.empty
#==============================================================================
# ■ Window_Name
#------------------------------------------------------------------------------
#  显示对话人姓名的窗口。
#==============================================================================
cla Window_Name Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize(x, y, width)
super(x, y, width, 40)
self.contents = nil
self.back_opacity = 160
#==============================================================================
# ■ Window_AirText
#------------------------------------------------------------------------------
#  显示对话人姓名的文字。
#==============================================================================
cla Window_AirText Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize(x, y, designate_text, color)
super(x-16, y-16, 32 + designate_text.size * 12, 56)
self.opacity = 0
self.back_opacity = 0
self.contents = Bitmap.new(self.width - 32, self.height - 32)
w = self.contents.width
h = self.contents.height
self.contents.font.color = text_color(color)
self.contents.draw_text(0, 0, w, h, designate_text)
复制代码
.....看看这个
当前离线
最后登录
2009-3-5
好人卡
在线时间
0 小时
注册时间
2009-2-9
流浪者, 积分 0, 距离下一级还需 1 积分
在线时间
0 小时
注册时间
2009-2-9
发表于 2009-2-14 21:19:04
自己已解决
您需要登录后才可以回帖
发表回复
回帖后跳转到最后一页
GMT+8, 2011-8-4 22:54
Powered by
2001-2011
积分 0, 距离下一级还需
回顶部

参考资料

 

随机推荐