Move all interface Windows to their own modules in interface.window
This commit is contained in:
parent
1e678ff47d
commit
a8bbc47668
5 changed files with 160 additions and 133 deletions
21
erynrl/interface/window/message_log.py
Normal file
21
erynrl/interface/window/message_log.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
'''
|
||||
Declares the MessageLogWindow.
|
||||
'''
|
||||
|
||||
from . import Window
|
||||
from ...geometry import Rect
|
||||
from ...messages import MessageLog
|
||||
|
||||
|
||||
class MessageLogWindow(Window):
|
||||
'''A window that displays a list of messages'''
|
||||
|
||||
def __init__(self, bounds: Rect, message_log: MessageLog):
|
||||
super().__init__(bounds, framed=True)
|
||||
self.message_log = message_log
|
||||
|
||||
def draw(self, console):
|
||||
super().draw(console)
|
||||
self.message_log.render_to_console(console, self.drawable_bounds)
|
||||
Loading…
Add table
Add a link
Reference in a new issue