Skip to content

Adding a selection dialog #21

@C-512L

Description

@C-512L

I am writting a Multi-ISO boot script and one thing I found missing is the ability to call from lua to open a selection dialog with options passed by lua. The code i conceptualize in lua could look something like this:

...
-- a, b and c would be an integer representing the selected option in the array or nil
local a,b,c = select {
  message = "Please select an option",
    -- maybe throw an error if it is empty?
  select_opts = { 
     [1] = "A Text",
     [2] = "B Text",
     [3] = "C Text".
  },
  multiple = true -- false by default
}
...
-- Possible code used later on
luausb.create({
  type = "storage"
  file = boot_entries[a].path
})

I have dived into the Java/Kotlin side of the code a little so If I have spare time, I might even try to make a PR implementing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions