Project1

标题: 真对话脚本里怎么能通过变量临时修改对话框大小呢? [打印本页]

作者: 玛德蓝娜    时间: 2008-3-19 21:00
标题: 真对话脚本里怎么能通过变量临时修改对话框大小呢?
用的是真对话加强脚本,有关对话框位置修改应该是这段吧……


# ● ウィンドウの位置と不透明度の設定
#--------------------------------------------------------------------------
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
      end
   elsif @popchar == -1
     self.x = -4
     self.y = -4
     self.width = 648
     self.height = 488
   else
     if $game_temp.in_battle
       self.y = 16
     else
       case $game_system.message_position
       when 0 # 上
         self.y = 16
       when 1 # 中
         self.y = 160
       when 2 # 下
         self.y = 304
       end
       self.x = 80
       if @face_file == nil
         self.width = 480
       else
         self.width = 600
         self.x -= 60
       end
       self.height = 160
     end
   end
   self.contents = Bitmap.new(self.width - 32, self.height - 32)
   if @face_file != nil
     self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
   end
   if @popchar == -1
     self.opacity = 255
     self.back_opacity = 0
   elsif $game_system.message_frame == 0
     self.opacity = 255
     self.back_opacity = 200
   else
     self.opacity = 0
     self.back_opacity =200
   end
end


改了下没有变化。应该具体修改哪个位置,做到可以修改变量就可以临时修改对话框大小。 [LINE]1,#dddddd[/LINE]版务信息:本贴由楼主自主结贴~
作者: 水迭澜    时间: 2008-3-19 22:44
大小:
self.width
self.height
改这两个就可以
作者: Iselia雪    时间: 2008-3-20 03:05
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1