diff --git a/components/IconButton.brs b/components/IconButton.brs index ed328cf1..20176757 100644 --- a/components/IconButton.brs +++ b/components/IconButton.brs @@ -9,11 +9,11 @@ sub init() m.top.observeField("height", "onHeightChanged") m.top.observeField("width", "onWidthChanged") m.top.observeField("padding", "onPaddingChanged") - m.top.observeField("focusedChild", "onFocusChanged") + m.top.observeField("focus", "onFocusChanged") end sub sub onFocusChanged() - if m.top.hasFocus() + if m.top.focus m.buttonBackground.blendColor = m.top.focusBackground else m.buttonBackground.blendColor = m.top.background @@ -75,5 +75,13 @@ function onKeyEvent(key as string, press as boolean) as boolean return true end if + if key = "right" and m.top.hasFocus() + m.top.escape = "right" + end if + + if key = "left" and m.top.hasFocus() + m.top.escape = "left" + end if + return false end function diff --git a/components/IconButton.xml b/components/IconButton.xml index d8d0f51c..7201acdd 100644 --- a/components/IconButton.xml +++ b/components/IconButton.xml @@ -1,9 +1,9 @@ - - - @@ -14,6 +14,8 @@ + +