Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Window Call Help (resolved)

Hi guys i know its a noobish question but how do i gonna call a custom made window from a script event into my game?
Like this sample window script.
class Top_Win < Window_Base
  def initialize
    super(0, 0, 544, 312)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
 
  def refresh
    self.contents.clear
  end
end
 
class Bot_Win < Window_Base
  def initialize
    super(0, 312, 544, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
 
  def refresh
    self.contents.clear
  end
end
 
#==============================================================================
# ** Scene_Example
#------------------------------------------------------------------------------
#  This is just an example scene.
#==============================================================================
 
class Scene_Example < Scene_Base
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    @some_window1 = Top_Win.new
    @some_window2 = Bot_Win.new
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @some_window1.dispose
    @some_window2.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    @some_window1.update
    @some_window2.update
  end
end
 
 
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top