Forum Discussion
7 Replies
- csangkravatVisitorDon't think too much!!, Please feel free and try 'focusButton'.
just in case, I used something like this!//Sample Code
function onKeyEvent(key as String, press as Boolean) as Boolean
if key = "right"
m.yourbutton.focusButton = 1
else if key = "left"
m.yourbutton.focusButton = 0
end if
end function
here's the link: https://sdkdocs.roku.com/display/sdkdoc/ButtonGroup
Good Luck!
Geb - alexboyerVisitorI ended up using LayoutGroup instead combined with onKeyEvent and a field observer to handle the navigation.
- nmavesVisitorIs this really the only way to do this?
- zachbarnesReel RookieHas anyone figure out how to handle this with the ButtonGroup?
- nmavesVisitorI ended up writing my own <HorizontalButtonGroup>.
I am sure it could be better. Maybe I should put it out on github.
Nathan - nithinks94Visitor@nmaves, do you have this code documented anywhere?
- nmavesVisitorI have not posted it anywhere but I could. I ended up not even using the Button component from Roku. I made my own with rectangles and text nodes as I wanted to apply different colors for the active and non-active states.