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

Project1

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

[已经过期] 请教一下有没有大大知道怎么在标题设置cg图鉴

[复制链接]

Lv1.梦旅人

梦石
0
星屑
55
在线时间
15 小时
注册时间
2006-10-12
帖子
15
跳转到指定楼层
1
发表于 2014-4-23 19:53:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 轩辕岚夜 于 2014-4-23 19:56 编辑

做游戏 我的美工 没问题 但是 我不会脚本呀,以前玩的xp 也是知其然不知所以然
现在我想要在标题页里面 加一个cg图鉴的脚本什么的 请问有大大知道怎么弄么?

QQ图片20140423194944.jpg (187.9 KB, 下载次数: 34)

QQ图片20140423194944.jpg

QQ图片20140423195638.jpg (205.88 KB, 下载次数: 31)

QQ图片20140423195638.jpg

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

2
发表于 2014-4-23 19:59:46 | 只看该作者
本帖最后由 VIPArcher 于 2015-8-27 12:25 编辑
  1. #==============================================================================
  2. # +++ MOG - Picture Gallery ACE (v1.2) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # http://www.atelier-rgss.com/
  6. #==============================================================================
  7. # Sistema de galeria de imagens.
  8. #==============================================================================
  9. # Para ativar o script use o comando abaixo através de um evento usando o
  10. # comando chamar script. (Call Script)
  11. #
  12. # SceneManager.call(Scene_Picture_Gallery)
  13. #
  14. #==============================================================================
  15. # Para disponibilizar as imagens na galeria você deverá usar o seguinte
  16. # código através do comando chamar script.
  17. #
  18. # $game_system.gallery[ID] = true
  19. #
  20. # EX   $game_system.gallery[10] = true
  21. #
  22. #==============================================================================
  23. # Você deverá criar uma pasta com o nome "Gallery" onde as imagens deverão
  24. # ser gravadas.
  25. #
  26. # Graphics/Gallery/
  27. #
  28. # A nomeação das imagens devem ser numéricas. (ID da imagem)
  29. # 0.jpg    (Imagem não disponível.)
  30. # 1.jpg
  31. # 2.jpg
  32. # 3.jpg
  33. # ...
  34. #
  35. # Prefira usar imagens com resoluções igual ou maior a 544x416 pixels.
  36. #==============================================================================
  37. # Histórico
  38. #
  39. # 1.1 - Opção de adicionar o command Picture Gallery no Menu principal.
  40. # 1.2 - Compatibilidade com o sistema de cursor.
  41. #
  42. #==============================================================================
  43. module MOG_PICTURE_GALLERY
  44.        #Quantidade maxima de imagens na galeria.
  45.        MAX_PICTURES = 40    #最大图片数
  46.        #Ativar o Scene Picture Gallery no Menu
  47.        PICTURE_GALLERY_MENU_COMMAND = true
  48.        #Nome do comando apresentado no menu.
  49.        PICTURE_GALLERY_COMMAND_NAME = "CG欣赏"
  50. end  

  51. #==============================================================================
  52. # ■ Game_System
  53. #==============================================================================
  54. class Game_System
  55.   
  56. attr_accessor :gallery

  57. #------------------------------------------------------------------------------
  58. # ● Initialize
  59. #------------------------------------------------------------------------------   
  60. alias art_picture_initialize initialize
  61. def initialize
  62.       art_picture_initialize
  63.       @gallery = []
  64. end  
  65. end

  66. #==============================================================================
  67. # ■ RPG
  68. #==============================================================================
  69. module Cache   
  70.    def self.gallery(filename)
  71.        load_bitmap("Graphics/Gallery/", filename) #路径
  72.     end
  73. end


  74. #==============================================================================
  75. # ■ Window_Base
  76. #==============================================================================
  77. class Window_Base < Window
  78.   
  79.   #--------------------------------------------------------------------------
  80.   # ● Draw_Thumbnail
  81.   #--------------------------------------------------------------------------  
  82.   def draw_thumbnail(x,y,id)
  83.       bitmap = Cache.gallery(id.to_s) rescue nil
  84.       return if bitmap == nil
  85.       src_rect = Rect.new(0, 0, bitmap.width , bitmap.height )
  86.       src_rect2 = Rect.new(x, y, 118, 59)  
  87.       self.contents.stretch_blt(src_rect2, bitmap, src_rect)
  88.       bitmap.dispose
  89.   end
  90. end  

  91. #==============================================================================
  92. # ■ Window_Picture
  93. #==============================================================================
  94. class Window_Picture < Window_Selectable
  95.   
  96. #------------------------------------------------------------------------------
  97. # ● Initialize
  98. #------------------------------------------------------------------------------   
  99.   def initialize(page)
  100.       super(0, 64, 544, 370)
  101.       self.opacity = 0
  102.       @index = -1
  103.       @page = page
  104.       @pic_max = MOG_PICTURE_GALLERY::MAX_PICTURES
  105.       @pic_max = 1 if @pic_max <= 0
  106.       @pag_max = @pic_max / 9
  107.       if @pag_max == page
  108.          o = @pag_max * 9
  109.          o2 =  @pic_max - o
  110.          @item_max = o2
  111.       else
  112.          @item_max = 9
  113.       end
  114.       @i_max =  @item_max
  115.       refresh(page)
  116.       select(0)
  117.       activate
  118.   end

  119. #------------------------------------------------------------------------------
  120. # ● Refresh
  121. #------------------------------------------------------------------------------   
  122.   def refresh(page = 0)
  123.       if self.contents != nil
  124.          self.contents.dispose
  125.          self.contents = nil
  126.       end
  127.       if @item_max > 0
  128.          self.contents = Bitmap.new(width - 32, 6 * 89)
  129.          for i in 0...@item_max
  130.             draw_item(i,page)
  131.          end
  132.       end
  133.   end
  134.   
  135. #------------------------------------------------------------------------------
  136. # ● draw_item
  137. #------------------------------------------------------------------------------   
  138.   def draw_item(index,page)
  139.       np = 9 * page
  140.       picture_number = index + 1 + np
  141.       x = 16 + index % 3 * 183
  142.       y = 12 + index / 3 * 89
  143.       s = picture_number
  144.       s = 0 if $game_system.gallery[picture_number] == nil
  145.       draw_thumbnail(x,y,s)
  146.       self.contents.draw_text(x + 30,y + 49, 64, 32, "NO." + picture_number.to_s,1)
  147.   end
  148.   
  149. #------------------------------------------------------------------------------
  150. # ● item_rect
  151. #------------------------------------------------------------------------------     
  152.   def item_rect(index)
  153.       rect = Rect.new(0, 0, 0, 0)
  154.       rect.width = 150
  155.       rect.height = 90
  156.       rect.x = @index % col_max * (rect.width + 32)
  157.       rect.y = @index / col_max * 90
  158.       return rect
  159.   end  
  160.    
  161. #------------------------------------------------------------------------------
  162. # ● Col Max
  163. #------------------------------------------------------------------------------      
  164.   def col_max
  165.       return 3
  166.   end
  167.    
  168. #------------------------------------------------------------------------------
  169. # ● Item Max
  170. #------------------------------------------------------------------------------         
  171.   def item_max
  172.       return @item_max == nil ? 0 : @item_max
  173.   end  
  174.   
  175. end

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

  196. #------------------------------------------------------------------------------
  197. # ● Create_Loading
  198. #------------------------------------------------------------------------------      
  199. def create_loading_text
  200.      @loading = Sprite.new
  201.      @loading.bitmap = Bitmap.new(100,32)
  202.      @loading.z = 300
  203.      @loading.bitmap.font.size = 20
  204.      @loading.bitmap.font.bold = true
  205.      @loading.bitmap.font.name = "Georgia"  
  206.      @loading.bitmap.draw_text(0,0, 100, 32, "Loading...",1)
  207.      @loading.x = (544 / 2) - 50
  208.      @loading.y = (416 / 2)
  209.      Graphics.transition(20)
  210. end  

  211. #------------------------------------------------------------------------------
  212. # ● Setup
  213. #------------------------------------------------------------------------------      
  214. def setup
  215.      @max_pictures = MAX_PICTURES
  216.      @max_pictures = 1 if @max_pictures <= 0
  217.      v = (@max_pictures / 9)
  218.      v2 = (v - 1) * 9
  219.      v3 = (@max_pictures - v2) - 9
  220.      if v3 != 0
  221.         @max_pages = (@max_pictures / 9) + 1
  222.      else
  223.         @max_pages = (@max_pictures / 9)
  224.      end  
  225.      @max_pages = 1 if @max_pages == 0
  226.      @aw_center = 0
  227.      @aw_left = 0
  228.      @aw_right = 0
  229.      @slide_type = 0
  230.      @page_old = 0
  231.      @picture_id = 0
  232.      @image_active = false
  233.      @old_index = 0
  234.      @picures_enabled = 0
  235.      @comp = 0
  236.      @ex = 0
  237.      @ey = 0
  238.      @ex_max = 0
  239.      @ey_max = 0
  240.      @ex_max_zoom = 0
  241.      @ey_max_zoom = 0
  242.      for i in 0..MAX_PICTURES
  243.          @picures_enabled += 1 if $game_system.gallery[i]
  244.      end  
  245. end  
  246.    
  247. #------------------------------------------------------------------------------
  248. # ● create_background
  249. #------------------------------------------------------------------------------        
  250. def create_background
  251.      @background = Sprite.new
  252.      @background.bitmap = Cache.gallery("Background")  
  253.      @background.z = 0
  254.      @background2 = Plane.new
  255.      @background2.bitmap = Cache.gallery("Background2")      
  256.      @background2.z = -1
  257. end

  258. #------------------------------------------------------------------------------
  259. # ● Create Window
  260. #------------------------------------------------------------------------------      
  261. def create_window
  262.      @info = Window_Help.new
  263.      @info.y = 360
  264.      @info.opacity = 0
  265.      @wp_page = 0
  266.      @wp_page_old = @wp_page
  267.      @wp_index = 0
  268.      @wp =[]
  269.      for i in 0...@max_pages
  270.          @wp[i] = Window_Picture.new(i)
  271.      end  
  272.      check_active_window(true)
  273.      refresh_info_window(true)
  274.      #@wp[@wp_page].x = 0
  275. end

  276. #------------------------------------------------------------------------------
  277. # ● Create_image
  278. #------------------------------------------------------------------------------        
  279. def create_image
  280.      @picture = Sprite.new
  281.      @picture.bitmap = Cache.gallery("")
  282.      @picture.z = 100
  283.      @picture.opacity = 0
  284. end

  285. #------------------------------------------------------------------------------
  286. # ● Check Active Window
  287. #------------------------------------------------------------------------------      
  288. def check_active_window(starting = false)
  289.      for i in 0...@max_pages
  290.         if i == @wp_page
  291.             @wp[@wp_page].active = true
  292.             @wp[@wp_page].visible = true
  293.             if @slide_type == 0   
  294.                @wp[@wp_page].x = 544
  295.             else
  296.                @wp[@wp_page].x = -544
  297.             end   
  298.          elsif i == @page_old  and starting == false
  299.             @wp[@page_old].active = false
  300.             @wp[@page_old].visible = true
  301.             @wp[@page_old].visible = false if starting
  302.             @wp[@page_old].x = 0     
  303.          else   
  304.             @wp[i].active = false
  305.             @wp[i].visible = false
  306.          end   
  307.      end  
  308. end

  309. #------------------------------------------------------------------------------
  310. # ● Create Button
  311. #------------------------------------------------------------------------------      
  312. def create_button
  313.      @button_image = Cache.gallery("Button")
  314.      @button_bitmap =  Bitmap.new(@button_image.width, @button_image.height)
  315.      @cw = @button_image.width
  316.      @ch = @button_image.height / 2
  317.      src_rect = Rect.new(0, 0, @cw, @ch)
  318.      @button_bitmap .blt(0,0, @button_image, src_rect)           
  319.      @button = Sprite.new
  320.      @button.bitmap = @button_bitmap
  321.      @button.y = 443
  322.      @button.z = 250
  323.      @button.opacity = 0
  324.      @button_fade_time = 0
  325. end

  326. #------------------------------------------------------------------------------
  327. # ● Create Cursor
  328. #------------------------------------------------------------------------------      
  329. def create_cursor
  330.      @cx1 = 0
  331.      @cx2 = 0
  332.      @cursor_speed = 0
  333.      image = Cache.gallery("Cursor")
  334.      @bitmap = Bitmap.new(image.width, image.height)
  335.      cw = image.width / 2
  336.      ch = image.height
  337.      src_rect = Rect.new(cw, 0, cw, ch)
  338.      @bitmap.blt(0,0, image, src_rect)     
  339.      @cursor1 = Sprite.new
  340.      @cursor1.bitmap = @bitmap
  341.      @cursor1.x = 0 + @cx1
  342.      @cursor1.y = 190
  343.      @cursor1.z = 200
  344.      @bitmap2 = Bitmap.new(image.width, image.height)
  345.      src_rect2 = Rect.new(0, 0, cw, ch)
  346.      @bitmap2.blt(0,0, image, src_rect2)         
  347.      @cursor2 = Sprite.new
  348.      @cursor2.bitmap = @bitmap2
  349.      @cursor2.x = 514 + @cx2
  350.      @cursor2.y = 190
  351.      @cursor2.z = 200
  352.      image.dispose
  353.      if @max_pages == 1
  354.         @cursor1.visible = false
  355.         @cursor2.visible = false
  356.      end   
  357. end

  358. #------------------------------------------------------------------------------
  359. # ● Execute Loop
  360. #------------------------------------------------------------------------------     
  361. def execute_loop
  362.      loop do
  363.           Graphics.update
  364.           Input.update
  365.           update
  366.           if SceneManager.scene != self
  367.               break
  368.           end
  369.      end
  370. end

  371. #------------------------------------------------------------------------------
  372. # ● Execute Dispose
  373. #------------------------------------------------------------------------------      
  374. def execute_dispose
  375.      Graphics.freeze
  376.      for i in 0...@max_pages
  377.          @wp[i].dispose
  378.      end   
  379.      @info.dispose
  380.      if @picture.bitmap != nil
  381.         @picture.bitmap.dispose
  382.      end
  383.      @picture.dispose
  384.      @background.bitmap.dispose
  385.      @background.dispose
  386.      @background2.bitmap.dispose
  387.      @background2.dispose     
  388.      @bitmap.dispose
  389.      @bitmap2.dispose
  390.      @cursor1.bitmap.dispose
  391.      @cursor1.dispose     
  392.      @cursor2.bitmap.dispose
  393.      @cursor2.dispose
  394.      @button_bitmap.dispose
  395.      @button.bitmap.dispose
  396.      @button.dispose
  397.      @button_image.dispose
  398.      if @loading != nil
  399.         @loading.bitmap.dispose
  400.         @loading.dispose
  401.      end   
  402. end

  403. #------------------------------------------------------------------------------
  404. # ● Update
  405. #------------------------------------------------------------------------------      
  406. def update
  407.      @wp.each {|wid| wid.update}
  408.      @info.update
  409.      if @image_active  
  410.         update_command_image
  411.      else   
  412.         update_command
  413.      end   
  414.      update_slide
  415.      update_image_effect
  416.      update_cursor_animation
  417.      refresh_info_window
  418. end  
  419.   
  420. #------------------------------------------------------------------------------
  421. # ● update_cursor_animation
  422. #------------------------------------------------------------------------------        
  423. def update_cursor_animation
  424.      @cursor_speed += 1
  425.      case @cursor_speed
  426.         when 1..20
  427.            @cx1 += 1
  428.            @cx2 -= 1
  429.         when 21..40
  430.            @cx1 -= 1
  431.            @cx2 += 1         
  432.         else  
  433.         @cursor_speed = 0
  434.         @cx1 = 0
  435.         @cx2 = 0
  436.      end
  437.      @cursor1.x = 0 + @cx1
  438.      @cursor2.x = 514 + @cx2
  439. end
  440.    
  441. #------------------------------------------------------------------------------
  442. # ● Update Image Effect
  443. #------------------------------------------------------------------------------      
  444. def update_image_effect
  445.      return if @wp[@wp_page].x != 0
  446.      @button_fade_time -= 1 if @button_fade_time > 0
  447.      if @image_active
  448.         @picture.opacity += 15
  449.         if @button_fade_time != 0
  450.            @button.opacity += 5
  451.         else   
  452.            if @button.y < 416   
  453.               @button.opacity -= 10
  454.               @button.y += 1
  455.            end   
  456.         end  
  457.         @wp[@wp_page].contents_opacity -= 15
  458.         @info.contents_opacity -= 15
  459.         @background.opacity -= 15
  460.         @cursor1.opacity -= 15
  461.         @cursor2.opacity -= 15
  462.      else  
  463.         @picture.opacity -= 10
  464.         @button.opacity -= 15
  465.         @wp[@wp_page].contents_opacity += 15
  466.         @info.contents_opacity += 15
  467.         @background.opacity += 15
  468.         @cursor1.opacity += 15
  469.         @cursor2.opacity += 15        
  470.      end  
  471. end

  472. #------------------------------------------------------------------------------
  473. # ● Refresh Info Window
  474. #------------------------------------------------------------------------------      
  475. def refresh_info_window(starting = false)
  476.      return if @image_active
  477.      return if @wp_page_old == @wp_page and starting == false   
  478.      @wp_page_old = @wp_page
  479.      page = @wp_page + 1
  480.      @picture_id = (9 * @wp_page) + @wp[@wp_page].index  + 1
  481.      p_pages = "页数 - " + page.to_s + " / " + @max_pages.to_s
  482.      comp  = "   收集程度 " + (@picures_enabled.to_f / @max_pictures.to_f * 100).truncate.to_s + "%"
  483.      p_number = "   已收集 " + @picures_enabled.to_s + " / " + @max_pictures.to_s
  484.      @info.set_text("            " + p_pages + comp + p_number)
  485. end   

  486. #------------------------------------------------------------------------------
  487. # ● Update Slide
  488. #------------------------------------------------------------------------------      
  489. def update_slide
  490.      @background2.ox += 1
  491.      if @loading != nil
  492.         @loading.opacity -= 5
  493.         if @loading.opacity <= 0
  494.            @loading.bitmap.dispose
  495.            @loading.dispose
  496.            @loading = nil
  497.          end  
  498.      end   
  499.      return if @wp[@wp_page].x == 0  
  500.      slide_speed = 25
  501.      @picture.opacity = 0
  502.      @background.opacity = 255
  503.      if @slide_type == 1     
  504.         if @wp[@wp_page].x < 0
  505.            @wp[@wp_page].x += slide_speed
  506.            if @wp[@wp_page].x >= 0
  507.               @wp[@wp_page].x = 0
  508.            end
  509.          end
  510.         if @wp[@page_old].x < 640
  511.            @wp[@page_old].x += slide_speed
  512.            if @wp[@page_old].x >= 544
  513.               @wp[@page_old].x = 544
  514.            end
  515.          end         
  516.        else     
  517.          if @wp[@wp_page].x > 0
  518.             @wp[@wp_page].x -= slide_speed
  519.             if @wp[@wp_page].x <= 0  
  520.                @wp[@wp_page].x = 0
  521.             end   
  522.          end
  523.          if @wp[@page_old].x > -544
  524.             @wp[@page_old].x -= slide_speed
  525.             if @wp[@page_old].x <= -544
  526.                @wp[@page_old].x = -544
  527.             end
  528.          end           
  529.        end
  530.        if @slide_type == 0   
  531.           @wp[@wp_page].x = 0 if @wp[@wp_page].x <= 0  
  532.        else
  533.            @wp[@wp_page].x = 0 if @wp[@wp_page].x >= 0
  534.        end  
  535. end

  536. #------------------------------------------------------------------------------
  537. # ● Check_limite
  538. #------------------------------------------------------------------------------        
  539. def check_limit
  540.      if @wp_page < 0
  541.         @wp_page = @max_pages - 1
  542.      elsif @wp_page >= @max_pages   
  543.         @wp_page = 0   
  544.      end
  545.      check_active_window
  546. end  

  547. #------------------------------------------------------------------------------
  548. # ● Update Command Image
  549. #------------------------------------------------------------------------------        
  550. def update_command_image
  551.      if Input.trigger?(Input::B) or Input.trigger?(Input::C)
  552.         Sound.play_cursor
  553.         @image_active = false
  554.         @wp[@wp_page].active = true
  555.         return
  556.      end   
  557.      if Input.trigger?(Input::R) or Input.trigger?(Input::L)
  558.         Sound.play_cursor
  559.         execute_zoom      
  560.      end  
  561.      if Input.press?(Input::RIGHT)
  562.         @ex += 4
  563.      elsif Input.press?(Input::LEFT)
  564.         @ex -= 4
  565.      elsif Input.press?(Input::DOWN)
  566.         @ey += 4
  567.      elsif Input.press?(Input::UP)   
  568.         @ey -= 4
  569.      end  
  570.      @ex = @ex_max + @ex_max_zoom if @ex > @ex_max + @ex_max_zoom
  571.      @ex = 0 if @ex < 0
  572.      @ey = @ey_max + @ey_max_zoom if @ey > @ey_max + @ey_max_zoom
  573.      @ey = 0 if @ey < 0        
  574.      @picture.x = -@ex
  575.      @picture.y = -@ey
  576. end  

  577. #------------------------------------------------------------------------------
  578. # ● Execute Zoom
  579. #------------------------------------------------------------------------------         
  580. def execute_zoom
  581.      if @picture.zoom_x == 1.0
  582.         @picture.zoom_x = 1.5
  583.         @picture.zoom_y = 1.5
  584.         refresh_button(1)
  585.         @ex_max_zoom = (@picture.bitmap.width / 2)
  586.         if @ex != @ex_max
  587.            @ex += @ex_max_zoom / 2         
  588.         else   
  589.            if @ex_max != 0   
  590.               @ex += @ex_max_zoom
  591.            else   
  592.               @ex += @ex_max_zoom / 2
  593.            end  
  594.         end  
  595.         @ey_max_zoom = (@picture.bitmap.height / 2)
  596.         if @ey != @ey_max
  597.            @ey += @ey_max_zoom / 2         
  598.         else   
  599.            if @ey_max != 0   
  600.               @ey += @ey_max_zoom
  601.            else   
  602.               @ey += @ey_max_zoom / 2
  603.            end  
  604.          end  
  605.       else
  606.         if @picture.bitmap.width > 640 or
  607.            @picture.bitmap.height > 480
  608.            refresh_button(1)
  609.         else
  610.            refresh_button(0)
  611.         end           
  612.         @ex -= @ex_max_zoom / 2
  613.         @ey -= @ey_max_zoom / 2           
  614.         @picture.zoom_x = 1.0
  615.         @picture.zoom_y = 1.0   
  616.         @ex_max_zoom = 0
  617.         @ey_max_zoom = 0
  618.      end     
  619. end   

  620. #------------------------------------------------------------------------------
  621. # ● check_avaliable_picture?
  622. #------------------------------------------------------------------------------        
  623. def check_avaliable_picture?
  624.      @picture_id = (9 * @wp_page) + @wp[@wp_page].index  + 1
  625.      return false if $game_system.gallery[@picture_id] == nil
  626.      return true
  627. end  

  628. #------------------------------------------------------------------------------
  629. # ● create_bitmap
  630. #------------------------------------------------------------------------------        
  631. def create_bitmap
  632.      @picture.opacity = 0
  633.      @picture.bitmap.dispose
  634.      @picture.bitmap = Cache.gallery(@picture_id.to_s) rescue nil
  635.      @ex = 0
  636.      @ey = 0
  637.      @ex_max_zoom = 0
  638.      @ey_max_zoom = 0
  639.      @picture.zoom_x = 1.0
  640.      @picture.zoom_y = 1.0      
  641.      if @picture.bitmap == nil
  642.         @picture.bitmap = Cache.gallery("")
  643.         refresh_button(0)
  644.         return
  645.      end  
  646.      if @picture.bitmap.width > 544
  647.         @ex_max = @picture.bitmap.width - 544
  648.      else
  649.         @ex_max = 0
  650.      end
  651.      if @picture.bitmap.height > 416
  652.         @ey_max = @picture.bitmap.height - 416
  653.      else
  654.         @ey_max = 0
  655.      end   
  656.      if @picture.bitmap.width > 544 or
  657.         @picture.bitmap.height > 416
  658.         refresh_button(1)
  659.      else
  660.         refresh_button(0)
  661.      end
  662. end


  663. #------------------------------------------------------------------------------
  664. # ● Refresh Button
  665. #------------------------------------------------------------------------------        
  666. def refresh_button(type = 0)
  667.      @button.bitmap.clear
  668.      if type == 0
  669.         src_rect = Rect.new(0, 0, @cw, @ch)
  670.      else
  671.         src_rect = Rect.new(0, @ch, @cw, @ch)
  672.      end  
  673.      @button_bitmap .blt(0,0, @button_image, src_rect)  
  674.      @button.y = 379
  675.      @button_fade_time = 120
  676.      @button.opacity = 0 unless @button.y == 379
  677. end   

  678. #------------------------------------------------------------------------------
  679. # ● Update Command
  680. #------------------------------------------------------------------------------      
  681. def update_command
  682.      return if @wp[@wp_page].x != 0
  683.      if Input.trigger?(Input::B)
  684.         Sound.play_cancel
  685.         SceneManager.return
  686.         return
  687.      end
  688.      if Input.trigger?(Input::C)
  689.         if check_avaliable_picture?
  690.            Sound.play_ok
  691.            @image_active = true
  692.            @wp[@wp_page].active = false
  693.            create_bitmap
  694.         else
  695.           Sound.play_buzzer
  696.         end
  697.         return
  698.      end  
  699.      if Input.trigger?(Input::L) and @max_pages != 1
  700.         Sound.play_cursor
  701.         @page_old = @wp_page
  702.         @wp_page -= 1
  703.         @slide_type = 1
  704.         check_limit
  705.         return
  706.      elsif Input.trigger?(Input::R) and @max_pages != 1   
  707.         Sound.play_cursor
  708.         @page_old = @wp_page
  709.         @wp_page += 1
  710.         @slide_type = 0
  711.         check_limit
  712.         return
  713.      end  
  714. end  
  715. end  

  716. if MOG_PICTURE_GALLERY::PICTURE_GALLERY_MENU_COMMAND
  717. #==============================================================================
  718. # ■ Window Menu Command
  719. #==============================================================================
  720. # class Window_MenuCommand < Window_Command  
  721.   
  722. #------------------------------------------------------------------------------
  723. # ● Add Main Commands
  724. #------------------------------------------------------------------------------     
  725. #   alias mog_picture_gallery_add_main_commands add_main_commands
  726. #   def add_main_commands
  727. #       mog_picture_gallery_add_main_commands
  728. #       add_command(MOG_PICTURE_GALLERY::PICTURE_GALLERY_COMMAND_NAME, :picture, main_commands_enabled)
  729. #   end
  730. # end   

  731. #==============================================================================
  732. # ■ Scene Menu
  733. #==============================================================================
  734. class Scene_Menu < Scene_MenuBase
  735.   
  736. #------------------------------------------------------------------------------
  737. # ● Create Command Windows
  738. #------------------------------------------------------------------------------      
  739.    alias mog_picture_gallery_create_command_window create_command_window
  740.    def create_command_window
  741.        mog_picture_gallery_create_command_window
  742.        @command_window.set_handler(:picture,     method(:Picture_Gallery))
  743.    end
  744.    
  745. #------------------------------------------------------------------------------
  746. # ● Picture Gallery
  747. #------------------------------------------------------------------------------        
  748.    def Picture_Gallery
  749.        SceneManager.call(Scene_Picture_Gallery)
  750.    end

  751. end   
  752. #  
  753. end

  754. $mog_rgss3_picture_gallery = true
复制代码

评分

参与人数 1星屑 +200 收起 理由
taroxd + 200 辛苦费=。=

查看全部评分

回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

3
发表于 2014-4-23 20:00:30 | 只看该作者
本帖最后由 VIPArcher 于 2014-4-23 20:04 编辑

一些必要的素材稍后发

Gallery.rar

1.71 MB, 下载次数: 161

解压在Graphics文件夹里

回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

4
发表于 2014-4-23 20:06:24 | 只看该作者
你是用事件标题的吗?是的话在事件里运行脚本
  1. SceneManager.call(Scene_Picture_Gallery)

复制代码
图片欣赏调用
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
15 小时
注册时间
2006-10-12
帖子
15
5
 楼主| 发表于 2014-4-23 20:08:45 | 只看该作者
万分感谢 我来试试看
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
15 小时
注册时间
2006-10-12
帖子
15
6
 楼主| 发表于 2014-4-23 20:17:50 | 只看该作者
VIPArcher 发表于 2014-4-23 20:06
你是用事件标题的吗?是的话在事件里运行脚本图片欣赏调用

请问亲 ,这个是怎么回事啊 我把脚本插入后 就这样提示
另外 我用的标题是 薄雾年代记的脚本

QQ图片20140423201617.jpg (20.83 KB, 下载次数: 30)

QQ图片20140423201617.jpg

点评

该成@loading = Sprite.new 对比下上面错误语句,应该还有其他这样的错误。自行修改  发表于 2014-4-23 20:34
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

7
发表于 2014-4-23 20:25:27 | 只看该作者
轩辕岚夜 发表于 2014-4-23 20:17
请问亲 ,这个是怎么回事啊 我把脚本插入后 就这样提示
另外 我用的标题是 薄雾年代记的脚本 ...


把url=home.pop?/url什么什么的]删了还有后面的
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
15 小时
注册时间
2006-10-12
帖子
15
8
 楼主| 发表于 2014-4-23 20:41:18 | 只看该作者
VIPArcher 发表于 2014-4-23 20:25
把url=home.pop?/url什么什么的]删了还有后面的

都删了  然后进去了  然后用事件调用了脚本 出现了这个
话说 亲有qq么?方便的话 可以加一下我515531871

QQ图片20140423203919.jpg (11.07 KB, 下载次数: 31)

QQ图片20140423203919.jpg

点评

你加我吧:979659150,我好久没登QQ了,什么时候上线了再通过验证。  发表于 2014-4-23 21:42
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

无限の剣制

梦石
0
星屑
10073
在线时间
5020 小时
注册时间
2013-2-28
帖子
5030

开拓者贵宾

9
发表于 2014-4-23 21:37:48 | 只看该作者
本帖最后由 VIPArcher 于 2014-4-23 21:39 编辑
轩辕岚夜 发表于 2014-4-23 20:41
都删了  然后进去了  然后用事件调用了脚本 出现了这个
话说 亲有qq么?方便的话 可以加一下我515531871 ...


你不会删多了吧?
给你个范例

Project2.rar

1.43 MB, 下载次数: 187

把之前的素材丢进去

回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
55
在线时间
15 小时
注册时间
2006-10-12
帖子
15
10
 楼主| 发表于 2014-4-23 22:40:36 | 只看该作者
VIPArcher 发表于 2014-4-23 21:37
你不会删多了吧?
给你个范例

谢了亲
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

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

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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