Ok so the Shining Force Menu is coming along great. While I am still having trouble with the buttons "animating", a new prob has come into play. I have a custom menu for all the members in the party. as noted here in the screen
when the member's button is clicked we go to the member screen as seen here:
here is where is goes wrong for me. For some reason I can only select the first member. I cannot go down or up. It makes the noise to go up and down but nothing happens.
For troubleshooting purposes I will release the part of the code so someone can help me out. I have looked at the default menu status code and I still cannot figure out why it doesn't work
I understand the code for the most part. Most of it I know and some is trial and error. If I can figure out this one part out then the rest of the menu can come along very fast and I will have a first version out with the month.
Thanks in advance.
http://img.photobucket.com/albums/v188/SamusK/sf_menu_1.jpg[/img]
when the member's button is clicked we go to the member screen as seen here:
http://img.photobucket.com/albums/v188/SamusK/sf_menu_2.jpg[/img]
here is where is goes wrong for me. For some reason I can only select the first member. I cannot go down or up. It makes the noise to go up and down but nothing happens.
For troubleshooting purposes I will release the part of the code so someone can help me out. I have looked at the default menu status code and I still cannot figure out why it doesn't work
Code:
class Scene_Member
def initialize(member_index = 0)
@menu_index = member_index
end
def main
@portrait_window = Window_Portrait.new(0)
@portrait_window.x = 41
@portrait_window.y = 18
@member_window = Window_MemberStatus.new
@member_window.x = 41
@member_window.y = 242
@member_window.height = 224
@member_window.active = true
@spriteset = Spriteset_Map.new
px = $game_player.screen_x - 15
py = $game_player.screen_y - 24
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@spriteset.dispose
@portrait_window.dispose
@member_window.dispose
end
def update
@member_window.active = true
@portrait_window.update
@member_window.update
update_member
end
#--------------------------------------------------------------------------
# * Frame Update (when status window is active)
#--------------------------------------------------------------------------
def update_member
# If B button was pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Make command window active
$scene = Scene_Map.new
return
end
# If C button was pressed
if Input.trigger?(Input::C)
# Branch by command window cursor position
case @member_window.index
when 1 # skill
# If this actor's action limit is 2 or more
if $game_party.actors[@member_window.index].restriction >= 2
# Play buzzer SE
$game_system.se_play($data_system.buzzer_se)
return
end
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to skill screen
$scene = Scene_Skill.new(@member_window.index)
when 2 # equipment
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to equipment screen
$scene = Scene_Equip.new(@member_window.index)
when 3 # status
# Play decision SE
$game_system.se_play($data_system.decision_se)
# Switch to status screen
$scene = Scene_Status.new(@member_window.index)
end
return
end
end
end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the member screen.
#==============================================================================
class Window_MemberStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 573, 224)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
@column_max = 1
@item_max = $game_party.actors.size
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.draw_text(40,0,64,32, "NAME")
self.contents.draw_text(200,0, 64, 32, "CLASS")
self.contents.draw_text(400,0,64,32,"LEVEL")
self.contents.draw_text(480,0,64,32, "EXP")
# Testing the window - Comment out on final release
#self.contents.draw_text(40,34,64,32,"KRIS")
#self.contents.draw_text(200,34,64,32,"SDMN")
#self.contents.draw_text(435,34,32,32,"1", 2)
#self.contents.draw_text(480,34,32,32,"0", 2)
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 64
y = i * 34
actor = $game_party.actors[i]
#draw_actor_name(actor, 40, 34 + y)
self.contents.draw_text(40, 34 + y, 120, 32, actor.name)
self.contents.draw_text(200, 34 + y, 236, 32, actor.class_name)
self.contents.draw_text(435, 34 + y, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(438, 34 + y, 84, 32, actor.exp_s, 2)
#draw_actor_class(actor, 200, 34+y)
#draw_actor_level(actor, 435, 34+y)
#draw_actor_exp(actor, 480, 34+y)
end
end
#--------------------------------------------------------------------------
# * Cursor Rectangle Update
#--------------------------------------------------------------------------
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(37, @index * 34, 120, 32)
end
if @index = 0
self.cursor_rect.set(37, 34, 120, 32)
end
end
end
I understand the code for the most part. Most of it I know and some is trial and error. If I can figure out this one part out then the rest of the menu can come along very fast and I will have a first version out with the month.
Thanks in advance.