[Ace] Drawing pictures (conversion from VX to Ace?)

● ARCHIVED · READ-ONLY
Started by Rello 3 posts View original ↗
  1. Hey all,

    In VX I came across a few lines of code that allowed me to draw a picture with the pictures name, x and y for its arguments. I'm trying to bring this over into VX Ace but, obviously, the cut and paste method doesn't work. I was wondering if anyone could look at the chunk of code and point me in the right direct. Any help is appreciated.

    Code from VX:

    Spoiler
    class Window_Base < Window
    def draw_picture(picture_name, x, y)
    bitmap = Cache.picture(picture_name)
    self.contents.blt(x, y, bitmap, bitmap.rect)
    end
    end

    Code:
  2. Cut and paste works fine.

    92Mt6.jpg
  3. Why didn't it work for me then... hm. Gave me an error about "disposed window".

    What I'm directly trying to do is draw pictures for each menu option in the main menu.

    The picture name is the command name or "name" in the below script chunk. When no picture if present, it gives me the "no image of this name error', as I expected. However, with the image if gives the following error.

    edit:

    Error Being Displayed:

    Spoiler
    2ptnzo1.png