Forum Discussion

rjbrown's avatar
rjbrown
Visitor
12 years ago

How to do popup dialog like Amazon video?

When you press certain buttons on the Springboard screen, you get slick little mini dialogs that align perfectly with that button....making it work almost like a "select" item in html.


Is this something that is easy to do with a built in widget, or did they have to do some low-level magic to do it?
  • My guess would be that it's a roImageCanvas laid over the springboard
  • That's what I guessed, but how did they measure so accurately, so that the box appears perfectly superimposed on the button they pressed? Is it possible to get screen positioning coordinates of buttons on a springboard screen?

    I'd hesitate to just make the assumption that the buttons will be in exactly the same pixel position on everyone else's screen, as they are on mine...
  • destruk's avatar
    destruk
    Streaming Star
    For the middle area/active area of a screen display it will be in the same place for everyone, provided you check the display mode of the roku box. The main trouble with positioning comes into play for the outer edge/bezel area that varies between tvs.
    You can take a screenshot in dev mode from the web interface for 1280x720 and get exact pixel coordinates from that, and adjust for the other possible screen sizes with some simple multiplication. - ie 1280x720 is 66% of 1920x1080, so multiply the pixels from the screenshot by 1.5 and there you go.