设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1092|回复: 1
打印 上一主题 下一主题

如何在脚本里更改对话框的大小?

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2006-10-17
帖子
112
跳转到指定楼层
1
发表于 2008-5-19 00:19:17 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
比如在Interpreter 1这个类下,通过开关控制,临时让对话框变高,应该怎么做?

  1.   #--------------------------------------------------------------------------
  2.   # ● 设置选择项 修改
  3.   #--------------------------------------------------------------------------
  4.   def setup_choices(parameters)
  5.     # choice_max 为设置选择项的项目数
  6.     if $game_switches[1]
  7.       $game_temp.choice_max = 4
  8.       $right_answer = rand(3)
  9.       # message_text 为设置选择项
  10.       if $right_answer==0
  11.         text0=$a[$game_variables[1]]
  12.       else
  13.         text0=$a[($game_variables[1]+rand(20)+1)%$a.size]
  14.       end
  15.       if $right_answer==1
  16.         text1=$a[$game_variables[1]]
  17.       else
  18.         text1=$a[($game_variables[1]+rand(20)+25)%$a.size]
  19.       end
  20.       if $right_answer==2
  21.         text2=$a[$game_variables[1]]
  22.       else
  23.         text2=$a[($game_variables[1]+rand(20)+55)%$a.size]
  24.       end
  25.       text3="你还有"+$game_variables[132].to_s+"次求助的机会"
  26.       $game_temp.message_text += text0+text1+text2+text3

  27.     else
  28.       $game_temp.choice_max = parameters[0].size
  29.       # message_text 为设置选择项
  30.       for text in parameters[0]
  31.         $game_temp.message_text += text + "\n"
  32.       end
  33.     end
  34.     # 设置取消的情况的处理
  35.     $game_temp.choice_cancel_type = parameters[1]
  36.     # 返回调用设置
  37.     current_indent = @list[@index].indent
  38.     $game_temp.choice_proc = Proc.new { |n| @branch[current_indent] = n }
  39.   end
复制代码
我的博客:http://golden124.bokee.com

Lv1.梦旅人

梦石
0
星屑
55
在线时间
0 小时
注册时间
2006-10-17
帖子
112
2
 楼主| 发表于 2008-5-19 00:40:03 | 只看该作者
看了以前的帖子改了这里:

  1.   #--------------------------------------------------------------------------
  2.   # ● 设置窗口位置与不透明度   ##修改过,关于对话框位置大小的调节
  3.   #--------------------------------------------------------------------------
  4.   def reset_window
  5.     if $game_temp.in_battle
  6.       self.y = 16+$game_variables[136]
  7.     else
  8.       case $game_system.message_position
  9.       when 0  # 上
  10.         self.y = 16+$game_variables[136]
  11.       when 1  # 中
  12.         self.y = 160+$game_variables[136]
  13.       when 2  # 下
  14.         self.y = 304+$game_variables[136]
  15.       end
  16.     end
  17.     self.x = $game_variables[135]+80   
  18.     self.width = [$game_variables[133]+480, 64].max
  19.     self.height = [$game_variables[134]+160, 64].max
  20.     self.contents.clear
  21.     self.contents.dispose
  22.     self.contents = Bitmap.new(width - 32, height - 32)
  23.     if $game_system.message_frame == 0
  24.       self.opacity = 255
  25.     else
  26.       self.opacity = 0
  27.     end
  28.     self.back_opacity = 160
  29.   end  
复制代码


有用是有用,可是我要问的问题和4个选项还是会分开,不能同时显示,是不是还要改哪里才可以呢?
我的博客:http://golden124.bokee.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-7-31 05:49

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表