Skip to content

Instantly share code, notes, and snippets.

@hvgotcodes
Created April 30, 2012 01:37
Show Gist options
  • Save hvgotcodes/2554739 to your computer and use it in GitHub Desktop.
Save hvgotcodes/2554739 to your computer and use it in GitHub Desktop.
class hsc.ui.SplashView
constructor: ->
@window = Ti.UI.createWindow
title:'Tab 1',
backgroundColor:'#fff'
hackerLabel = Ti.UI.createLabel
color: '#900',
font: { fontSize:32 },
shadowColor: '#aaa',
shadowOffset: {x:2, y:2},
text: 'HACKER',
textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,
left: 10,
top: 60,
height: 'auto',
width: 'auto'
scLabel = Ti.UI.createLabel
color: '#900',
font: { fontSize:32 },
shadowColor: '#aaa',
shadowOffset: {x:2, y:2},
text: 'SCORECARD',
textAlign: Ti.UI.TEXT_ALIGNMENT_RIGHT,
right: 10,
top: 95,
height: 'auto',
width: 'auto'
newRoundBtn = Titanium.UI.createButton
title: 'New Round',
top: Ti.App.SCREEN_HEIGHT / 2,
width: 100,
height: 50
newRoundBtn.addEventListener 'click', (e) ->
Ti.API.info "You clicked the new round button"
historyBtn = Ti.UI.createButton
title: 'History',
top: Ti.App.SCREEN_HEIGHT / 2 + 60,
width: 100,
height: 50
historyBtn.addEventListener 'click', (e) ->
Ti.API.info 'history'
@window.add hackerLabel
@window.add scLabel
@window.add newRoundBtn
@window.add historyBtn
open: ->
@window.open()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment