RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Windows - How to?

Started by Kalacious, July 16, 2013, 11:05:41 PM

0 Members and 1 Guest are viewing this topic.

Kalacious

I wanted to play with windows, So I built this really basic thing:

class Game_Interpreter
  def call_sample
    SceneManager.call(Scene_Sample)
  end
end

class Sample < Window_Base
  def initialize(x, y, width, height)
    super
  end
end

class Scene_Sample < Scene_MenuBase
 
  def start
    super
    create_window
  end
 
  def create_window
    @window = Sample.new(122, 122, 122, 122)
  end
 
end


calling: call_sample will open your window, how ever hitting esc, like on any other window won't close it.....I've seen numerous scripts do this and no one seems to have a dispose method built for their windows. How are they doing it? How are they closing windows when you hit esc?

-- Updated code to show a better example