1. 1 day ago  /  0 notes

  2. By the end of my second term, we will have the first permanent base on the moon and it will be American.
    – Newt Gingrich

    1 day ago  /  0 notes  /  Source: NPR

  3. 3 days ago  /  10 notes  /  Source: jockohomo

  4. Improving CCMenuPopup

    In chapter 2.3 of Building and Monetizing Game Apps for iOS, Todd Perkins demonstrates a method for displaying a popup menu to handle pausing the game. The popup is dismissed by overriding the ccTouchBegan method in the CCMenu subclass:

    -(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event 
    {
        if (![super itemForTouch:touch])
        {
            return NO;
        }
        NSArray *ancestors = [NSArray arrayWithObjects:self.parent,
    self.parent.parent,
    self.parent.parent.parent,
    nil];
        for (CCNode *n in ancestors) 
        {
            if ([n isKindOfClass:[PopUp class]])
            {
                [(PopUp *)n closePopUp];
            }
        }
        return [super ccTouchBegan:touch withEvent:event];
    }

    This has the immediate effect of dismissing the popup when one of the menu items is touched. But with the popup and its menu removed from memory, the CCMenuItem for unpausing the game may not get the ccTouchEnded message in time before it is released. Without that message, the game is left is a paused state.

    A better solution would be to replace the ccTouchBegin method with a ccTouchEnded method:

    -(void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event
    {
    [super ccTouchEnded:touch withEvent:event];
    if ([super itemForTouch:touch])
    {
    // Simplified
    [(PopUp *)self.parent.parent closePopUp];
    }
    }

    Using this method, the action on menu item is properly handled before the popup is removed from memory.

    6 days ago  /  0 notes  /  Source:

  5. The Singing House

    1 week ago  /  0 notes  /  Source: Laughing Squid

  6. 1 week ago  /  0 notes

  7. Happy Birthday

    Happy Birthday

    2 weeks ago  /  0 notes

  8. Strange Agricultural Landscapes Seen From Space

    Strange Agricultural Landscapes Seen From Space

    2 weeks ago  /  0 notes  /  Source: slavin

  9. (via slavin)

    3 weeks ago  /  5 notes  /  Source: blip.tv

  10. Morrissey easter egg found in Google Earth.

    Morrissey easter egg found in Google Earth.

    3 weeks ago  /  0 notes