Advertisement
roninator2

Yami Order Battlers - Show Graphic for Gauge

Dec 11th, 2024 (edited)
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.98 KB | None | 0 0
  1. # ╔═════════════════════════════════════╦════════════════════╗
  2. # ║ Title: Show Graphic for Gauge       ║  Version: 1.00     ║
  3. # ║ Author: Roninator2                  ║                    ║
  4. # ╠═════════════════════════════════════╬════════════════════╣
  5. # ║ Function:                           ║   Date Created     ║
  6. # ║                                     ╠════════════════════╣
  7. # ║   Display graphic file for gauge    ║    14 Feb 2022     ║
  8. # ╚═════════════════════════════════════╩════════════════════╝
  9. # ╔══════════════════════════════════════════════════════════╗
  10. # ║ Specify the X & Y and the file name in System folder     ║
  11. # ╚══════════════════════════════════════════════════════════╝
  12. # ╔══════════════════════════════════════════════════════════╗
  13. # ║ Terms of use:                                            ║
  14. # ║ Free for all uses in RPG Maker except nudity             ║
  15. # ╚══════════════════════════════════════════════════════════╝
  16.  
  17. module R2_SideBar_Gauge_Image
  18.   POS_X = 0
  19.   POS_Y = 50
  20.   Graphic = "Sidebar"
  21. end
  22.  
  23. class Scene_Battle < Scene_Base
  24.  
  25.   alias r2_order_gauge_create_graphic create_all_windows
  26.   def create_all_windows
  27.     r2_order_gauge_create_graphic
  28.     @sidebar_gauge = Sprite.new
  29.     @sidebar_gauge.bitmap = Cache.system(R2_SideBar_Gauge_Image::Graphic)
  30.     @sidebar_gauge.opacity = 0
  31.     @sidebar_gauge.x = R2_SideBar_Gauge_Image::POS_X
  32.     @sidebar_gauge.y = R2_SideBar_Gauge_Image::POS_Y
  33.     @sidebar_gauge.z = 100
  34.     if $game_switches[YSA::ORDER_GAUGE::SHOW_SWITCH] == true
  35.       @sidebar_gauge.opacity = 255
  36.     end
  37.   end
  38.   alias r2_order_gauge_graphics_update update
  39.   def update
  40.     r2_order_gauge_graphics_update
  41.     if $game_switches[YSA::ORDER_GAUGE::SHOW_SWITCH] == true
  42.       @sidebar_gauge.opacity = 255
  43.     else
  44.       @sidebar_gauge.opacity = 0
  45.     end
  46.   end
  47.   alias r2_order_gauge_dispose_all dispose_spriteset
  48.   def dispose_spriteset
  49.     for order in @spriteset_order
  50.       order.bitmap.dispose
  51.       order.dispose
  52.     end
  53.     @sidebar_gauge.bitmap.dispose
  54.     @sidebar_gauge.dispose
  55.     r2_order_gauge_dispose_all
  56.   end
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement