Archived
1
0
Fork 0

Organize code

This commit is contained in:
Braiden Vasco 2017-07-21 18:22:36 +00:00
parent 12891aa464
commit 0da9548e2f
2 changed files with 5 additions and 12 deletions

View file

@ -2,20 +2,13 @@
module Widgets
class Chat
attr_reader :x, :y, :width, :height
attr_reader :focused
def initialize(x, y, width, height)
@x = x
@y = y
@width = width
@height = height
@message = NewMessage.new x, y + height - 1, width, 1
@history = History.new x, y, width, height - 1
@focused = false
@history = History.new x, y, width, height - 1
@message = NewMessage.new x, y + height - 1, width, 1
end
def render

View file

@ -7,13 +7,13 @@ module Widgets
def initialize(x, y, width, height)
@focused = false
@search = Search.new x, y, width, 1
@list = List.new x, y + 1, width, height - 1
@search = Search.new x, y, width, 1
end
def render
@search.render
@list.render
@search.render
end
def trigger(event)