I want to know how to show a custom message window in rpgmaker xp using ruby scripting but I only got this far with the script but it doesn't show the map which I want to show when showing a message !
class MyCustomWindow < Window_Base
#----------------------------------------------------------------------
# * Object Initialization
#----------------------------------------------------------------------
def initialize
super(0, 0, 640, 99)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.draw_text(0, 0, 644, 88, "A ERROR HAS BEEN ENCOUNTERED AND THE PROGRAM NEEDS TO CLOSE")
self.contents.draw_text(0, 0, 644, 77, "A ERROR HAS BEEN ENCOUNTERED AND THE PROGRAM NEEDS TO CLOSE")
self.contents.draw_text(0, 0, 644, 66, "A ERROR HAS BEEN ENCOUNTERED AND THE PROGRAM NEEDS TO CLOSE")
self.contents.draw_text(0, 0, 644, 55, "A ERROR HAS BEEN ENCOUNTERED AND THE PROGRAM NEEDS TO CLOSE")
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.font.size = 20
end
end
#==============================================================================
# * Scene_ShowWindow
#==============================================================================
class Scene_ShowWindow
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
#call the window
@window = MyCustomWindow.new
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
# Dispose of windows
@window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@window.update
end
end