atinpanalley
Member
So I'm teaching myself how to use RGSS by messing around with my project's menu system. I've successfully switched around some of the options (status is now the first choice) after much trial and error, and resisted posting a thread after telling myself I could figure it out. I persisted and got it.
So then I had the idea to make it so I could get to the equipment screen by pressing the C button from the status screen. I got that to work after some trial and error (learned that classes must be case sensitive!). Well, instead of that I would like a tiny sub-menu to pop up when pressing C, that gives you two or more choices (like equipment and skills).
I'm having trouble figuring out how to make a new window in this manner, though. Can it even be done? Please don't post the code for me, I'd like to be able to figure this out on my own. A simple 'yes' or 'no' would do, as well as maybe a link to a good tutorial (the CMS tutorial in the archive doesn't really explain windows in this way). Thanks for your time!
edit: also, would it be easier or possible at all to do this with SDK 2.4? i should have mentioned that i'm currently not using any scripts other than what i'm modifying.
UPDATE 11/14/08 7:30PM EST: I'm able to get a window to pop up over another window, but now I'm having trouble with the opacity of it. Here is a picture of what I've got right now.
I've recently discovered these properties of the Window class:
opacity
The window's opacity (0-255). Values out of range are automatically corrected.
back_opacity
The window background's opacity (0-255). Values out of range are automatically corrected.
contents_opacity
The opacity of the window's contents (0-255). Values out of range are automatically corrected.
I'm pretty sure one, some, or all of these is what I'm looking for. I just don't know where to put them or how to really use them. I've tried many different placements but I just can't get the text from the window underneath to stop bleeding through..
RESOLVED on 11/15/08: In addition to x and y coordinate, windows/bitmaps/etc have a zcoordinate. The higher the z coordinate, the closer that item will move towards you (meaning it will be on top of other windows), the lower the z coordinate, the further away that item will move from you (meaning it will be UNDER other windows/bitmaps/etc).
From the help file for the class Window:
Propertieswindowskin
Refers to the bitmap (Bitmap) used as a windowskin.
contents
Refers to the bitmap (Bitmap) used for the window's contents.
stretch
The wallpaper display method. If TRUE, stretches the wallpaper graphic; if FALSE, tiles it. The default value is TRUE.
cursor_rect
The cursor box (Rect). Sets the window's upper left corner using relative coordinates (-16, -16).
active
Cursor blink status. If TRUE, the cursor is blinking.
visible
The window's visibility. If TRUE, the window is visible.
pause
The pause graphic's visibility. This is a symbol that appears in the message window when waiting for the player to press a button. If TRUE, the graphic is visible.
x
The window's X-coordinate.
y
The window's Y-coordinate.
width
The window's width.
height
The window's height.
z
The window's Z-coordinate. The larger this value, the closer to the player the window will be displayed. If multiple objects share the same Z-coordinate, the more recently created object will be displayed closest to the player. The Z-coordinate of the window's contents equals the window background's Z-coordinate plus 2.
ox
The X-coordinate of the starting point of the window's contents. Change this value to scroll the window's contents.
oy
The Y-coordinate of the starting point of the window's contents. Change this value to scroll the window's contents.
opacity
The window's opacity (0-255). Values out of range are automatically corrected.
back_opacity
The window background's opacity (0-255). Values out of range are automatically corrected.
contents_opacity
The opacity of the window's contents (0-255). Values out of range are automatically corrected.
Thanks for the help, Arbiter!
So then I had the idea to make it so I could get to the equipment screen by pressing the C button from the status screen. I got that to work after some trial and error (learned that classes must be case sensitive!). Well, instead of that I would like a tiny sub-menu to pop up when pressing C, that gives you two or more choices (like equipment and skills).
I'm having trouble figuring out how to make a new window in this manner, though. Can it even be done? Please don't post the code for me, I'd like to be able to figure this out on my own. A simple 'yes' or 'no' would do, as well as maybe a link to a good tutorial (the CMS tutorial in the archive doesn't really explain windows in this way). Thanks for your time!
edit: also, would it be easier or possible at all to do this with SDK 2.4? i should have mentioned that i'm currently not using any scripts other than what i'm modifying.
UPDATE 11/14/08 7:30PM EST: I'm able to get a window to pop up over another window, but now I'm having trouble with the opacity of it. Here is a picture of what I've got right now.
http://farm4.static.flickr.com/3151/3030180963_692aeec577_o.jpg[/img]
I've recently discovered these properties of the Window class:
opacity
The window's opacity (0-255). Values out of range are automatically corrected.
back_opacity
The window background's opacity (0-255). Values out of range are automatically corrected.
contents_opacity
The opacity of the window's contents (0-255). Values out of range are automatically corrected.
I'm pretty sure one, some, or all of these is what I'm looking for. I just don't know where to put them or how to really use them. I've tried many different placements but I just can't get the text from the window underneath to stop bleeding through..
RESOLVED on 11/15/08: In addition to x and y coordinate, windows/bitmaps/etc have a zcoordinate. The higher the z coordinate, the closer that item will move towards you (meaning it will be on top of other windows), the lower the z coordinate, the further away that item will move from you (meaning it will be UNDER other windows/bitmaps/etc).
From the help file for the class Window:
Propertieswindowskin
Refers to the bitmap (Bitmap) used as a windowskin.
contents
Refers to the bitmap (Bitmap) used for the window's contents.
stretch
The wallpaper display method. If TRUE, stretches the wallpaper graphic; if FALSE, tiles it. The default value is TRUE.
cursor_rect
The cursor box (Rect). Sets the window's upper left corner using relative coordinates (-16, -16).
active
Cursor blink status. If TRUE, the cursor is blinking.
visible
The window's visibility. If TRUE, the window is visible.
pause
The pause graphic's visibility. This is a symbol that appears in the message window when waiting for the player to press a button. If TRUE, the graphic is visible.
x
The window's X-coordinate.
y
The window's Y-coordinate.
width
The window's width.
height
The window's height.
z
The window's Z-coordinate. The larger this value, the closer to the player the window will be displayed. If multiple objects share the same Z-coordinate, the more recently created object will be displayed closest to the player. The Z-coordinate of the window's contents equals the window background's Z-coordinate plus 2.
ox
The X-coordinate of the starting point of the window's contents. Change this value to scroll the window's contents.
oy
The Y-coordinate of the starting point of the window's contents. Change this value to scroll the window's contents.
opacity
The window's opacity (0-255). Values out of range are automatically corrected.
back_opacity
The window background's opacity (0-255). Values out of range are automatically corrected.
contents_opacity
The opacity of the window's contents (0-255). Values out of range are automatically corrected.
Thanks for the help, Arbiter!