Project1
标题:
如何在脚本里更改对话框的大小?
[打印本页]
作者:
golden124
时间:
2008-5-19 00:19
标题:
如何在脚本里更改对话框的大小?
比如在Interpreter 1这个类下,通过开关控制,临时让对话框变高,应该怎么做?
#--------------------------------------------------------------------------
# ● 设置选择项 修改
#--------------------------------------------------------------------------
def setup_choices(parameters)
# choice_max 为设置选择项的项目数
if $game_switches[1]
$game_temp.choice_max = 4
$right_answer = rand(3)
# message_text 为设置选择项
if $right_answer==0
text0=$a[$game_variables[1]]
else
text0=$a[($game_variables[1]+rand(20)+1)%$a.size]
end
if $right_answer==1
text1=$a[$game_variables[1]]
else
text1=$a[($game_variables[1]+rand(20)+25)%$a.size]
end
if $right_answer==2
text2=$a[$game_variables[1]]
else
text2=$a[($game_variables[1]+rand(20)+55)%$a.size]
end
text3="你还有"+$game_variables[132].to_s+"次求助的机会"
$game_temp.message_text += text0+text1+text2+text3
else
$game_temp.choice_max = parameters[0].size
# message_text 为设置选择项
for text in parameters[0]
$game_temp.message_text += text + "\n"
end
end
# 设置取消的情况的处理
$game_temp.choice_cancel_type = parameters[1]
# 返回调用设置
current_indent = @list[@index].indent
$game_temp.choice_proc = Proc.new { |n| @branch[current_indent] = n }
end
复制代码
作者:
golden124
时间:
2008-5-19 00:40
看了以前的帖子改了这里:
#--------------------------------------------------------------------------
# ● 设置窗口位置与不透明度 ##修改过,关于对话框位置大小的调节
#--------------------------------------------------------------------------
def reset_window
if $game_temp.in_battle
self.y = 16+$game_variables[136]
else
case $game_system.message_position
when 0 # 上
self.y = 16+$game_variables[136]
when 1 # 中
self.y = 160+$game_variables[136]
when 2 # 下
self.y = 304+$game_variables[136]
end
end
self.x = $game_variables[135]+80
self.width = [$game_variables[133]+480, 64].max
self.height = [$game_variables[134]+160, 64].max
self.contents.clear
self.contents.dispose
self.contents = Bitmap.new(width - 32, height - 32)
if $game_system.message_frame == 0
self.opacity = 255
else
self.opacity = 0
end
self.back_opacity = 160
end
复制代码
有用是有用,可是我要问的问题和4个选项还是会分开,不能同时显示,是不是还要改哪里才可以呢?
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1