mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-20 18:23:56 +08:00
* extract Widget base class to separate lib/widget.py * format * format --------- Co-authored-by: Shane Smiskol <shane@smiskol.com>
18 lines
500 B
Python
18 lines
500 B
Python
import pyray as rl
|
|
from openpilot.system.ui.lib.widget import Widget
|
|
from openpilot.system.ui.lib.wifi_manager import WifiManagerWrapper
|
|
from openpilot.system.ui.widgets.network import WifiManagerUI
|
|
|
|
|
|
class NetworkLayout(Widget):
|
|
def __init__(self):
|
|
super().__init__()
|
|
self.wifi_manager = WifiManagerWrapper()
|
|
self.wifi_ui = WifiManagerUI(self.wifi_manager)
|
|
|
|
def _render(self, rect: rl.Rectangle):
|
|
self.wifi_ui.render(rect)
|
|
|
|
def shutdown(self):
|
|
self.wifi_manager.shutdown()
|