Organize code
This commit is contained in:
parent
9f87a76bd4
commit
3969ae125b
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Reference in a new issue