lightsheetScans = ["scan1", 'scan2', 'scan3']
currentScanSelectionIndex = None`
mainMenu = ConsoleMenu(mainMenuTitle, mainMenuSubTitle, prologue_text=mainMenuPrologue, epilogue_text=mainMenuEpilogue)
lightsheetMenu = ConsoleMenu(lightsheetMenuTitle, prologue_text=lightsheetPrologue, epilogue_text=lightsheetEpilogue)
lightsheetItem = SubmenuItem("Lightsheet Data", lightsheetMenu, mainMenu)
openScanMenu = SelectionMenu(lightsheetScans, "Select a Scan To Open", prologue_text="Opening a scan opens the metadata and a thumbnail of the stitched scan for the user to view.")
openScanMenuItem = SubmenuItem("Open Scan", openScanMenu, lightsheetMenu)
mainMenu.append_item(lightsheetItem)
lightsheetMenu.append_item(openScanMenuItem)
mainMenu.show()
The menu rendering and navigation all work correctly, however I'm not sure what the best way to retrieve the index returned by openScanMenu. Do I need to manage the start() and join() functions myself, or is there a way to retrieve it while only having to call show() once?
Edit: I'd like to make it clear that I need to get the return value of openScanMenu.get_selection() in the main thread where mainMenu.show() is called.
The menu rendering and navigation all work correctly, however I'm not sure what the best way to retrieve the index returned by
openScanMenu
. Do I need to manage thestart()
andjoin()
functions myself, or is there a way to retrieve it while only having to callshow()
once?Edit: I'd like to make it clear that I need to get the return value of
openScanMenu.get_selection()
in the main thread wheremainMenu.show()
is called.