04-12-2016, 06:45 PM
EUREKA! Okay, it may not seem much to some, but this is something fun.
The 'full customization' feature allows the game designer (namely YOU) to be able to resize and reshape the given windows within the menu. However, here was the problem: I had no intention of inserting the size/shape values of the windows into the reused classes such as Window_Gold. If I had, the same gold window would be resized for all other menus and features! Arrrgh! I had to do something!
Enter my new and very simple method in the Window_Base class: re_content. A very basic method, it is merely a copy of the self.contents line within most initialize methods.
See? Very simple.
You see, when you initialize a window, it creates a content area that matches the specs of that window. But if you resize the window afterwards, the content area would stay 'fixed' to the original size. But now I can throw a call to re_content after I change the size of the window and the contents area becomes redefined to the NEW size of the window.
Bear in mind, some windows that have multiple rows of content will have their own variation which includes @item_max values.
Now, the game designer can have a gold window in their Xail menu of one size, and have it the normal window size in their shop system. Bear in mind, these are just options... but I like to account for possibilities.
So it looks like my next step will be cleaning up the configs and then working out the Addon Bar System next! And... when that's done... That would be IT!
The 'full customization' feature allows the game designer (namely YOU) to be able to resize and reshape the given windows within the menu. However, here was the problem: I had no intention of inserting the size/shape values of the windows into the reused classes such as Window_Gold. If I had, the same gold window would be resized for all other menus and features! Arrrgh! I had to do something!
Enter my new and very simple method in the Window_Base class: re_content. A very basic method, it is merely a copy of the self.contents line within most initialize methods.
Code:
#--------------------------------------------------------------------------
# * Redefine Content Area
#--------------------------------------------------------------------------
def re_content
self.contents = Bitmap.new(width - 32, height - 32)
end
You see, when you initialize a window, it creates a content area that matches the specs of that window. But if you resize the window afterwards, the content area would stay 'fixed' to the original size. But now I can throw a call to re_content after I change the size of the window and the contents area becomes redefined to the NEW size of the window.
Bear in mind, some windows that have multiple rows of content will have their own variation which includes @item_max values.
Now, the game designer can have a gold window in their Xail menu of one size, and have it the normal window size in their shop system. Bear in mind, these are just options... but I like to account for possibilities.
So it looks like my next step will be cleaning up the configs and then working out the Addon Bar System next! And... when that's done... That would be IT!