mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 15:23:57 +08:00
dialog txt
This commit is contained in:
@@ -25,11 +25,11 @@ class InputDialogSP:
|
||||
self.keyboard.set_text(self.current_text)
|
||||
|
||||
def internal_callback(result: DialogResult):
|
||||
text = self.keyboard.text if result == DialogResult.CONFIRM else ""
|
||||
if result == DialogResult.CONFIRM:
|
||||
text = self.keyboard.text
|
||||
if self.param:
|
||||
self._params.put(self.param, text)
|
||||
if self.callback:
|
||||
self.callback(result, text)
|
||||
if self.callback:
|
||||
self.callback(result, text)
|
||||
|
||||
gui_app.set_modal_overlay(self.keyboard, internal_callback)
|
||||
|
||||
@@ -13,7 +13,7 @@ class TestInputDialog:
|
||||
|
||||
def test_input_dialog_int(self):
|
||||
gui_app.init_window("test window")
|
||||
dialog = InputDialogSP("title", current_text="current_text", param="MapTargetVelocities") # some rando param, sorry sunny bc its your's
|
||||
dialog = InputDialogSP("title", current_text="current_text", param="MapTargetVelocities") # some rando param, sorry sunny bc it's yours
|
||||
dialog.show()
|
||||
|
||||
dialog.keyboard._render_return_status = 1
|
||||
|
||||
Reference in New Issue
Block a user