diff --git a/lib/widgets/list.rb b/lib/widgets/list.rb index 6e4f287..34b15e5 100644 --- a/lib/widgets/list.rb +++ b/lib/widgets/list.rb @@ -2,9 +2,11 @@ module Widgets class List - attr_reader :x, :y, :width, :height, :active, :top, :items + attr_reader :x, :y, :width, :height attr_accessor :focused + attr_reader :active, :top, :items + def initialize(x, y, width, height) @x = x @y = y @@ -12,11 +14,11 @@ module Widgets @width = width @height = height + @focused = false + @active = 0 @top = 0 - @focused = false - @items = 1.upto(height - 1 + 10).map do Faker::Name.name end