New DPad control
As mentioned in a previous thread we have been working on a new control for the app and it is time to show it of a bit more.
This control is not available at the moment but we will release it soon. However we still would like to have your feedback perhaps there is something we have missed.
Lets start with a few pictures!
The first image is from a test remote that was used during development and the second image is from a samsung TV remote that uses IR. As you can see it is possible to add an icon to the middle button but not to the sides. We will start out with this limitation and see if there is a need for icons on the sides.
Creating a dpad in a layout
Defining a dpad is easy. Let's look at an example:
<dpad icon="select" ontouchabs="abs" ontap="select"> <item ontap="up" onup="upup" ondown="downup"/> <item ontap="right" onup="upright" ondown="downright"/> <item ontap="down" onup="updown" ondown="downdown"/> <item ontap="left" onup="upleft" ondown="downleft"/> </dpad>
The main dpad element has five different properties/events:
- icon icon of the center button
- x x position of the center button
- y y position of the center button
- deg degrees of the center button to the current location from the positive x axis (0-360).
- dist Distance from the center to the current location (0-1).
Event triggers when the center button is tapped.
Event triggers when the center button is pressed down
Event triggers when center button is released
A dpad should also contain 4 child items. Each item represents one direction in order: up, right, down, left. Each item can have three different events:
Event triggers when the center button reaches the inner line and the distance on the onTouchAbs is 1. If the center button is held at this position it will repeat the action every 100ms after an initial delay of 1000ms.
Event triggers when the distance is 1 just like onTap but will not repeat.
Event triggers when the center button is removed from the edge.
The Dpad control have now also been added to the iOS app!
As you can see in the screenshot I also added the Dpad to the kodi remote. I will release this version of the kodi remote as soon as we have sent out an update with the Dpad so you can start playing with it. I think this control will improve the experience a lot in all remotes that have some kind of navigation. What do you think?
I think that's absolutely wonderful and great work on your part :)