JSWindows (a JavaScript Inheritance Demo) Window_M_BS
Class
© 12 May, 2013, Martin Rinehart
The "M_BS" was capitalized, as were the other Window
-class suffix letters, after it became clear that it was too easy to overlook them in the code (when they were, per our standard, lowercase).
Overview
The Window_M_BS
class extends Window_M
adding the Button_sizable
capability (for min, max, restore/resize buttons). Unlike other windowing systems, there are three (small, medium, large) size buttons between min and max. The min and max buttons are disabled, not fitted out with sizing capabilities, when the window is in the minimized or maximized state.
A maximized window conforms to the shape of its container. If border radii have been used to create an oval container, for example, a maximized window within it will be the oval shape of the container's content area.
The Window_M_BS
Constructor
The constructor is the same as the Window_M
constructor plus an additional parameter, button_choices
. That is an array of the names of the desired buttons. Available buttons are:
min
—minimize the window0
—display in the small state1
—display in the medium state2
—display in the large statemax
—maximize the window
A button_choices
array: "min", "1", "max"
would be similar to the common "minimize", "restore", "maximize" button choices. The default (if button_choices
is omitted) is to show all five buttons.
You can supply additional buttons, but you must add new handlers to the Button_sizable
capability. That would include additional (possibly replacement) button label functions and button click functions.
The Window_M_BS
Instance Methods
Window_M_BS
extends (inherits from) Window_M
. It adds no new methods.
Feedback: MartinRinehart at gmail dot com
# # #