Archived
1
0
Fork 0

Split info draw into methods

This commit is contained in:
Braiden Vasco 2017-07-27 22:45:28 +00:00
parent e60e0a353f
commit 460427e6f6

View file

@ -8,6 +8,11 @@ module Widgets
private
def draw
draw_main_line
draw_public_key
end
def draw_main_line
setpos 0, 0
case props[:status]
@ -33,7 +38,9 @@ module Widgets
end
addstr ' : '
addstr props[:status_message]
end
def draw_public_key
setpos 0, 1
addstr PUBLIC_KEY_LABEL
if PUBLIC_KEY_LABEL.length + props[:public_key].length > props[:width]