Linux Advice needed for writing multi-purpose button add-on
#1
Hi.

I'd like to write an add-on that just adds buttons to the Home page of the re-Touch skin (which, en-passant, is absolutely awesome), at the bottom of the screen, next to the existing buttons. I need to know beforehand if there's any form of support for long touch events in Kodi. What I'd like my add-on to do is manage three or four functionalities with a single button. So all my add-on has to show is buttons.

Ideally once the button is pressed, it should leave its default state and cycle between no more than 3 functionalities each time it's pressed. A long touch on the same button would bring it back to its default state. Each state transition has to run some action depending on the state being transitioned to.

Here are a few ideas, in decreasing order of preference in case Kodi doesn't support long touch events:
  • Using touch press and release events to detect a long touch event. Each time the button is pressed it cycles between functionalities. A long press restores it to its default state.
  • Pressing the button shows a temporary 2-states button and cycles the temporary button function. If no action is made the temporary button disappears.
  • Pressing the button makes some or all the buttons at the bottom disappear, showing a new set of buttons next to it. Pressing any button makes the popup disappear and restores the main button to its default state.
Do you have any hint, advice, recommendation?
Reply
#2
Turns out I have to take a close look at that skin. There seems to be all I need to know in the source package.
Reply

Logout Mark Read Team Forum Stats Members Help
Advice needed for writing multi-purpose button add-on0