0

Grestures on popups

Barry Jones 8 лет назад в Приложения / i3 Pro обновлен 8 лет назад 3

hi I would like to add gestures to pop up panels, this would allow me to use gestures where I want them,


1/ Create a gesture pad on a page using a pop up, this will stop other buttons on the page from triggering gestures

2/ it would allow me to swop out gestures for joystick control for certain customers who can't use gestures.

3/ use the same gestures pop up on different pages, for hdmi control systems from say a tv

Can I get some feedback regarding this idea please

Use EVENT_ITEM_RELEASE instead EVENT_ITEM_PRESS on buttons

You may use same function for different pages

var gest_funct = function(gesture, x, y) {
    IR.Log(" page: " + this.Name)
    switch(gesture)
    {
        case IR.GESTURE_SWIPE_LEFT:  // 1
            IR.Log("Left");   
            break;
        case IR.GESTURE_SWIPE_RIGHT: // 2
            IR.Log("Right"); 
            break;
        case IR.GESTURE_SWIPE_UP: // 3
            IR.Log("Up");     
            break;
        case IR.GESTURE_SWIPE_DOWN: // 4
            IR.Log("Down");   
            break;
        }
}
IR.AddListener(IR.EVENT_GESTURE_BEGIN, page1, gest_funct, page1);
IR.AddListener(IR.EVENT_GESTURE_BEGIN, page2, gest_funct, page2);

Look that's great for simple jobs but today's job replaced 15 remotes and making scripts for each page control will take a lot of time, also having gestures on pages instead of popups, I have sliders on timered lighting popups and when you slide the dimmer up you alter the gesture state on the page below. So having popups with gestures allows for a better control of the GUI


Ps thanks for the follow up of the script, will add it to my script bank.


Barry

MiRemote 

Сервис поддержки клиентов работает на платформе UserEcho