RPG Maker Forums

I need help with combining my script that makes 2 message boxes, into 1. Right now I have 1 message box that says "Are you sure you want to quit" and then below it another message box that has 2 choices saying "Yes" and "No". I want it to be within one message box. This is the script:

#This is for the "Are you sure you want to quit" message boxclass New_Text_Creator < Window_Base def initialize() super( 122, 170, 300, 75 ) end def change_text ( text ) contents.clear return unless text.is_a?(String) draw_text(text, 15, -200, 300, 450) #This is defined below end #-------------------------------------------------------------------------- # * Draw Text # args : Same as Bitmap#draw_text. #-------------------------------------------------------------------------- def draw_text(text, x, y, text_width, text_height, alignment = 0) contents.draw_text(x, y, text_width, text_height, text, alignment) #This is the contents of this message box endend#This is used by doing: # @new_text_creator = New_Text_Creator.new# @new_text_creator.change_text(#Insert_Text)
Code:
#This is the scene that is ultimately calledclass Scene_Exit < Scene_MenuBase  def start    super    create_command_window  end    def create_command_window    @command_window = Scene_ExitCommand.new  #creates new instance of Scene_ExitCommand    @command_window.set_handler(:exit,       method(:exit_game))    @command_window.set_handler(:cancel,     method(:return_scene))  end  #--------------------------------------------------------------------------  # * Makes the exit command  #--------------------------------------------------------------------------  def exit_game    exit  endend
Code:
#This makes the window for Scene_Exit and makes the commands themselvesclass Scene_ExitCommand < Window_Command  def initialize    super(230, 245)  end    def make_command_list    exit_command  end    def window_width    return 90  end    def window_height    return 75  end    def exit_command    @new_text_creator = New_Text_Creator.new    @new_text_creator.change_text("Are you sure you want to quit?")    add_command("Yes",  :exit)          add_command("No",   :cancel)  endend
If anyone could make these 2 message boxes into 1 message box, that would be great!

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top