Bit of an update, been playing with the screen and swiper.js for a few days and while I can get a really nice clean looking interface that works great in a browser over wifi using a phone or PC, the accuracy and responsiveness of the touch controls on the 3.5 inch LCD just aren't good enough and I think anyone using them would end up smashing the thing to bits! Any attempt to tap the screen with a stylus was seen as a click and drag movement which just changed the game selection on screen. I tried using overlays with static links and got it working much better, one downside is you have an extra press to launch a game, another is the complexity of using nested swipers to get the menus to work. I've shelved it for the time being and may come back to it later.
I tried using web interface I created for the wifi and while it displayed quite nicely on the screen, there was no way to scroll the page. The Pi sees the touchscreen as a mouse control and not a touch interface like a phone or tablet so there is no way to grab the screen and drag it by touching it. Not to be defeated I tried a few things and managed to find a javascript method that worked - disclaimer at this point, I'm not a developer by trade so please excuse any obvious mistakes or stupid assumptions! I'm just a hobbyist and my skills are far from advanced! I've managed to tweak the interface to fit better on the 3.5 inch screen and everything seems to be there functionally, one difference using the touchscreen is speed of navigation, on a phone you can quite easily jump screens of links with a flick but this is way slower with a stylus. I've written some extra code to help which adds a quick navigation menu at the top of the game list that is hidden by default but when you open the game list and scroll up you'll see it. I've indexed all the available games in the rom folder then checked that against the current enabled game list in the CSV file and produced an alphabetical display with hyperlinks to jump straight to games beginning with that letter and only letters that have associated games are linked.
Next steps are to clear up the image, remove all startup text and probably add a logo on boot and make sure it can switch safely between the various modes, wifi only, wifi + 16x2 LCD, wifi + 3.5 LCD etc
I tried using web interface I created for the wifi and while it displayed quite nicely on the screen, there was no way to scroll the page. The Pi sees the touchscreen as a mouse control and not a touch interface like a phone or tablet so there is no way to grab the screen and drag it by touching it. Not to be defeated I tried a few things and managed to find a javascript method that worked - disclaimer at this point, I'm not a developer by trade so please excuse any obvious mistakes or stupid assumptions! I'm just a hobbyist and my skills are far from advanced! I've managed to tweak the interface to fit better on the 3.5 inch screen and everything seems to be there functionally, one difference using the touchscreen is speed of navigation, on a phone you can quite easily jump screens of links with a flick but this is way slower with a stylus. I've written some extra code to help which adds a quick navigation menu at the top of the game list that is hidden by default but when you open the game list and scroll up you'll see it. I've indexed all the available games in the rom folder then checked that against the current enabled game list in the CSV file and produced an alphabetical display with hyperlinks to jump straight to games beginning with that letter and only letters that have associated games are linked.
Next steps are to clear up the image, remove all startup text and probably add a logo on boot and make sure it can switch safely between the various modes, wifi only, wifi + 16x2 LCD, wifi + 3.5 LCD etc
Attachments
-
IMG_20200728_011330606.jpg72.2 KB · Views: 168
-
IMG_20200728_011404899.jpg79.5 KB · Views: 182
-
IMG_20200728_011425928.jpg101.5 KB · Views: 168
-
IMG_20200728_011458044.jpg71.8 KB · Views: 166
-
IMG_20200728_011527739.jpg74 KB · Views: 154
-
IMG_20200728_011543777.jpg77.5 KB · Views: 163
-
IMG_20200728_011306001.jpg83.5 KB · Views: 171