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

Project1

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

[已经解决] 时间窗口透明和改颜色

[复制链接]

Lv1.梦旅人

梦石
0
星屑
115
在线时间
132 小时
注册时间
2009-9-16
帖子
60
跳转到指定楼层
1
发表于 2012-8-18 11:14:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
怎么改透明和更换颜色啊?

脚本下面

RUBY 代码复制
  1. #==============================================================================
  2.  
  3. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  4.  
  5. #==============================================================================
  6.  
  7. #==============================================================================
  8.  
  9. # ■ Window_PlayTime
  10.  
  11. #------------------------------------------------------------------------------
  12.  
  13. #  菜单画面显示游戏时间的窗口。
  14.  
  15. #==============================================================================
  16.  
  17.  
  18. class Window_PlayTime < Window_Base
  19.  
  20.   #--------------------------------------------------------------------------
  21.  
  22.   # ● 初始化对像
  23.  
  24.   #--------------------------------------------------------------------------
  25.  
  26.   def initialize
  27.  
  28.     super(0, 0, 160, 128 )
  29.  
  30.     self.contents = Bitmap.new(width - 32, height - 32)
  31.  
  32.     refresh
  33.  
  34.   end
  35.  
  36.   #--------------------------------------------------------------------------
  37.  
  38.   # ● 刷新
  39.  
  40.   #--------------------------------------------------------------------------
  41.  
  42.   def refresh
  43.  
  44.     self.contents.clear
  45.  
  46.     self.contents.font.color = system_color
  47.  
  48.     self.contents.draw_text(4, -4, 120, 32, "时间")
  49.  
  50.     @total_sec = Graphics.frame_count / Graphics.frame_rate
  51.  
  52.     t = Time.now
  53.  
  54. $game_variables[204] = t.wday  # 星期
  55.  
  56. $game_variables[208] = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"][$game_variables[204]]
  57.  
  58. text = sprintf("%02d:%02d:%02d", t.hour, t.min, t.sec)
  59. text2 = sprintf("%02d.%02d.%02d", t.year, t.month, t.day)
  60. text3 = sprintf($game_variables[208])
  61. self.contents.font.color = normal_color
  62.  
  63.     self.contents.draw_text(4, 24, 110, 32, text2, 2)
  64.  
  65.     self.contents.draw_text(-25, 48, 110, 32, text3, 2)
  66.  
  67.     self.contents.draw_text(-3, 72, 110, 32, text, 2)
  68.  
  69.     end
  70.  
  71.   #--------------------------------------------------------------------------
  72.  
  73.   # ● 刷新画面
  74.  
  75.   #--------------------------------------------------------------------------
  76.  
  77.   def update
  78.  
  79.     super
  80.  
  81.     if Graphics.frame_count / Graphics.frame_rate != @total_sec
  82.  
  83.       refresh
  84.  
  85.     end
  86.  
  87.   end
  88.  
  89. end
  90.  
  91. #==============================================================================
  92.  
  93. # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息
  94.  
  95. #==============================================================================





‘‘──547895913于2012-8-18 11:16补充以下内容:

我的时间窗口已经摆在地图上了 求透明指教 谢谢
’’

Lv3.寻梦者

双子人

梦石
0
星屑
3165
在线时间
3616 小时
注册时间
2009-4-4
帖子
4154

开拓者

2
发表于 2012-8-18 11:48:06 | 只看该作者
在30行self.contents = Bitmap.new(width - 32, height - 32)
下面插入:
  1. if $scene.is_a?(Scene_Map)
  2.   self.opacity = 不透明度
  3.   self.back_opacity = 不透明度
  4. end
复制代码

点评

啊??认可答案? 这里没有这个按钮哇...  发表于 2012-8-19 08:55

评分

参与人数 1星屑 +200 收起 理由
hcm + 200 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
115
在线时间
132 小时
注册时间
2009-9-16
帖子
60
3
 楼主| 发表于 2012-8-18 11:52:29 | 只看该作者
唔该!谢谢!!

点评

记得认可答案哦  发表于 2012-8-18 12:00
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-8 17:35

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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