0

I tried to use ComponentController to navigate from Main Scene to ViewA, then I found two problem

  1. The button in ViewA does not respond to remote events. (button.setFocus(true))
  2. The font:LargeBoldSystemFont/font:MediumBoldSystemFont does not work normally

I am new to Roku development. Any hint is appreciated.

Update:

I figured out the solution for 1 I was not supposed to setFocus in init() function. I have to add m.top.observeField("focusedChild","onChildFocused") to init()

Then setFocus in onChildFocused

sub onChildFocused()
    print "child focused"
    if m.top.isInFocusChain() and not m.button.hasFocus() then
      m.button.setFocus(true)
    end if 
end sub

I still don't know why the fonts don't work normally.

enter image description here

echo
  • 1,244
  • 1
  • 16
  • 40

1 Answers1

0

Its not clear from your question what issue you are facing with fonts. If your question is regarding button text font, check whether you are setting fonts for "textFont" and "focusedTextFont" both for the button.

swaran
  • 404
  • 6
  • 14