09-08-2012, 06:25 PM
A few years ago, I was working on my first ever menu script (which I never ever released), I came across a bug with VX's Window_Command window. I was setting up a window that had its column_max set to 1 and its row_max (the window would allow scrolling if my menu had more choices than I specified) set to 6.
I took this from an old YouTube video of mine. The text for the choices after number 6 weren't drawn.
The problem stemmed from the refresh method of the Window_Command class. Here's how the code looked:
Code:
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end
I added create_contents in a new line in between self.contents.clear and for i in 0...@item_max. The refresh method should look like this:
Code:
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
create_contents
for i in 0...@item_max
draw_item(i)
end
end
And it fixed my problem: