vab icon indicating copy to clipboard operation
vab copied to clipboard

Has VAB ever been tested with VUI or GUI examples?

Open Wajinn opened this issue 2 months ago • 7 comments

It appears that VUI examples (found here), do not work with VAB and Android. It appears that it can not be assumed that because sokol or gg works, that derivative ui toolkits like VUI or GUI will work too.

Might be a good idea to include VUI or GUI examples (at least a few), which appear to be officially supported by Vlang, as part of VAB tests.

Wajinn avatar Oct 10 '25 14:10 Wajinn

Many used to work on Android, did you try all?

xandro0777 avatar Oct 10 '25 14:10 xandro0777

Yes, many was tested but some had problems due to the once rapid development cycle of VUI and over time they were reduced for one reason or another. See here for the last remnants of the runtime checks that were done on legacy macOS runners: https://github.com/vlang/vab/pull/336

larpon avatar Oct 10 '25 18:10 larpon

Many examples should still work though

larpon avatar Oct 10 '25 18:10 larpon

It may also be an issue of what is considered "working".

As far as vab is concerned, that is compiling an APK file from a project, that can later be loaded in an emulator or a physical device, since we do not have a way to test interactions (and it is imho out of scope for vab to check beyond that), but only the rendering of the first few frames.

Projects that use sokol, gg, ui and gui should be able to be packaged.

spytheman avatar Oct 22 '25 13:10 spytheman

Yes, I have tested all examples some time ago. Some worked out of the box, some were fixed, some were broken.

Biggest problem for me was the extremely limited support for keyboard/text input. Many things were basically not doable or required special hacks, no fun.

This was s a very unfortunate limitation of the underlying sokol/gg - wondering if anything changed here?

Has there been any development on sokol/gg recently? There were patches for sokol around for a long time so if the main project is not moving forward maybe those should be applied in our branch?

xandro0777 avatar Oct 22 '25 15:10 xandro0777

Biggest problem for me was the extremely limited support for keyboard/text input. Many things were basically not doable or required special hacks, no fun.

Soft input methods can be very tricky to implement via JNI and is often much more clear to implement in Java unfortunately. JNI is surprisingly capable but also very very complex to work with through 2 langauge layers so my personal guess is that nothing will happen until someone who loves JNI comes by.

See https://github.com/larpon/jni/tree/master/examples/android/keyboard for an example of how to do it in Java, with some control available in V

larpon avatar Oct 23 '25 06:10 larpon

For a little richer and better working implementation I can recommend using SDL which vab does support

larpon avatar Oct 23 '25 06:10 larpon