IceDragon200

VariableWindowMenuTHingyWip

Aug 24th, 2011
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.22 KB | None | 0 0
  1. class Window_MenuVariables < Window_Base
  2.  
  3.   WLH = 20
  4.  
  5.   def initialize( x, y, width, height )
  6.     super( x, y, width, height )
  7.     refresh()
  8.   end
  9.  
  10.   def refresh()
  11.     scw = self.contents.width
  12.     self.contents.font.size = Font.default_size - 2
  13.     10.times { |i|
  14.       self.contents.font.color = system_color
  15.       self.contents.draw_text( 0, i*WLH, scw, WLH, "Stuff")
  16.       self.contents.font.color = normal_color
  17.       self.contents.draw_text( 192, i*WLH, scw, WLH, i)
  18.     }  
  19.   end
  20.  
  21. end
  22.  
  23. class Scene_Menu < Scene_Base
  24.  
  25.   alias :meh_start :start unless $@
  26.   def start( *args, &block )
  27.     meh_start( *args, &block )
  28.     h = (@command_window.height+@gold_window.height)
  29.     @variable_window = Window_MenuVariables.new(
  30.      @command_window.x, @command_window.y+@command_window.height,
  31.      @command_window.width, Graphics.height-h)
  32.   end
  33.  
  34.   alias :meh_terminate :terminate unless $@
  35.   def terminate( *args, &block )
  36.     @variable_window.dispose() unless @variable_window.nil?()
  37.     @variable_window = nil
  38.     meh_terminate( *args, &block )
  39.   end
  40.  
  41.   alias :meh_update :update unless $@
  42.   def update( *args, &block )
  43.     meh_update( *args, &block )
  44.     @variable_window.update()
  45.   end
  46.  
  47. end
Advertisement
Add Comment
Please, Sign In to add comment