| 赞 | 0  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 1 | 
 
| 经验 | 646 | 
 
| 最后登录 | 2013-8-25 | 
 
| 在线时间 | 29 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 50 
 
        - 在线时间
 - 29 小时
 
        - 注册时间
 - 2012-10-1
 
        - 帖子
 - 21
 
 
 
 | 
	
6楼
 
 
 楼主 |
发表于 2012-10-23 09:30:43
|
只看该作者
 
 
 
csl15975300 发表于 2012-10-23 09:24 ![]()  
今天电脑好好的。。目前没问题但无法保证明天。。明天出问题。我在使用以你的方法 ...  
变了。。今天的脚本又变了了问题  Window_MapName 
 
 
 
#encoding:utf-8 
#============================================================================== 
# ■ Window_MapName 
#------------------------------------------------------------------------------ 
#  显示地图名称的窗口。 
#============================================================================== 
 
class Window_MapName < Window_Base 
  #-------------------------------------------------------------------------- 
  # ● 初始化对象 
  #-------------------------------------------------------------------------- 
  def initialize 
    super(0, 0, window_width, fitting_height(1)) 
    self.opacity = 0 
    self.contents_opacity = 0 
    @show_count = 0 
    refresh 
  end 
  #-------------------------------------------------------------------------- 
  # ● 获取窗口的宽度 
  #-------------------------------------------------------------------------- 
  def window_width 
    return 240 
  end 
  #-------------------------------------------------------------------------- 
  # ● 更新画面 
  #-------------------------------------------------------------------------- 
  def update 
    super 
    if @show_count > 0 && $game_map.name_display 
      update_fadein 
      @show_count -= 1 
    else 
      update_fadeout 
    end 
  end 
  #-------------------------------------------------------------------------- 
  # ● 更新淡入 
  #-------------------------------------------------------------------------- 
  def update_fadein 
    self.contents_opacity += 16 
  end 
  #-------------------------------------------------------------------------- 
  # ● 更新淡出 
  #-------------------------------------------------------------------------- 
  def update_fadeout 
    self.contents_opacity -= 16 
  end 
  #-------------------------------------------------------------------------- 
  # ● 打开窗口 
  #-------------------------------------------------------------------------- 
  def open 
    refresh 
    @show_count = 150 
    self.contents_opacity = 0 
    self 
  end 
  #-------------------------------------------------------------------------- 
  # ● 关闭窗口 
  #-------------------------------------------------------------------------- 
  def close 
    @show_count = 0 
    self 
  end 
  #-------------------------------------------------------------------------- 
  # ● 刷新 
  #-------------------------------------------------------------------------- 
def refresh 
    contents.clear 
    unless $game_map.display_name.empty? 
      draw_background(contents.rect) 
      rect = Rect.new(0,0,contents.width,line_height) #定义第一行的位置 
      draw_text(rect, $game_map.display_name, 1) #在第一行画出地图的显示名称 
      rect = Rect.new(0,line_height,contents.width,line_height) #定义第二行的位置,为第一行往下一行 
      draw_text(rect, $game_map.note, 1) #在第二行画出地图的备注名称 
    end 
  end 
  #-------------------------------------------------------------------------- 
  # ● 绘制背景 
  #-------------------------------------------------------------------------- 
  def draw_background(rect) 
    temp_rect = rect.clone 
    temp_rect.width /= 2 
    contents.gradient_fill_rect(temp_rect, back_color2, back_color1) 
    temp_rect.x = temp_rect.width 
    contents.gradient_fill_rect(temp_rect, back_color1, back_color2) 
  end 
  #-------------------------------------------------------------------------- 
  # ● 获取背景色 1 
  #-------------------------------------------------------------------------- 
  def back_color1 
    Color.new(0, 0, 0, 192) 
  end 
  #-------------------------------------------------------------------------- 
  # ● 获取背景色 2 
  #-------------------------------------------------------------------------- 
  def back_color2 
    Color.new(0, 0, 0, 0) 
  end 
end 
 
 
 
 
 
 
 
 
 
 
 
 #-------------------------------------------------------------------------- 
  # ● 刷新 
  #-------------------------------------------------------------------------- 
def refresh 
    contents.clear 
    unless $game_map.display_name.empty? 
      draw_background(contents.rect) 
      rect = Rect.new(0,0,contents.width,line_height) #定义第一行的位置 
      draw_text(rect, $game_map.display_name, 1) #在第一行画出地图的显示名称 
      rect = Rect.new(0,line_height,contents.width,line_height) #定义第二行的位置,为第一行往下一行               这句有问题 
      draw_text(rect, $game_map.note, 1) #在第二行画出地图的备注名称 
    end 
  end 
 
 
‘‘──csl15975300于2012-10-23 09:31补充以下内容: 
 
 draw_text(rect, $game_map.note, 1) #在第二行画出地图的备注名称 
这句。。。。 
’’ |   
 
 
 
 |