This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
widgetAtPoint: (point) -> | |
_widgetsInTouch = [] | |
for widget,i in @widgets | |
continue if widget instanceof App.Views.TextWidget | |
if widget.getIsVisible() and widget.isPointInside(point) | |
_widgetsInTouch[i] = widget | |
_widgetsInTouch.sort (a, b) -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pull in the modules we're going to use | |
cocos = require 'cocos2d' # Import the cocos2d module | |
nodes = cocos.nodes # Convenient access to 'nodes' | |
events = require 'events' # Import the events module | |
geo = require 'geometry' # Import the geometry module | |
# Convenient access to some constructors | |
Layer = nodes.Layer | |
Scene = nodes.Scene | |
Label = nodes.Label |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function python_bash_prompt { | |
echo `python ~/.dotfiles/bash_prompt.py` | |
} | |
PS1="$(python_bash_prompt) " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSSize frameSize = [_containerView frame].size; | |
NSRect rect = NSMakeRect(0, 0, frameSize.width, frameSize.height); | |
[[_listView view] setFrame:rect]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typeSelect: SC.SelectView.design({ | |
controlSize: SC.SMALL_CONTROL_SIZE, | |
layout: { centerY: 0, height: 18, left: 210, width: 120 }, | |
items: [ | |
{title: 'Running', value: 'running', icon: 'select-button-icon'}, | |
{title: 'Mountain biking', value: 'mountain biking', icon: 'select-button-icon'}, | |
{title: 'Rambling', value: 'rambling', icon: 'select-button-icon'}, | |
{title: 'Walking', value: 'walking', icon: 'select-button-icon'} | |
], // items | |
itemTitleKey: 'title', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RouteTool.mapController = SC.ObjectController.create( | |
/** @scope RouteTool.mapController.prototype */ { | |
overlayObjects: new Array(), | |
addRoute: function(sender, route) { | |
if (!route) { | |
var route = RouteTool.store.createRecord(RouteTool.Route, { | |
points: [[37.772323, -122.214897], [21.291982, -157.821856], [-18.142599, 178.431], [-27.46758, 153.027892]], | |
description: 'Test Route 1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glEnable(GL_SCISSOR_TEST); | |
// Some region to clip to | |
CGRect rect = CGRect(100, 100, 200, 200); | |
CGRect frame = [[[CCDirector sharedDirector] openGLView] frame]; | |
// Adjust for position | |
CGPoint worldPos = [self convertToWorldSpaceAR:position_]; |