Advertisement
Guest User

Untitled

a guest
Aug 8th, 2012
2,515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.95 KB | None | 0 0
  1. # Add function for temporarily switching a window's current drawing font.
  2. class Font
  3.   def use( window )
  4.         old_font = window.contents.font.dup
  5.         window.contents.font = self
  6.         yield
  7.         window.contents.font = old_font  
  8.   end
  9. end
  10.  
  11. # Fixes the arrow character (→) used in places in the UI
  12. # since custom font does not support that character
  13. module Mez
  14.   module ArrowFix
  15.         FONT = Font.new(["VL Gothic"])  # This is the font used for the arrows, checked in order.
  16.   end
  17. end
  18.  
  19. # For Actor Equip Window
  20. class Window_EquipStatus
  21.   alias mez_wes_dra draw_right_arrow
  22.   def draw_right_arrow(x, y)
  23.         Mez::ArrowFix::FONT.use(self) do
  24.           mez_wes_dra(x, y)
  25.         end
  26.   end
  27. end
  28.  
  29. #~ # For Yanfly Victory Aftermath - remove if not using that script
  30. class Window_VictoryLevelUp
  31.   alias mez_wvlu_da draw_arrows
  32.   def draw_arrows
  33.         Mez::ArrowFix::FONT.use(self) do
  34.           mez_wvlu_da
  35.         end
  36.   end
  37. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement