Hi there, im creating a log of my own that is linked into scene_map. It creates a window in it and then data is transferred to the window. But my problem seems to be, the data that is transferred to it doesn't stay, it disappears. I'll guide you along maybe you can spot the problem i have missed.
Scene_Map Addition:
Then there is my Window:
Then i called it of course:
On screen this happens:
This is text:
#called it
This is text: hello
#10 seconds later
This is text:
Can anyone tell me why this is?
Scene_Map Addition:
Code:
@my_window = Window_Log.new
#disposed
@my_window.dispose
#updated
@my_window.update
Code:
class Window_Log < Window_Base
attr_accessor :text
def initialize
super(0, 275, 210, 100)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = "Arial"
self.contents.font.size = 15
self.opacity = 0
refresh(" ")
end
def refresh(text)
@text = text
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0, 45, 300, 32, "This is Text: " + @text)
end
end
Code:
object = Window_Log.new
object.refresh('hello')
On screen this happens:
This is text:
#called it
This is text: hello
#10 seconds later
This is text:
Can anyone tell me why this is?