You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 nillocala,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 onluausb.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.
The text was updated successfully, but these errors were encountered:
That looks like a reasonable addition to me, if you're interested in implementing this feel free to submit a PR. Otherwise, I could implement it myself.
That looks like a reasonable addition to me, if you're interested in implementing this feel free to submit a PR. Otherwise, I could implement it myself.
I see the project uses both Kotlin and Java in a lot of places. Are there any contributing guidelines for the project on whether certain functionality should be written on Java or Kotlin?
The Kotlin is a fairly recent addition, in general I have been writing new code in Kotlin and slowly rewriting the Java into Kotlin. The exception is classes which are directly exposed to the lua interface using CoerceJavaToLua, because LuaJ doesn't support Kotlin. These classes are contained under org.netdex.androidusbscript.lua and have a special Proguard rule to avoid scrambling names.
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:
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.
The text was updated successfully, but these errors were encountered: