iteye_15750 2014-12-06 06:37
浏览 225
已采纳

[入门系列]修改CrossApp默认打开的Window(窗口)

CrossApp中,整个工程的入口函数是AppDelegate,在AppDelegate中屏蔽了多平台之间的区别,从而实现了跨平台。

言归正传,CrossApp中修改默认打开的Window的方法和Cocos2d-x中是相似的,但是对于没有学习过Cocos2d-x的朋友,还是需要介绍一下。

首先,需要修改一下AppDelegate.cpp中所导入的头文件:

[cpp] view plain copy
#include "AppDelegate.h"

#include "RootWindow.h"



上边是修改之前的,将下边的RootWindow.h改成我们自己window的头文件 在这里我自己写的窗口的头文件是" MainMenuWindow.h"
修改后:

[cpp] view plain copy
#include "AppDelegate.h"

#include "MainMenuWindow.h"

接下来修改一下 bool AppDelegate ::applicationDidFinishLaunching()函数中的实现,这个函数是在程序载入完毕之后执行的。
没修改前:
http://www.iteye.com/problems/121435
http://www.iteye.com/problems/121434
http://www.iteye.com/problems/121432
http://www.iteye.com/problems/121431
http://www.iteye.com/problems/121429
http://www.iteye.com/problems/121428
http://www.iteye.com/problems/121426
http://www.iteye.com/problems/121425
http://www.iteye.com/problems/121799
http://www.iteye.com/problems/121800
http://www.iteye.com/problems/121798
http://www.iteye.com/problems/121797
http://www.iteye.com/problems/121796
http://www.iteye.com/problems/121795
http://www.iteye.com/problems/121794
http://www.iteye.com/problems/121793
http://www.iteye.com/problems/121792
http://www.iteye.com/problems/121791
http://www.iteye.com/problems/121790
http://www.iteye.com/problems/121789
http://www.iteye.com/problems/121788
http://www.iteye.com/problems/121787
http://www.iteye.com/problems/121786
http://www.iteye.com/problems/121785
http://www.iteye.com/problems/121784
http://www.iteye.com/problems/121783
http://www.iteye.com/problems/121782
http://www.iteye.com/problems/121781
http://www.iteye.com/problems/121780
http://www.iteye.com/problems/121779
http://www.iteye.com/problems/121778
http://www.iteye.com/problems/121777
http://www.iteye.com/problems/121776
http://www.iteye.com/problems/121775
http://www.iteye.com/problems/121775
http://www.iteye.com/problems/121774
http://www.iteye.com/problems/121773
http://www.iteye.com/problems/121772
http://www.iteye.com/problems/121771
http://www.iteye.com/problems/121770
http://www.iteye.com/problems/121769
http://www.iteye.com/problems/121768
http://www.iteye.com/problems/121767
http://www.iteye.com/problems/121766
http://www.iteye.com/problems/121765
http://www.iteye.com/problems/121764
http://www.iteye.com/problems/121763
http://www.iteye.com/problems/121762
http://www.iteye.com/problems/121761
http://www.iteye.com/problems/121760
http://www.iteye.com/problems/121759
http://www.iteye.com/problems/121758
http://www.iteye.com/problems/121757
http://www.iteye.com/problems/121757
http://www.iteye.com/problems/121756
http://www.iteye.com/problems/121755
http://www.iteye.com/problems/121754
http://www.iteye.com/problems/121753
http://www.iteye.com/problems/121752
http://www.iteye.com/problems/121751
http://www.iteye.com/problems/121750
http://www.iteye.com/problems/121749
http://www.iteye.com/problems/121748
http://www.iteye.com/problems/121747
http://www.iteye.com/problems/121746
http://www.iteye.com/problems/121745
http://www.iteye.com/problems/121744
http://www.iteye.com/problems/121743
http://www.iteye.com/problems/121742
http://www.iteye.com/problems/121741
http://www.iteye.com/problems/121740
http://www.iteye.com/problems/121739
http://www.iteye.com/problems/121738
http://www.iteye.com/problems/121737
http://www.iteye.com/problems/121736
http://www.iteye.com/problems/121735
http://www.iteye.com/problems/121734
http://www.iteye.com/problems/121733
http://www.iteye.com/problems/121732
http://www.iteye.com/problems/121731
http://www.iteye.com/problems/121730
http://www.iteye.com/problems/121729
http://www.iteye.com/problems/121728
http://www.iteye.com/problems/121727
http://www.iteye.com/problems/121726
http://www.iteye.com/problems/121725
http://www.iteye.com/problems/121724
http://www.iteye.com/problems/121723
http://www.iteye.com/problems/121722
http://www.iteye.com/problems/121721
http://www.iteye.com/problems/121720
http://www.iteye.com/problems/121719
http://www.iteye.com/problems/121718
http://www.iteye.com/problems/121717
http://www.iteye.com/problems/121716
http://www.iteye.com/problems/121715
http://www.iteye.com/problems/121714
http://www.iteye.com/problems/121713
http://www.iteye.com/problems/121712
http://www.iteye.com/problems/121711
http://www.iteye.com/problems/121710
http://www.iteye.com/problems/121709
http://www.iteye.com/problems/121708
http://www.iteye.com/problems/121707
http://www.iteye.com/problems/121706
http://www.iteye.com/problems/121706
http://www.iteye.com/problems/121705
http://www.iteye.com/problems/121704
http://www.iteye.com/problems/121704
http://www.iteye.com/problems/121703
http://www.iteye.com/problems/121702
http://www.iteye.com/problems/121701
http://www.iteye.com/problems/121699
http://www.iteye.com/problems/121705
http://www.iteye.com/problems/121700

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上