mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-30 21:23:43 +08:00
dialog txt
This commit is contained in:
@@ -25,11 +25,11 @@ class InputDialogSP:
|
|||||||
self.keyboard.set_text(self.current_text)
|
self.keyboard.set_text(self.current_text)
|
||||||
|
|
||||||
def internal_callback(result: DialogResult):
|
def internal_callback(result: DialogResult):
|
||||||
|
text = self.keyboard.text if result == DialogResult.CONFIRM else ""
|
||||||
if result == DialogResult.CONFIRM:
|
if result == DialogResult.CONFIRM:
|
||||||
text = self.keyboard.text
|
|
||||||
if self.param:
|
if self.param:
|
||||||
self._params.put(self.param, text)
|
self._params.put(self.param, text)
|
||||||
if self.callback:
|
if self.callback:
|
||||||
self.callback(result, text)
|
self.callback(result, text)
|
||||||
|
|
||||||
gui_app.set_modal_overlay(self.keyboard, internal_callback)
|
gui_app.set_modal_overlay(self.keyboard, internal_callback)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class TestInputDialog:
|
|||||||
|
|
||||||
def test_input_dialog_int(self):
|
def test_input_dialog_int(self):
|
||||||
gui_app.init_window("test window")
|
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.show()
|
||||||
|
|
||||||
dialog.keyboard._render_return_status = 1
|
dialog.keyboard._render_return_status = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user