- Joined
- Oct 23, 2021
- Messages
- 31
- Reaction score
- 8
- First Language
- n
- Primarily Uses
- RMVXA
I ask you again following the previous article.
Through a recent search, I learned how to remove certain windows.
For example, @window = Window_textbox.If you made a window with new,
@window.dispose has figured out how to delete that window.
However, I don't know how to apply this in the script editor.
First of all,
def deletebox
if Input trigger?( : B )
@window.dispose
end
end
I tried making it this way (if Input trigger?( : B ) in this line, ( and : and B are attachted.) but it didn't work.
How can I make it work?
* Below this is the full code.
[#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]
Through a recent search, I learned how to remove certain windows.
For example, @window = Window_textbox.If you made a window with new,
@window.dispose has figured out how to delete that window.
However, I don't know how to apply this in the script editor.
First of all,
def deletebox
if Input trigger?( : B )
@window.dispose
end
end
I tried making it this way (if Input trigger?( : B ) in this line, ( and : and B are attachted.) but it didn't work.
How can I make it work?
* Below this is the full code.
[#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]