News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Github action workflow for android nightly build

Started by krosk, August 17, 2021, 08:12:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prissi


Yona-TYT

Quote from: prissi on October 05, 2021, 05:45:20 AM
Try to set "hide_keyboard=1" in simuconf.tab


That should hide the keyboard, but I meant to automatically hide and show only if you are editing an input box for text or numbers.
Is this supported in SDL2? .

prissi


Yona-TYT

#73
Quote from: prissi on October 07, 2021, 03:42:13 AM
[]The setting does exactly what you want.
[]that's great!

Edit.

I have activated the option but it is not working I'm afraid. :(

prissi

There was an error on closing the keybord, when the windows was just closed. But the call to SDL_StartTextInput() is there. Does the keyboard appear on opening the load dialoge?

If so, then maybe r10133 will correct open and close it again.

Yona-TYT

Quote from: prissi on October 08, 2021, 01:55:03 AM
There was an error on closing the keybord, when the windows was just closed. But the call to SDL_StartTextInput() is there. Does the keyboard appear on opening the load dialoge?

If so, then maybe r10133 will correct open and close it again.
exactly, the keyboard appears and it is difficult to hide it.

prissi

r10133 should hide it again then. Until then, you must finish text input with "RETURN" key, that should hide the keyboard again.

Yona-TYT

He asked me if it is possible to distinguish between text and numeric inputs, this would be nice.

Yona-TYT

Quote from: Yona-TYT on October 08, 2021, 02:14:27 AMHe asked me if it is possible to distinguish between text and numeric inputs, this would be nice.



[]For example, if I click on a numeric entry, the keyboard should look like this:




prissi

There is no function in SDL for this, as far as I know.

Yona-TYT

Quote from: prissi on October 08, 2021, 01:43:08 PM
There is no function in SDL for this, as far as I know.
Maybe not implementing. :(

In JavaScript it is done with a simple "type = number" attribute.

Yona-TYT

I'm afraid the last review gives me more problems.


Buttons do not respond to touch sensor and keyboard still appears at startup. :(

krosk

The keyboard appearing at startup is likely an oddity from the Java part in Android, so it could be some code to correct on the Android side, not on the game side.

That said, arent you supposed to be able to hide the keyboard with a press of the (on screen) back button? This is a generic Android behavior. (Making the back/menu/jump buttons appearing is normally possible by sliding fingers to show the notification panel)

prissi

EDIT: There was one SDL_TextInput too much. Fixed in r10142.

I am handling all the proper finger handling code. Are you using the emulator or a real device?


prissi

Well, on my windows touchscreen, I get the right finder events.


Yona-TYT

r10142, The touch response is still broken I'm afraid :(.

I like to listen to the midi of simutrans on my mobile, but now the touch does not respond.  :'(

prissi

Please try r10160. I have made a lot of effort the better filter events.

Yona-TYT

Unfortunately, the problem is still there, I can't press the buttons in the welcome window, and in the package selection window somehow progress is made. :(

The last time the touch worked for me was in r10123.

Yona-TYT

if I remember correctly, from r10133 the touch sensor stopped working for simutrans.

prissi

I run simutrans from github in blustacks. The button event coord is registered, but on a different position than the actual  one on the screen. The scaling for finder event is different than for mouse events. Should work as intended again for r10165.

Yona-TYT

@Prissi, I'm going to test, that downloading 134mb consumes my data plan a lot.🤪


Finding this, maybe it can serve as a reference: 😎
https://forum.simutrans.com/index.php?topic=13947.0

prissi

#93
Rhater wait then for Wifi access ... it is not that urgent.

When testing in the emulator, anz savegame will not be restored after quitting.

Yona-TYT

Quote from: prissi on October 17, 2021, 07:37:28 AM
Rhater wait then for Wifi access ... it is not that urgent.
There is no other way I'm afraid.

Yona-TYT

Quote from: prissi on October 17, 2021, 07:37:28 AMWhen testing in the emulator, anz savegame will not be restored after quitting.
That is correct, apparently it had been broken when ported to sdl2, I was about to report it but I got stuck with the touch inputs.






I have been trying to download the apk, but unfortunately my network is very unstable and the github server is very cruel in not allowing to resume downloads. :-[ 

prissi

You can download to your computer and use the USB connection to transfer to your phone (needs to enable debug mode, I think). That should also reduce your data plan usage.

Yona-TYT

Quote from: prissi on October 18, 2021, 03:20:47 AMYou can download to your computer and use the USB connection to transfer to your phone (needs to enable debug mode, I think).
I use something called "qrcp" in linux to transfer the files to my phone using the wifi network.  8)



Quote from: prissi on October 18, 2021, 03:20:47 AMThat should also reduce your data plan usage.
We don't have unlimited internet service I'm afraid.

Yona-TYT

Great, the keyboard works fine and is already responding to the touch sensor.


Two problems:
The settings are not saving, at least they are not on my device.

When using both fingers to zoom in on the minimap for some reason it stops responding to the touch sensor.

prissi

Thank you, good news. Does the touch come back after a three finger scroll? Or after touching somewhere (may in the menu?) In my tests, I had mostly trouble buying engines, first touch activate the engine and then I needed a double tap rather. Anyway, I think that can be done via the simulator.

I think the saving is probably something general with Android, and occurs also in the simulator. So I should able to test this. It is probably related to the not saving on quit, since it would save to the same directory as the settings.

Yona-TYT

Quote from: prissi on October 18, 2021, 06:35:15 AMThank you, good news. Does the touch come back after a three finger scroll? Or after touching somewhere (may in the menu?) In my tests, I had mostly trouble buying engines, first touch activate the engine and then I needed a double tap rather. Anyway, I think that can be done via the simulator.
When zooming in with two fingers in the minimum, the touch is trapped there and no longer allows you to release more, neither using 3 fingers nor touching anywhere.

prissi

#101
Hmm, the way the touch is implemented in SDL2 on Android sucks. Either I get too many finger up messages, or, apparently I can also get none. Hmm. I will try something.

Yona-TYT


Quote from: prissi on October 19, 2021, 12:15:51 AMHmm, the way the touch is implemented in SDL2 on Android sucks. Either I get too many finger up messages, or, apparently I can also get none. Hmm.

[]I apologize, I said minimum, but I meant mini-map, I hope I haven't confused you with that silly translation error.

prissi

No, the finger event (at least under windows) have a long delay compared to related mouse and actual finger state. That makes suppressing multi-touch event difficult. I tried something, but I would be more patient with another download, as I will play around more at home.

Yona-TYT

@prissi, Before porting to SDL2 you could use the Android "back" button to close the last open window, can you make this work again? It is very useful.