Skip to content

Instantly share code, notes, and snippets.

@emilwidlund
Last active May 9, 2018 18:00
Show Gist options
  • Select an option

  • Save emilwidlund/e89975ea25a02e33a544af3ca4a9965d to your computer and use it in GitHub Desktop.

Select an option

Save emilwidlund/e89975ea25a02e33a544af3ca4a9965d to your computer and use it in GitHub Desktop.
for i in [0..4]
focusable = new Focusable
parent: homeView.safezone
y: i * 90 + 100
backgroundColor: null
width: padding * 10 + padding
height: 80
x: 10
html: "#{editPlayerMenu[i]}"
style:
"color": "black"
name: "#{editPlayerMenu[i]}"
focusProperties:
x: 50
backgroundColor: null
animationOptions:
time: .2
animationOptions:
time: .2
actions: [
{
keyCode: 0,
function: () ->
if app.focusSystem.focusedElement.name == 'someName'
myApp.transitionToView(infoView, Transitions.goIn)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment