@text = Plane.new
@textBMP = Bitmap.new(640,480)
...
@text.bitmap.drawtext(x,y,240,64,"")
class Scene_Map
VARIABLENNUMMER = 1 #Number of the variable
alias variable_main main
def main
@variable_text = Show_Variable.new(VARIABLENNUMMER)
variable_main
@variable_text.dispose
end
alias variable_update update
def update
@variable_text.update
variable_update
end
end
class Show_Variable < Sprite
#DEFAULT VALUES
COLOR = [0, 0, 0] #White
X = 20
Y = 0
#INITIALIZING
def initialize(variable_id, x=X, y=Y, color=Color.new(*COLOR))
super()
@variable_id = variable_id
self.bitmap = Bitmap.new(150, 50)
self.x, self.y, self.z = x, y, 4999
end
#UPDATING/REFRESHIN
def update
bit = self.bitmap
bit.clear
bit.draw_text(0,0,bit.width, bit.height, $game_variables[@variable_id].to_s)
end
end
#==============================================================================
# Scene_Map Variable Display
#------------------------------------------------------------------------------
# Script by BlueScope
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
alias vardisplay_initialize initialize
def initialize
vardisplay_initialize
@variable = "Test"
end
#--------------------------------------------------------------------------
alias vardisplay_main main
def main
@vardisplay_window = Window_Base.new(0, 0, 640, 64)
@vardisplay_window.opacity = 0
@vardisplay_window.contents = Bitmap.new(@vardisplay_window.width - 32,
@vardisplay_window.height - 32)
@vardisplay_window.contents.draw_text(0, 0, 600, 32, @variable, 1)
vardisplay_main
@varidosplay_window.dispose
end
#--------------------------------------------------------------------------
alias vardisplay_update update
def update
@vardisplay_window.contents.clear
@vardisplay_window.contents.draw_text(0, 0, 600, 32, @variable, 1)
vardisplay_update
end
#--------------------------------------------------------------------------
end