|
|
@ -5,8 +5,8 @@ from openpilot.system.ui.widgets.button import ButtonStyle, Button |
|
|
|
from openpilot.system.ui.widgets.label import Label |
|
|
|
from openpilot.system.ui.widgets.label import Label |
|
|
|
from openpilot.system.ui.widgets import Widget |
|
|
|
from openpilot.system.ui.widgets import Widget |
|
|
|
|
|
|
|
|
|
|
|
DIALOG_WIDTH = 1520 |
|
|
|
DIALOG_WIDTH = 1748 |
|
|
|
DIALOG_HEIGHT = 600 |
|
|
|
DIALOG_HEIGHT = 690 |
|
|
|
BUTTON_HEIGHT = 160 |
|
|
|
BUTTON_HEIGHT = 160 |
|
|
|
MARGIN = 50 |
|
|
|
MARGIN = 50 |
|
|
|
TEXT_AREA_HEIGHT_REDUCTION = 200 |
|
|
|
TEXT_AREA_HEIGHT_REDUCTION = 200 |
|
|
@ -16,7 +16,7 @@ BACKGROUND_COLOR = rl.Color(27, 27, 27, 255) |
|
|
|
class ConfirmDialog(Widget): |
|
|
|
class ConfirmDialog(Widget): |
|
|
|
def __init__(self, text: str, confirm_text: str, cancel_text: str = "Cancel"): |
|
|
|
def __init__(self, text: str, confirm_text: str, cancel_text: str = "Cancel"): |
|
|
|
super().__init__() |
|
|
|
super().__init__() |
|
|
|
self._label = Label(text, 70, FontWeight.BOLD) |
|
|
|
self._label = Label(text, 70, FontWeight.BOLD, text_color=rl.Color(201, 201, 201, 255)) |
|
|
|
self._cancel_button = Button(cancel_text, self._cancel_button_callback) |
|
|
|
self._cancel_button = Button(cancel_text, self._cancel_button_callback) |
|
|
|
self._confirm_button = Button(confirm_text, self._confirm_button_callback, button_style=ButtonStyle.PRIMARY) |
|
|
|
self._confirm_button = Button(confirm_text, self._confirm_button_callback, button_style=ButtonStyle.PRIMARY) |
|
|
|
self._dialog_result = DialogResult.NO_ACTION |
|
|
|
self._dialog_result = DialogResult.NO_ACTION |
|
|
|