def refreshButtonNames
moves = (@battler) ? @battler.moves : []
if !USE_GRAPHICS
# Fill in command window
commands = []
moves.each { |m| commands.push((m && m.id>0) ? m.name : "-") }
@cmdWindow.commands = commands
return
end
# Draw move names onto overlay
@overlay.bitmap.clear
textPos = []
moves.each_with_index do |m,i|
button = @buttons[i]
next if !@visibility["button_#{i}"]
x = button.x-self.x+button.src_rect.width/2
y = button.y-self.y+8
moveNameBase = TEXT_BASE_COLOR
if m.type>=0 # Comment this
# NOTE: This takes a colour from a particular pixel in the button
# graphic and makes the move name's base colour that same colour.
# The pixel is at coordinates 10,34 in the button box. If you
# change the graphic, you may want to change/remove the below line
# of code to ensure the font is an appropriate colour.
moveNameBase = button.bitmap.get_pixel(10,button.src_rect.y+34) # Comment this
end # Comment this
textPos.push([m.name,x,y,2,moveNameBase,TEXT_SHADOW_COLOR])
end
pbDrawTextPositions(@overlay.bitmap,textPos)
end