Skip to content

Instantly share code, notes, and snippets.

// Generated by CoffeeScript 1.3.1
(function() {
hsc.models.Record = (function() {
Record.name = 'Record';
function Record(props) {
this.props = props != null ? props : {};
Ti.API.info('creating new record');
// Generated by CoffeeScript 1.3.1
(function() {
hsc.states.RoundStates = Stativus.State.create({
name: "#round_states",
parentState: "#root",
enterState: function() {
return Ti.API.info("entered round states");
},
states: [
hsc.ui.openVerticalScorecard = ->
if not hsc.ui.views['verticalScorecard']
verticalScorecard = new hsc.ui.VerticalScorecard
hsc.ui.views['verticalScorecard'] = verticalScorecard
verticalScorecard.open()
class hsc.ui.VerticalScorecard
constructor: ->
less = if Ti.App.SCREEN_WIDTH < Ti.App.SCREEN_HEIGHT then Ti.App.SCREEN_WIDTH else Ti.APP.SCREEN_HEIGHT
if Ti.App.SCREEN_WIDTH < Ti.App.SCREEN_HEIGHT
diff = Ti.App.SCREEN_HEIGHT - Ti.App.SCREEN_WIDTH
else
diff = Ti.App.SCREEN_WIDTH - Ti.APP.SCREEN_HEIGHT
top = diff - 24
hsc.states.init = ->
hsc.statechart = Stativus.createStatechart();
hsc.statechart.addState '#root',
enterState: ->
Ti.API.info 'enter state!!!'
hsc.ui.init();
newRound: ->
Ti.API.info 'new round!!'
// Generated by CoffeeScript 1.3.1
(function() {
hsc.ui.VerticalScorecard = (function() {
VerticalScorecard.name = 'VerticalScorecard';
function VerticalScorecard() {
var cell, height, i, left, top, width, _i;
width = Ti.App.SCREEN_WIDTH / 3 - 20;
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',
hsc.ui = {}
hsc.ui.views = {}
# inits the app
hsc.ui.init = ->
Ti.UI.setBackgroundColor('#000');
pWidth = Ti.Platform.displayCaps.platformWidth;
pHeight = Ti.Platform.displayCaps.platformHeight;
class hsc.ui.SplashView
constructor: ->
@tabGroup = Ti.UI.createTabGroup()
win1 = Ti.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
})
label1 = Titanium.UI.createLabel({
color:'#999',
class hsc.ui.SplashView
constructor () ->
tabGroup = Ti.UI.createTabGroup()
win1 = Ti.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff'
})