Project1

标题: 怎样把对话框的长度加长? [打印本页]

作者: 最终剧    时间: 2007-6-26 04:17
提示: 作者被禁止或删除 内容自动屏蔽
作者: 最终剧    时间: 2007-6-26 04:17
提示: 作者被禁止或删除 内容自动屏蔽
作者: 精灵使者    时间: 2007-6-26 04:30
加长显然不合适,原因是字体太大吧 = =
在main的字体定义的下边添上一句
font.default_size = 20
这样对话框的字就能全部显示了。而且非常漂亮。
作者: 七夕小雨    时间: 2007-6-26 04:48
Window_Message类
如果你插入了新的对话脚本请修改你的对话脚本~

搜索def reset_window你会发现低下的东西

  1. def reset_window
  2.    # 判定
  3.    if @popchar >= 0
  4.      events = $game_map.events
  5.      if events != nil
  6.        character = get_character(@popchar)
  7.        x = [[character.screen_x - 0 - self.width / 2, 4].max, 636 - self.width].min
  8.        y = [[character.screen_y - 48 - self.height, 4].max, 476 - self.height].min
  9.        self.x = x
  10.        self.y = y
  11.      end
  12.    elsif @popchar == -1
  13.      self.x = -4
  14.      self.y = -4
  15.      self.width = 648
  16.      self.height = 488
  17.    else
  18.      if $game_temp.in_battle
  19.        self.y = 16
  20.      else
  21.        case $game_system.message_position
  22.        when 0 # 上
  23.          self.y = 16
  24.        when 1 # 中
  25.          self.y = 160
  26.        when 2 # 下
  27.          self.y = 320
  28.        end
  29.        self.x = -5
  30.        if @face_file == nil
  31.          self.width = 650
  32.        else
  33.          self.width = 650
  34.          self.x -= 60
  35.        end
  36.        self.height = 160
  37.      end
  38.    end
  39.    self.contents = Bitmap.new(self.width - 32, self.height - 32)
  40.    if @face_file != nil
  41.      self.contents.blt(16, 16, RPG::Cache.picture(@face_file), Rect.new(0, 0, 96, 96))
  42.    end
  43.    if @popchar == -1
  44.      self.opacity = 255
  45.      self.back_opacity = 0
  46.    elsif $game_system.message_frame == 0
  47.      self.opacity = 255
  48.      self.back_opacity = 255  
  49.    else
  50.      self.opacity = 0
  51.      self.back_opacity = 255
  52.    end
  53. end
复制代码


其中有self.x 与 self.width
配合修改即可 [LINE]1,#dddddd[/LINE]系统信息:本贴由版主絮儿认可为正确答案,66RPG感谢您的热情解答~
作者: 精灵使者    时间: 2007-6-26 04:56
如果想单纯的改长度的话,楼上正解。楼主想解决的问题就是默认字体会超出对话框外边的问题……
作者: 最终剧    时间: 2007-6-30 23:12
提示: 作者被禁止或删除 内容自动屏蔽




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