After posting a few times before, I've looked and tried in many ways, but I still haven't solved it.
First of all, my basic code is like this.
[#spoiler]
class Window_Test < Window_Base
def initialize(x = 256,y = 192,width = 130, height = 50)
super(x,y,width,height)
end
def event_text(text)
return unless text.is_a?(String)
draw_text(text, 0, 0, 128, 25)
end
def draw_text(text, x, y, text_width, text_height, aligment = 0)
contents.draw_text(x, y, text_width, text_height, text, aligment)
end
end
[#/spoiler]
And the execution method is to create an auto-execution event on the map, and to create a script in the same way as above.
Next is the problem.
I've been running this script
I want to make the window disappear when I press the decision key or cancel key.
I don't know how to add it in the code above.
+ Can I use the sentence display function through the script in a way similar to window display?
If you specify the size (width and height) and where it will be displayed, and enter the sentence to be displayed, the sentence will be deleted by pressing the decision key.
plz help me.
First of all, my basic code is like this.
[#spoiler]
class Window_Test < Window_Base
def initialize(x = 256,y = 192,width = 130, height = 50)
super(x,y,width,height)
end
def event_text(text)
return unless text.is_a?(String)
draw_text(text, 0, 0, 128, 25)
end
def draw_text(text, x, y, text_width, text_height, aligment = 0)
contents.draw_text(x, y, text_width, text_height, text, aligment)
end
end
[#/spoiler]
And the execution method is to create an auto-execution event on the map, and to create a script in the same way as above.
Next is the problem.
I've been running this script
I want to make the window disappear when I press the decision key or cancel key.
I don't know how to add it in the code above.
+ Can I use the sentence display function through the script in a way similar to window display?
If you specify the size (width and height) and where it will be displayed, and enter the sentence to be displayed, the sentence will be deleted by pressing the decision key.
plz help me.