How to add dispose the window method when I press the button

Tapael

Veteran
Veteran
Joined
Oct 23, 2021
Messages
31
Reaction score
8
First Language
n
Primarily Uses
RMVXA
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.
1660895290432.png


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.
 

Latest Posts

Latest Profile Posts

There was a tutorial on how to draw anime eyes. Just draw Among Us. So I tried.
Screenshot_107.jpg
DamageActor3_7.png added!
index.php

Making a "characters first appearance" drawing for my game. Now I just have to finish the sprite art animation for her grand entrance.​
ScreenShot_9_24_2022_7_56_24.png
New area being started today. It leads to one of the games 2 optional bosses.
A secret desire of mine: I want to make a horror game based on Celtic mythology. I've seen plenty of Greek, Japanese and Norse mythology-based horror games, but I don't think I've ever seen a Celtic-based horror game anywhere...

Forum statistics

Threads
125,537
Messages
1,171,792
Members
164,607
Latest member
DemiDevil
Top