Project1

标题: 怎么把这个窗口改成透明的,或者不要窗口。 [打印本页]

作者: 562613736    时间: 2013-12-22 15:48
标题: 怎么把这个窗口改成透明的,或者不要窗口。
本帖最后由 562613736 于 2013-12-22 16:13 编辑
  1. #==============================================================================
  2. # ■ Window_变量
  3. #------------------------------------------------------------------------------
  4. #  显示变量的窗口。
  5. #==============================================================================

  6. class Window_变量 < Window_Base
  7.   #--------------------------------------------------------------------------
  8.   # ● 初始化窗口
  9.   #--------------------------------------------------------------------------
  10.   def initialize
  11.     super(0, 0, 640, 60) #窗口大小200 是宽 200是高
  12.     self.contents = Bitmap.new(width - 32, height - 32)
  13.     refresh
  14.   end
  15.   #--------------------------------------------------------------------------
  16.   # ● 刷新
  17.   #--------------------------------------------------------------------------
  18.   def refresh
  19. self.contents.font.color = Color.new(0, 0, 0, 255) #字体颜色
  20. self.contents.clear
  21. self.contents.draw_text(-600, -10, width, 50, "X",2) #这里显示文字类,不需要的话可以删掉
  22. self.contents.draw_text(-570, -10, width, 50, "Y",2) #这里显示文字类,不需要的话可以删掉
  23. self.contents.draw_text(-500, -10, width, 50, "年",2) #这里显示文字类,不需要的话可以删掉
  24. self.contents.draw_text(-450, -10, width, 50, "月",2) #这里显示文字类,不需要的话可以删掉
  25. self.contents.draw_text(-400, -10, width, 50, "日",2) #这里显示文字类,不需要的话可以删掉
  26. self.contents.draw_text(-345, -10, width, 50, "时",2) #这里显示文字类,不需要的话可以删掉
  27. self.contents.draw_text(-300, -10, width, 50, "分",2) #这里显示文字类,不需要的话可以删掉
  28. self.contents.draw_text(-250, -10, width, 50, "秒",2) #这里显示文字类,不需要的话可以删掉

  29. self.contents.draw_text(-305, -10, width, 50, $game_variables[1].to_s, 1) #这里显示变量1
  30. self.contents.draw_text(-275, -10, width, 50, $game_variables[2].to_s, 1) #这里显示变量2
  31. self.contents.draw_text(-220, -10, width, 50, $game_variables[3].to_s, 1) #这里显示变量3
  32. self.contents.draw_text(-170, -10, width, 50, $game_variables[4].to_s, 1) #这里显示变量4
  33. self.contents.draw_text(-115, -10, width, 50, $game_variables[5].to_s, 1) #这里显示变量5
  34. self.contents.draw_text(-55, -10, width, 50, $game_variables[6].to_s, 1) #这里显示变量6
  35. self.contents.draw_text(-15, -10, width, 50, $game_variables[7].to_s, 1) #这里显示变量7
  36. self.contents.draw_text(30, -10, width, 50, $game_variables[8].to_s, 1) #这里显示变量8
  37. #无限循环自己喜欢添加                     
  38.                      
  39.     end
  40. end
复制代码
怎么把这个窗口改成透明的,或者不要窗口。
作者: RyanBern    时间: 2013-12-22 16:05
在initialize那段的refresh前面填写self.opacity = 0
作者: 562613736    时间: 2013-12-22 16:10
RyanBern 发表于 2013-12-22 16:05
在initialize那段的refresh前面填写self.opacity = 0

能直接帮我改下吗?




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