Hi. This is my first post on these forums, and hopefully this one is placed in the right section.
I've recently started working with RGSS--have read lots of tutorials from lots of different sites (also have a slight background in C++, so that helps) and it's making a lot of sense. For me, however, there seems to be one very large hitch. I'm working on my own CMS (in its very infantile stages) and I cannot get Window_Selectable to allow me to select options. It's driving me insane. The tuts have stated that Window_Selectable should already have the code in place to determine whether up or down is keyed and to adjust accordingly. When I press up or down in the testing phase, however, it simply moves the character up or down.
Here is my code:
#==============================================================================
# New Menu Window
#------------------------------------------------------------------------------
# The beginnings of a CMS
#==============================================================================
class Window_NewMenu < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(100, 100, 85, 160)
self.index = 0 # Initial Option
@item_max = 4 # Number of options
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.draw_text(0, 0, 75, 20, "Items")
self.contents.draw_text(0, 32, 75, 20, "Equip")
self.contents.draw_text(0, 64, 75, 20, "Save")
self.contents.draw_text(0, 96, 75, 20, "Exit")
end
#--------------------------------------------------------------------------
# * Check Input
#--------------------------------------------------------------------------
def check_input
if Input.trigger?(Input::C)
$window.dispose
if self.index == 0
$scene = Scene_Item.new
elsif self.index == 1
$scene = Scene_Equip.new
elsif self.index == 2
$scene = Scene_Save.new
elsif self.index == 3
$scene = Secene_End.new
$window = Window_Text.new
$window.y = 0
$window.back_opacity = 0
end
end
end
end
I'm using the official RMXP version from Enterbrain. If any further information is required, please let me know.
Hi. This is my first post on these forums, and hopefully this one is placed in the right section.
I've recently started working with RGSS--have read lots of tutorials from lots of different sites (also have a slight background in C++, so that helps) and it's making a lot of sense. For me, however, there seems to be one very large hitch. I'm working on my own CMS (in its very infantile stages) and I cannot get Window_Selectable to allow me to select options. It's driving me insane. The tuts have stated that Window_Selectable should already have the code in place to determine whether up or down is keyed and to adjust accordingly. When I press up or down in the testing phase, however, it simply moves the character up or down.
Here is my code:
I'm using the official RMXP version from Enterbrain. If any further information is required, please let me know.
Share this post
Link to post
Share on other sites