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

Project1

 找回密码
 注册会员
搜索

请教下:为什么我图片做的菜单只显示菜单其它地方是黑色

查看数: 2172 | 评论数: 8 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2012-6-10 23:53

正文摘要:

请教大神们,为什么我用图片做成的菜单,只能显示菜单图片,菜单之外全是黑屏呀。。。 不一定要详细教程,有大致思路也行呀。 图片我是在脚本中加入的,把系统的菜单全关了。 请教高手:如何去掉那些黑屏,让菜单的 ...

回复

wwwcctvty 发表于 2012-6-13 22:08:56
nty 改得已经是面目全非了谢谢各位大大帮忙
不过还是二楼的简洁,五楼辛苦了,不好意思分还是给二楼了
竹轩轩 发表于 2012-6-13 18:00:19
其实一用半透明菜单脚本就全解决了(即使菜单不透明,地图也会在)
liuziyuan201019 发表于 2012-6-12 11:23:16
LZ报错脚本22行,super(x,y,width,height,css)……
我的脚本14行,def initialize(x, y, width, height)……
很明显,楼主的脚本多了个修改的css
把我的脚本14行改为
  1. def initialize(x, y, width, height,css)
复制代码
试试看。楼主的脚本似乎有许多修改,我也不敢保证改后有效果……
liuziyuan201019 发表于 2012-6-11 21:53:05
  1. module Opacity_Menu
  2.   def create_screen
  3.     @screen = Spriteset_Map.new
  4.   end
  5.   def dispose_screen
  6.     @screen.dispose
  7.   end
  8. end

  9. module HS
  10.   OPACITY = 255
  11. end
  12. class Window_Base < Window
  13.   def initialize(x, y, width, height)
  14.     super()
  15.     @windowskin_name = $game_system.windowskin_name
  16.     self.windowskin = RPG::Cache.windowskin(@windowskin_name)
  17.     self.x = x
  18.     self.y = y
  19.     self.width = width
  20.     self.height = height
  21.     self.z = 100
  22.     if $scene.is_a?(Scene_Menu) or
  23.       $scene.is_a?(Scene_Item) or
  24.       $scene.is_a?(Scene_Skill) or
  25.       $scene.is_a?(Scene_Equip) or
  26.       $scene.is_a?(Scene_Status) or
  27.       $scene.is_a?(Scene_Save) or
  28.       $scene.is_a?(Scene_End) or
  29.       $scene.is_a?(Scene_Shop)
  30.       self.back_opacity = HS::OPACITY
  31.     end
  32.   end
  33. end

  34. class Scene_Menu
  35.   include Opacity_Menu
  36.   alias main_old main
  37.   def main
  38.     create_screen
  39.     main_old
  40.     dispose_screen
  41.   end
  42. end

  43. class Scene_Item
  44.   include Opacity_Menu
  45.   alias main_old main
  46.   def main
  47.     create_screen
  48.     main_old
  49.     dispose_screen
  50.   end
  51. end

  52. class Scene_Skill
  53.   include Opacity_Menu
  54.   alias main_old main
  55.   def main
  56.     create_screen
  57.     main_old
  58.     dispose_screen
  59.   end
  60. end

  61. class Scene_Equip
  62.   include Opacity_Menu
  63.   alias main_old main
  64.   def main
  65.     create_screen
  66.     main_old
  67.     dispose_screen
  68.   end
  69. end

  70. class Scene_Status
  71.   include Opacity_Menu
  72.   alias main_old main
  73.   def main
  74.     create_screen
  75.     main_old
  76.     dispose_screen
  77.   end
  78. end
复制代码

点评

我怎么一用就报错呀,我用的全键盘全鼠标脚本  发表于 2012-6-11 22:53
明特·布兰马修 发表于 2012-6-11 16:06:06
如果可以的话
上传个范例给我们看看
wwwcctvty 发表于 2012-6-11 16:01:15
我是直接改的scene_Menu的,没调用事件呀

点评

如樓上的IamI大大所說在scene_Menu的 def main 下加入$s = Spriteset_Map.new 在Graphics.freeze下加入$s.dispose  发表于 2012-6-11 16:17
IamI 发表于 2012-6-11 08:38:11
在图片菜单开始显示时:
$s = Spriteset_Map.new
在图片菜单交还时:
$s.dispose
适用于事件指令。

点评

5楼的脚本有点问题,等解决了我再认可你  发表于 2012-6-11 22:56
方法很好用,谢谢了  发表于 2012-6-11 22:55
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2025-5-20 02:09

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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