How to remove an image from a window?
#1
I am making a simple map system where the player opens a window which shows the player a picture of a world map for the game, however when i dispose of the window the image won't go away, it waits until rmxp clears it from the screen.

how can i fix this to dispose of the window of soon as the window is disposed of?

here is the script:

Code:
class Window_Map < Window_Base
  def initialize
    super(0,0,640,480)
    self.contents = Bitmap.new(width-32,height-32)
    self.contents.font.name = "Arial"
    self.contents.font.size = 24
    refresh
  end
    
  def refresh
    self.contents.clear
    @Map_Image = Sprite.new
    @Map_Image.bitmap = RPG::Cache.picture("Map_Color.png")
    @Map_Image.z = 100
  end
end

Code:
class Map_Scene
  
  def main
    @Map = Window_Map.new
    
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        then break
      end
    end
    
    Graphics.freeze
    @Map.dispose
    
  end
  
  def update
    
    @Map.update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
    end
  end
  
end
Reply }


Messages In This Thread
How to remove an image from a window? - by computerwizoo7 - 07-12-2009, 04:19 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Image transitions FriKitty 2 40 1 hour ago
Last Post: DerVVulfman
   Sorting Items in Shop Window Mel 13 17,738 01-18-2018, 05:49 AM
Last Post: DerVVulfman
   Showing only specific skills in a window Mel 2 5,900 01-12-2016, 01:34 PM
Last Post: Mel
  Changing Window Styles in Game JackMonty 8 11,042 03-22-2013, 11:54 PM
Last Post: JackMonty
   Something I noticed about the Advanced Shop Status Window yamina-chan 5 9,996 08-21-2011, 09:16 PM
Last Post: yamina-chan
   [Atoa SBS] Changing the command window font MegaPowerNinja 3 8,329 04-12-2011, 10:23 PM
Last Post: Victor Sant
   Repositioning the actor command window. MegaPowerNinja 4 9,400 04-12-2011, 05:21 AM
Last Post: MegaPowerNinja
   Need Help on Making Battle Status Window riou 4 10,895 03-22-2011, 06:04 AM
Last Post: Victor Sant
   Window Visibility Problem computerwizoo7 7 11,313 05-10-2010, 05:53 PM
Last Post: deValdr
   Message Window Trouble afters 1 4,109 04-13-2010, 01:27 AM
Last Post: vgvgf



Users browsing this thread: 1 Guest(s)