Skip to content

Commit

Permalink
Screens can be named too
Browse files Browse the repository at this point in the history
  • Loading branch information
acook committed Oct 11, 2023
1 parent c02c20c commit 6163526
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/remedy/screen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Screen
# @param auto_resize [Boolean] can be disabled if you are setting up your own console resize hook
# @see #resize
# @see Console.set_console_resized_hook!
def initialize auto_resize: true, auto_redraw: true
def initialize auto_resize: true, auto_redraw: true, name: object_id
@mainframe = Frame.new name: "screen#init", parent: self
mainframe.fill = "."
mainframe.size = :fill
Expand All @@ -26,7 +26,7 @@ def initialize auto_resize: true, auto_redraw: true
resize new_size, redraw: auto_redraw
end if auto_resize
end
attr_accessor :mainframe
attr_accessor :mainframe, :name

# Draw the buffer to the console using raw output.
# @param override [Remedy::Frame,String] temporarily replace the contents with this instead (until the next redraw!)
Expand Down

0 comments on commit 6163526

Please sign in to comment.