Method: AuthorEngine::SpritePicker#draw_grid

Defined in:
lib/author_engine/sprite_picker.rb

#draw_gridObject



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/author_engine/sprite_picker.rb', line 47

def draw_grid
  (@columns-1).times do |i|
    i += 1
    # Vertical line
    Gosu.draw_rect((@x + (i * @width /  @columns)) - 1, @y, 1, @height, Gosu::Color::WHITE, 17)
  end
  #Horizontal line
  (@rows-1).times do |i|
    Gosu.draw_rect(@x, (@y + (i * @height / @rows)) + @scaled_sprite_size, @width, 1, Gosu::Color::WHITE, 17)
  end
end