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

Project1

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

[已经解决] 求教如何制作收集品图鉴

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
10 小时
注册时间
2008-12-19
帖子
10
跳转到指定楼层
1
发表于 2015-8-1 02:25:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
如题,在下正在试图使用XP制作一个剧情向游戏,然而不会怎么做收集品图鉴。
理想中是开始菜单能看到游戏中获得的东西的图鉴,即获得特殊道具后打开开关(解锁),然后每次读档之前可以点进去看看获得过的特殊道具图片和若干内容。
曾考虑过使用怪物图鉴修改,但是完全看不懂啊QAQ。如果在开始菜单比较难的话我可以弄成在人物界面进去,但是图鉴部分实在苦手。
求各位大大帮忙,或者发点类似的模板链接给我参考参考,谢谢!

Lv1.梦旅人

梦石
0
星屑
50
在线时间
90 小时
注册时间
2015-3-2
帖子
46
2
发表于 2015-8-1 05:58:56 | 只看该作者
建议你用变量来控制是否显示收集品(要是用开关太浪费),至于图鉴,能否考虑一下图片鉴赏呢,把一张图片用ps弄上收集品的图片与文字,并且还可以一个收集品一个样子,排列顺序可以随意变换,就省去了调用各种窗口与位图的麻烦,发挥空间会更大呢!

评分

参与人数 1星屑 +20 收起 理由
蝉岭Cicada + 20 塞糖

查看全部评分

人因为有难忘的记忆而变得坚强,这就是所谓的成长吧!
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
211
在线时间
845 小时
注册时间
2014-5-5
帖子
944
3
发表于 2015-8-1 12:35:10 | 只看该作者
补充二楼的
  1. #使用方法:
  2. #$gallery[ID] = true
  3. #sav = Scene_Picture_Gallery.new
  4. #sav.save
  5. #储存文件在6,7,15行修改
  6. if FileTest.exist?("cg.rxdata")
  7.   file = File.open("cg.rxdata", "rb")
  8.   $gallery = Marshal.load(file)
  9.   file.close
  10. else
  11.   $gallery = []
  12. end
  13. class Scene_Picture_Gallery
  14.   def save
  15.     file = File.open("cg.rxdata", "wb")
  16.     Marshal.dump($gallery, file)
  17.     file.close
  18.   end
  19. end
  20. #==============================================================================
  21. # +++ MOG XP - Picture Gallery (v1.0) +++
  22. #==============================================================================
  23. # By Moghunter
  24. # http://www.atelier-rgss.com/
  25. #==============================================================================
  26. # Sistema de galeria de imagens.
  27. #==============================================================================
  28. # Para ativar o script use o comando abaixo através de um evento usando o
  29. # comando chamar script. (Call Script)
  30. #
  31. # $scene = Scene_Picture_Gallery.new
  32. #
  33. #==============================================================================
  34. # Para disponibilizar as imagens na galeria você deverá usar o seguinte
  35. # código através do comando chamar script.
  36. #
  37. # $game_system.gallery[ID] = true
  38. #
  39. # EX   $game_system.gallery[10] = true
  40. #
  41. #==============================================================================
  42. # Você deverá criar uma pasta com o nome "Gallery" onde as imagens deverão
  43. # ser gravadas.
  44. #
  45. # Graphics/Gallery/
  46. #
  47. # A nomeação das imagens devem ser numéricas. (ID da imagem)
  48. # 0.jpg    (Imagem não disponível.)
  49. # 1.jpg
  50. # 2.jpg
  51. # 3.jpg
  52. # ...
  53. #
  54. # Prefira usar imagens com resoluções igual ou maior a 640x480 pixels.
  55. #
  56. #==============================================================================
  57. module MOG_PICTURE_GALLERY
  58.        #Quantidade maxima de imagens na galeria.
  59.        MAX_PICTURES = 30
  60. end  

  61. #==============================================================================
  62. # ■ Game_System
  63. #==============================================================================
  64. class Game_System
  65.   
  66. attr_accessor :gallery

  67. #------------------------------------------------------------------------------
  68. # ● Initialize
  69. #------------------------------------------------------------------------------   
  70. alias art_picture_initialize initialize
  71. def initialize
  72.       art_picture_initialize
  73.       @gallery = []
  74. end  
  75. end

  76. #==============================================================================
  77. # ■ RPG
  78. #==============================================================================
  79. module RPG
  80.   module Cache
  81.     def self.gallery(filename)
  82.         self.load_bitmap("Graphics/Gallery/", filename)
  83.     end
  84.   end
  85. end

  86. #==============================================================================
  87. # ■ Window_Base
  88. #==============================================================================
  89. class Window_Base < Window
  90.   #--------------------------------------------------------------------------
  91.   # Draw_Thumbnail
  92.   #--------------------------------------------------------------------------  
  93.   def draw_thumbnail(x,y,id)
  94.       image = RPG::Cache.gallery(id.to_s) rescue nil
  95.       return if image == nil
  96.       cw = image.width
  97.       ch = image.height
  98.       src_rect = Rect.new(0, 0, cw , ch)
  99.       src_rect2 = Rect.new(x, y, 150, 80)  
  100.       self.contents.stretch_blt(src_rect2, image, src_rect)
  101.   end
  102. end  

  103. #==============================================================================
  104. # ■ Window_Picture
  105. #==============================================================================
  106. class Window_Picture < Window_Selectable
  107.   
  108. #------------------------------------------------------------------------------
  109. # ● Initialize
  110. #------------------------------------------------------------------------------   
  111.   def initialize(page)
  112.       super(0, 64, 640, 365)
  113.       self.opacity = 0
  114.       @column_max = 3
  115.       @page = page
  116.       @pic_max = MOG_PICTURE_GALLERY::MAX_PICTURES
  117.       @pic_max = 1 if @pic_max <= 0
  118.       @pag_max = @pic_max / 9
  119.       if @pag_max == page
  120.          o = @pag_max * 9
  121.          o2 =  @pic_max - o
  122.          @item_max = o2
  123.       else
  124.          @item_max = 9
  125.       end  
  126.       refresh(page)
  127.       self.index = 0
  128.   end

  129. #------------------------------------------------------------------------------
  130. # ● Refresh
  131. #------------------------------------------------------------------------------   
  132.   def refresh(page = 0)
  133.       if self.contents != nil
  134.          self.contents.dispose
  135.          self.contents = nil
  136.       end
  137.       if @item_max > 0
  138.          self.contents = Bitmap.new(width - 32, row_max * 110)
  139.          for i in 0...@item_max
  140.             draw_item(i,page)
  141.          end
  142.       end
  143.   end
  144.   
  145. #------------------------------------------------------------------------------
  146. # ● draw_item
  147. #------------------------------------------------------------------------------   
  148.   def draw_item(index,page)
  149.       np = 9 * page
  150.       picture_number = index + 1 + np
  151.       x = 15 + index % 3 * 215
  152.       y = 12 + index / 3 *110
  153.       s = picture_number
  154.       s = 0 if $gallery[picture_number] == nil
  155.       draw_thumbnail(x,y,s)
  156.       self.contents.draw_text(x + 45,y + 70, 64, 32, "图片 - " + picture_number.to_s,1)
  157.   end
  158.   
  159. #------------------------------------------------------------------------------
  160. # ● update_cursor_rect
  161. #------------------------------------------------------------------------------   
  162.   def update_cursor_rect
  163.       if @index < 0
  164.          self.cursor_rect.empty
  165.          return
  166.       end
  167.       row = @index / @column_max
  168.       if row < self.top_row
  169.          self.top_row = row
  170.       end
  171.       if row > self.top_row + (self.page_row_max - 1)
  172.          self.top_row = row - (self.page_row_max - 1)
  173.       end
  174.       cursor_width = self.width / @column_max - 32
  175.       x = index % 3 * 215
  176.       y = index / 3 *110
  177.       self.cursor_rect.set(x, y, cursor_width, 105)
  178.   end   
  179. end

  180. #==============================================================================
  181. # ■ Scene_ArtPictures
  182. #==============================================================================
  183. class Scene_Picture_Gallery
  184. include MOG_PICTURE_GALLERY
  185.   
  186. #------------------------------------------------------------------------------
  187. # ● Main
  188. #------------------------------------------------------------------------------     
  189. def main
  190.      setup
  191.      create_background
  192.      create_window
  193.      create_image
  194.      create_cursor
  195.      create_button
  196.      execute_loop
  197.      execute_dispose
  198. end

  199. #------------------------------------------------------------------------------
  200. # ● Setup
  201. #------------------------------------------------------------------------------      
  202. def setup
  203.      @max_pictures = MAX_PICTURES
  204.      @max_pictures = 1 if @max_pictures <= 0
  205.      v = (@max_pictures / 9)
  206.      v2 = (v - 1) * 9
  207.      v3 = (@max_pictures - v2) - 9
  208.      if v3 != 0
  209.         @max_pages = (@max_pictures / 9) + 1
  210.      else
  211.         @max_pages = (@max_pictures / 9)
  212.      end  
  213.      @max_pages = 1 if @max_pages == 0
  214.      @aw_center = 0
  215.      @aw_left = 0
  216.      @aw_right = 0
  217.      @slide_type = 0
  218.      @page_old = 0
  219.      @picture_id = 0
  220.      @image_active = false
  221.      @old_index = 0
  222.      @picures_enabled = 0
  223.      @comp = 0
  224.      @ex = 0
  225.      @ey = 0
  226.      @ex_max = 0
  227.      @ey_max = 0
  228.      @ex_max_zoom = 0
  229.      @ey_max_zoom = 0
  230.      for i in 0..MAX_PICTURES
  231.          @picures_enabled += 1 if $gallery[i]
  232.      end  
  233. end  
  234.    
  235. #------------------------------------------------------------------------------
  236. # ● create_background
  237. #------------------------------------------------------------------------------        
  238. def create_background
  239.      @background = Sprite.new
  240.      @background.bitmap = RPG::Cache.gallery("Background")  
  241.      @background.z = 0
  242.      @background2 = Plane.new
  243.      @background2.bitmap = RPG::Cache.gallery("Background2")      
  244.      @background2.z = -1
  245. end

  246. #------------------------------------------------------------------------------
  247. # ● Create Window
  248. #------------------------------------------------------------------------------      
  249. def create_window
  250.      @info = Window_Help.new
  251.      @info.y = 416
  252.      @info.opacity = 0
  253.      @wp_page = 0
  254.      @wp_page_old = @wp_page
  255.      @wp_index = 0
  256.      @wp =[]
  257.      for i in 0...@max_pages
  258.          @wp[i] = Window_Picture.new(i)
  259.          @wp[i].x = 32 * i
  260.      end  
  261.      check_active_window(true)
  262.      refresh_info_window(true)
  263. end

  264. #------------------------------------------------------------------------------
  265. # ● Create_image
  266. #------------------------------------------------------------------------------        
  267. def create_image
  268.      @picture = Sprite.new
  269.      @picture.bitmap = RPG::Cache.gallery("")
  270.      @picture.z = 100
  271.      @picture.opacity = 0
  272. end

  273. #------------------------------------------------------------------------------
  274. # ● Check Active Window
  275. #------------------------------------------------------------------------------      
  276. def check_active_window(starting = false)
  277.      for i in 0...@max_pages
  278.         if i == @wp_page
  279.             @wp[@wp_page].active = true
  280.             @wp[@wp_page].visible = true
  281.             if @slide_type == 0   
  282.                @wp[@wp_page].x = 640
  283.             else
  284.                @wp[@wp_page].x = -640
  285.             end   
  286.          elsif i == @page_old  and starting == false
  287.             @wp[@page_old].active = false
  288.             @wp[@page_old].visible = true
  289.             @wp[@page_old].visible = false if starting
  290.             @wp[@page_old].x = 0     
  291.          else   
  292.             @wp[i].active = false
  293.             @wp[i].visible = false
  294.          end   
  295.      end  
  296. end

  297. #------------------------------------------------------------------------------
  298. # ● Create Button
  299. #------------------------------------------------------------------------------      
  300. def create_button
  301.      @button_image = RPG::Cache.gallery("Button")
  302.      @button_bitmap =  Bitmap.new(@button_image.width, @button_image.height)
  303.      @cw = @button_image.width
  304.      @ch = @button_image.height / 2
  305.      src_rect = Rect.new(0, 0, @cw, @ch)
  306.      @button_bitmap .blt(0,0, @button_image, src_rect)           
  307.      @button = Sprite.new
  308.      @button.bitmap = @button_bitmap
  309.      @button.y = 443
  310.      @button.z = 250
  311.      @button.opacity = 0
  312.      @button_fade_time = 0
  313. end

  314. #------------------------------------------------------------------------------
  315. # ● Create Cursor
  316. #------------------------------------------------------------------------------      
  317. def create_cursor
  318.      @cx1 = 0
  319.      @cx2 = 0
  320.      @cursor_speed = 0
  321.      image = RPG::Cache.gallery("Cursor")
  322.      @bitmap = Bitmap.new(image.width, image.height)
  323.      cw = image.width / 2
  324.      ch = image.height
  325.      src_rect = Rect.new(cw, 0, cw, ch)
  326.      @bitmap.blt(0,0, image, src_rect)     
  327.      @cursor1 = Sprite.new
  328.      @cursor1.bitmap = @bitmap
  329.      @cursor1.x = 0 + @cx1
  330.      @cursor1.y = 220
  331.      @cursor1.z = 200
  332.      @bitmap2 = Bitmap.new(image.width, image.height)
  333.      src_rect2 = Rect.new(0, 0, cw, ch)
  334.      @bitmap2.blt(0,0, image, src_rect2)         
  335.      @cursor2 = Sprite.new
  336.      @cursor2.bitmap = @bitmap2
  337.      @cursor2.x = 610 + @cx2
  338.      @cursor2.y = 220
  339.      @cursor2.z = 200
  340.      image.dispose
  341.      if @max_pages == 1
  342.         @cursor1.visible = false
  343.         @cursor2.visible = false
  344.      end   
  345. end

  346. #------------------------------------------------------------------------------
  347. # ● Execute Loop
  348. #------------------------------------------------------------------------------     
  349. def execute_loop
  350.      Graphics.transition
  351.      loop do
  352.           Graphics.update
  353.           Input.update
  354.           update
  355.           if $scene != self
  356.               break
  357.           end
  358.      end
  359. end

  360. #------------------------------------------------------------------------------
  361. # ● Execute Dispose
  362. #------------------------------------------------------------------------------      
  363. def execute_dispose
  364.      Graphics.freeze
  365.      for i in 0...@max_pages
  366.          @wp[i].dispose
  367.      end   
  368.      @info.dispose
  369.      if @picture.bitmap != nil
  370.         @picture.bitmap.dispose
  371.      end
  372.      @picture.dispose
  373.      @background.bitmap.dispose
  374.      @background.dispose
  375.      @background2.bitmap.dispose
  376.      @background2.dispose     
  377.      @bitmap.dispose
  378.      @bitmap2.dispose
  379.      @cursor1.bitmap.dispose
  380.      @cursor1.dispose     
  381.      @cursor2.bitmap.dispose
  382.      @cursor2.dispose
  383.      @button_bitmap.dispose
  384.      @button.bitmap.dispose
  385.      @button.dispose
  386.      @button_image.dispose
  387. end

  388. #------------------------------------------------------------------------------
  389. # ● Update
  390. #------------------------------------------------------------------------------      
  391. def update
  392.      @wp[@wp_page].update
  393.      @info.update
  394.      if @image_active  
  395.         update_command_image
  396.      else   
  397.         update_command
  398.      end   
  399.      update_slide
  400.      update_image_effect
  401.      update_cursor_animation
  402.      refresh_info_window
  403. end  
  404.   
  405. #------------------------------------------------------------------------------
  406. # ● update_cursor_animation
  407. #------------------------------------------------------------------------------        
  408. def update_cursor_animation
  409.      @cursor_speed += 1
  410.      case @cursor_speed
  411.         when 1..20
  412.            @cx1 += 1
  413.            @cx2 -= 1
  414.         when 21..40
  415.            @cx1 -= 1
  416.            @cx2 += 1         
  417.         else  
  418.         @cursor_speed = 0
  419.         @cx1 = 0
  420.         @cx2 = 0
  421.      end
  422.      @cursor1.x = 0 + @cx1
  423.      @cursor2.x = 610 + @cx2
  424. end
  425.    
  426. #------------------------------------------------------------------------------
  427. # ● Update Image Effect
  428. #------------------------------------------------------------------------------      
  429. def update_image_effect
  430.      return if @wp[@wp_page].x != 0
  431.      @button_fade_time -= 1 if @button_fade_time > 0
  432.      if @image_active
  433.         @picture.opacity += 25
  434.         if @button_fade_time != 0
  435.            @button.opacity += 10
  436.         else   
  437.            if @button.y < 640   
  438.               @button.opacity -= 15
  439.               @button.y += 1
  440.            end   
  441.         end  
  442.         @wp[@wp_page].contents_opacity -= 25
  443.         @info.contents_opacity -= 25
  444.         @background.opacity -= 25
  445.         @cursor1.opacity -= 25
  446.         @cursor2.opacity -= 25
  447.      else  
  448.         @picture.opacity -= 10
  449.         @button.opacity -= 25
  450.         @wp[@wp_page].contents_opacity += 25
  451.         @info.contents_opacity += 25
  452.         @background.opacity += 25
  453.         @cursor1.opacity += 25
  454.         @cursor2.opacity += 25        
  455.      end  
  456. end

  457. #------------------------------------------------------------------------------
  458. # ● Refresh Info Window
  459. #------------------------------------------------------------------------------      
  460. def refresh_info_window(starting = false)
  461.      return if @image_active
  462.      return if @wp_page_old == @wp_page and starting == false   
  463.      @wp_page_old = @wp_page
  464.      page = @wp_page + 1
  465.      @picture_id = (9 * @wp_page) + @wp[@wp_page].index  + 1
  466.      p_pages = "Page - " + page.to_s + " / " + @max_pages.to_s
  467.      comp  = "          Completed " + (@picures_enabled.to_f / @max_pictures.to_f * 100).truncate.to_s + "%"
  468.      p_number = "          Pictures " + @picures_enabled.to_s + " / " + @max_pictures.to_s
  469.      @info.set_text("            " + p_pages + comp + p_number)
  470. end   


  471. #------------------------------------------------------------------------------
  472. # ● Update Slide
  473. #------------------------------------------------------------------------------      
  474. def update_slide
  475.      @background2.ox += 1
  476.      return if @wp[@wp_page].x == 0  
  477.      slide_speed = 35
  478.      @picture.opacity = 0
  479.      @background.opacity = 255
  480.      if @slide_type == 1     
  481.         if @wp[@wp_page].x < 0
  482.            @wp[@wp_page].x += slide_speed
  483.            if @wp[@wp_page].x >= 0
  484.               @wp[@wp_page].x = 0
  485.            end
  486.          end
  487.         if @wp[@page_old].x < 640
  488.            @wp[@page_old].x += slide_speed
  489.            if @wp[@page_old].x >= 640
  490.               @wp[@page_old].x = 640
  491.            end
  492.          end         
  493.        else     
  494.          if @wp[@wp_page].x > 0
  495.             @wp[@wp_page].x -= slide_speed
  496.             if @wp[@wp_page].x <= 0  
  497.                @wp[@wp_page].x = 0
  498.             end   
  499.          end
  500.          if @wp[@page_old].x > -640
  501.             @wp[@page_old].x -= slide_speed
  502.             if @wp[@page_old].x <= -640
  503.                @wp[@page_old].x = -640
  504.             end
  505.          end           
  506.        end
  507.        if @slide_type == 0   
  508.           @wp[@wp_page].x = 0 if @wp[@wp_page].x <= 0  
  509.        else
  510.            @wp[@wp_page].x = 0 if @wp[@wp_page].x >= 0
  511.        end  
  512. end

  513. #------------------------------------------------------------------------------
  514. # ● Check_limite
  515. #------------------------------------------------------------------------------        
  516. def check_limit
  517.      if @wp_page < 0
  518.         @wp_page = @max_pages - 1
  519.      elsif @wp_page >= @max_pages   
  520.         @wp_page = 0   
  521.      end
  522.      check_active_window
  523. end  

  524. #------------------------------------------------------------------------------
  525. # ● Update Command Image
  526. #------------------------------------------------------------------------------        
  527. def update_command_image
  528.      if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  529.         $game_system.se_play($data_system.cursor_se)
  530.         @image_active = false
  531.         @wp[@wp_page].active = true
  532.         return
  533.      end   
  534.      if Input.trigger?(Input::R) or Input.trigger?(Input::L)
  535.         $game_system.se_play($data_system.cursor_se)
  536.         execute_zoom      
  537.      end  
  538.      if Input.press?(Input::RIGHT)
  539.         @ex += 6
  540.      elsif Input.press?(Input::LEFT)
  541.         @ex -= 6
  542.      elsif Input.press?(Input::DOWN)
  543.         @ey += 6
  544.      elsif Input.press?(Input::UP)   
  545.         @ey -= 6
  546.      end  
  547.      @ex = @ex_max + @ex_max_zoom if @ex > @ex_max + @ex_max_zoom
  548.      @ex = 0 if @ex < 0
  549.      @ey = @ey_max + @ey_max_zoom if @ey > @ey_max + @ey_max_zoom
  550.      @ey = 0 if @ey < 0        
  551.      @picture.x = -@ex
  552.      @picture.y = -@ey
  553. end  

  554. #------------------------------------------------------------------------------
  555. # ● Execute Zoom
  556. #------------------------------------------------------------------------------         
  557. def execute_zoom
  558.      if @picture.zoom_x == 1.0
  559.         @picture.zoom_x = 1.5
  560.         @picture.zoom_y = 1.5
  561.         refresh_button(1)
  562.         @ex_max_zoom = (@picture.bitmap.width / 2)
  563.         if @ex != @ex_max
  564.            @ex += @ex_max_zoom / 2         
  565.         else   
  566.            if @ex_max != 0   
  567.               @ex += @ex_max_zoom
  568.            else   
  569.               @ex += @ex_max_zoom / 2
  570.            end  
  571.         end  
  572.         @ey_max_zoom = (@picture.bitmap.height / 2)
  573.         if @ey != @ey_max
  574.            @ey += @ey_max_zoom / 2         
  575.         else   
  576.            if @ey_max != 0   
  577.               @ey += @ey_max_zoom
  578.            else   
  579.               @ey += @ey_max_zoom / 2
  580.            end  
  581.          end  
  582.       else
  583.         if @picture.bitmap.width > 640 or
  584.            @picture.bitmap.height > 480
  585.            refresh_button(1)
  586.         else
  587.            refresh_button(0)
  588.         end           
  589.         @ex -= @ex_max_zoom / 2
  590.         @ey -= @ey_max_zoom / 2           
  591.         @picture.zoom_x = 1.0
  592.         @picture.zoom_y = 1.0   
  593.         @ex_max_zoom = 0
  594.         @ey_max_zoom = 0
  595.      end     
  596. end  

  597. #------------------------------------------------------------------------------
  598. # ● check_avaliable_picture?
  599. #------------------------------------------------------------------------------        
  600. def check_avaliable_picture?
  601.      @picture_id = (9 * @wp_page) + @wp[@wp_page].index  + 1
  602.      return false if $gallery[@picture_id] == nil
  603.      return true
  604. end  

  605. #------------------------------------------------------------------------------
  606. # ● create_bitmap
  607. #------------------------------------------------------------------------------        
  608. def create_bitmap
  609.      @picture.opacity = 0
  610.      @picture.bitmap.dispose
  611.      @picture.bitmap = RPG::Cache.gallery(@picture_id.to_s) rescue nil
  612.      @ex = 0
  613.      @ey = 0
  614.      @ex_max_zoom = 0
  615.      @ey_max_zoom = 0
  616.      @picture.zoom_x = 1.0
  617.      @picture.zoom_y = 1.0      
  618.      if @picture.bitmap == nil
  619.         @picture.bitmap = RPG::Cache.gallery("")
  620.         refresh_button(0)
  621.         return
  622.      end  
  623.      if @picture.bitmap.width > 640
  624.         @ex_max = @picture.bitmap.width - 640
  625.      else
  626.         @ex_max = 0
  627.      end
  628.      if @picture.bitmap.height > 480
  629.         @ey_max = @picture.bitmap.height - 480  
  630.      else
  631.         @ey_max = 0
  632.      end   
  633.      if @picture.bitmap.width > 640 or
  634.         @picture.bitmap.height > 480
  635.         refresh_button(1)
  636.      else
  637.         refresh_button(0)
  638.      end
  639. end  

  640. #------------------------------------------------------------------------------
  641. # ● Refresh Button
  642. #------------------------------------------------------------------------------        
  643. def refresh_button(type = 0)
  644.      @button.bitmap.clear
  645.      if type == 0
  646.         src_rect = Rect.new(0, 0, @cw, @ch)
  647.      else
  648.         src_rect = Rect.new(0, @ch, @cw, @ch)
  649.      end  
  650.      @button_bitmap .blt(0,0, @button_image, src_rect)  
  651.      @button.y = 443
  652.      @button_fade_time = 120
  653.      @button.opacity = 0 unless @button.y == 443
  654. end   

  655. #------------------------------------------------------------------------------
  656. # ● Update Command
  657. #------------------------------------------------------------------------------      
  658. def update_command
  659.      return if @wp[@wp_page].x != 0
  660.      if Input.trigger?(Input::B)
  661.         $game_system.se_play($data_system.cursor_se)
  662.         save
  663.         $scene = Scene_Map.new
  664.         $game_system.bgm_play($data_system.title_bgm)
  665.         return
  666.      end
  667.      if Input.trigger?(Input::C)
  668.         if check_avaliable_picture?
  669.            $game_system.se_play($data_system.decision_se)
  670.            @image_active = true
  671.            @wp[@wp_page].active = false
  672.            create_bitmap
  673.         else
  674.           $game_system.se_play($data_system.buzzer_se)
  675.         end
  676.         return
  677.      end  
  678.      if Input.trigger?(Input::L) and @max_pages != 1
  679.         $game_system.se_play($data_system.cursor_se)
  680.         @page_old = @wp_page
  681.         @wp_page -= 1
  682.         @slide_type = 1
  683.         check_limit
  684.         return
  685.      elsif Input.trigger?(Input::R) and @max_pages != 1   
  686.         $game_system.se_play($data_system.cursor_se)
  687.         @page_old = @wp_page
  688.         @wp_page += 1
  689.         @slide_type = 0
  690.         check_limit
  691.         return
  692.      end  
  693. end  
  694. end  

  695. $mog_xp_picture_gallery = true
复制代码

评分

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

查看全部评分

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
10 小时
注册时间
2008-12-19
帖子
10
4
 楼主| 发表于 2015-8-1 23:37:32 | 只看该作者
星辰浩劫 发表于 2015-8-1 05:58
建议你用变量来控制是否显示收集品(要是用开关太浪费),至于图鉴,能否考虑一下图片鉴赏呢,把一张图片用 ...

非常感谢!XD(`・ω・´)
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
10 小时
注册时间
2008-12-19
帖子
10
5
 楼主| 发表于 2015-8-1 23:38:13 | 只看该作者
邪月长啸 发表于 2015-8-1 12:35
补充二楼的

非常感谢!!XD
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-23 07:25

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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