CC: Tweaked

CC: Tweaked

42M Downloads

Multishell hideWindow Function

MinerMinerMods opened this issue · 2 comments

commented

Introducing multishell.setWindowVisible(n, visible) a passthrough function for the window

Implementation Details

When multishell.setWindowVisible(n, visible) is called the window Multishell assigned the identifier to n will have the window.setVisible(visible) be toggled.
When used with no other Window Generated after the default shell appears with no text, that shell then deletes unless used.

Reasoning

When Building Some Systems like Bootloaders you may want to Isolate the BootLoader from the programs it calls but don't want or need the BootLoader to be displayed. This means that Multishell will be capable of hiding any windows also allowing for applications to hide that they have multiple windows by hiding the other windows. It also helps with debugging as APIs can create a log that could be accessed by the developer while debugging.

Examples

multishell.setWindowVisible(multishell.getCurrent(), false)
NewProgShell = multishell.launch({}, "/rom/programs/fun/hello.lua")
local DEBUG = true

multishell.setWindowVisible(multishell.getCurrent(), false)
NewProgShell = coroutine.create(multishell.launch({}, "/rom/programs/DEBUGGABLE.lua"))
multishell.setWindowVisible(NewProgShell, DEBUG)
commented

I would consider it out of scope for CC to support other OS/bootloaders/shells in this way.
We already have techniques like UnBIOS, from there you can change multishell to add the functionality yourself.

commented

I'm afraid I'm not going to implement this. I think this would end up introducing a lot of additional complexity to multishell — even the "if there's no visible tabs then you should spawn a shell" is all sorts of gnarly.

For your specific use-case, is your bootloader available anywhere? I feel there's probably ways to achieve what you want without having to use multishell.