This file contains hidden or 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
public sealed partial class MainPage : Page | |
{ | |
public Popup headerMenuPopup; | |
// 自訂的控制項 | |
public HeaderMenuControl headerMenuCtl; | |
// 是否已加入到 Popup 物件中 | |
public bool isAddedToPopup; |
This file contains hidden or 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
<Page | |
x:Class="HeaderMenu.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:HeaderMenu" | |
xmlns:common="using:HeaderMenu.Common" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d"> |
This file contains hidden or 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
CCSpriteFrameCache *frameCache = CCSpriteFrameCache::sharedSpriteFrameCache(); | |
frameCache->addSpriteFramesWithFile("Charlie_plist.plist"); |
This file contains hidden or 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
// on "init" you need to initialize your instance | |
bool HelloWorld::init() | |
{ | |
////////////////////////////// | |
// 1. super init first | |
if ( !CCLayer::init() ) | |
{ | |
return false; | |
} |
This file contains hidden or 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
class HelloWorld : public cocos2d::CCLayer | |
{ | |
private: | |
CCSprite *charlie; | |
float totalTime; | |
public: | |
// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone | |
virtual bool init(); |
NewerOlder