├── .gitignore ├── README.md ├── btns.png ├── demo ├── egretProperties.json ├── index.html ├── resource │ ├── assets │ │ ├── bg.jpg │ │ └── simple │ │ │ ├── CheckBox │ │ │ ├── checkbox-select_disabled.png │ │ │ ├── checkbox-select_normal.png │ │ │ ├── checkbox-select_over.png │ │ │ ├── checkbox-unselect_disabled.png │ │ │ ├── checkbox-unselect_normal.png │ │ │ └── checkbox-unselect_over.png │ │ │ ├── DropdownList │ │ │ ├── DropDownListButtonSkin_down.png │ │ │ ├── DropDownListButtonSkin_up.png │ │ │ ├── dropdownlist_arrow_down.png │ │ │ └── dropdownlist_arrow_up.png │ │ │ ├── HScrollBar │ │ │ ├── hscrollbtn.png │ │ │ └── hscrolltrack.png │ │ │ ├── HSlider │ │ │ ├── HSlider_fill.png │ │ │ ├── HSlider_thumb.png │ │ │ └── HSlider_track.png │ │ │ ├── ItemRenderer │ │ │ ├── app_list_item_cutlline.png │ │ │ ├── app_list_item_select.png │ │ │ └── app_list_item_up.png │ │ │ ├── NormalButton │ │ │ ├── button_disabled.png │ │ │ ├── button_down.png │ │ │ └── button_normal.png │ │ │ ├── ONOFFButton │ │ │ ├── onoffbutton_off_label.png │ │ │ ├── onoffbutton_off_thumb.png │ │ │ ├── onoffbutton_off_track.png │ │ │ ├── onoffbutton_on_label.png │ │ │ ├── onoffbutton_on_thumb.png │ │ │ └── onoffbutton_on_track.png │ │ │ ├── Panel │ │ │ ├── Panel_back.png │ │ │ └── Panel_headeBack.png │ │ │ ├── ProgressBar │ │ │ ├── Progressbar_fill.png │ │ │ └── Progressbar_track.png │ │ │ ├── RadioButton │ │ │ ├── RadioButton_select_disabled.png │ │ │ ├── RadioButton_select_normal.png │ │ │ ├── RadioButton_select_over.png │ │ │ ├── RadioButton_unselect_disabled.png │ │ │ ├── RadioButton_unselect_normal.png │ │ │ └── RadioButton_unselect_over.png │ │ │ ├── TabBar │ │ │ └── Tab Bar_select.png │ │ │ ├── TextInput │ │ │ └── textbox.png │ │ │ ├── TitleWindow │ │ │ ├── closebtn_disabled.png │ │ │ ├── closebtn_down.png │ │ │ └── closebtn_up.png │ │ │ ├── ToggleButton │ │ │ ├── togglebutton_disabled.png │ │ │ ├── togglebutton_normal.png │ │ │ ├── togglebutton_over.png │ │ │ └── togglebutton_selected.png │ │ │ ├── Tree │ │ │ ├── tree_back.png │ │ │ ├── tree_btnDisabled.png │ │ │ ├── tree_btnDisabledSelect.png │ │ │ ├── tree_btnDown.png │ │ │ ├── tree_btnDownSelect.png │ │ │ ├── tree_btnUp.png │ │ │ ├── tree_btnUpSelect.png │ │ │ ├── tree_icon_dir.png │ │ │ └── tree_icon_file.png │ │ │ ├── VScrollBar │ │ │ ├── vscrollbtn.png │ │ │ └── vscrolltrack.png │ │ │ └── VSlider │ │ │ ├── VSlider_fill.png │ │ │ ├── VSlider_thumb.png │ │ │ └── VSlider_track.png │ ├── config │ │ └── description.json │ ├── resource.json │ └── theme.thm ├── src │ ├── AssetAdapter.ts │ ├── LoadingUI.ts │ ├── MD5.ts │ ├── Main.ts │ ├── components │ │ ├── GameEvent.ts │ │ ├── GameView.ts │ │ └── LoginView.ts │ └── skins │ │ ├── GameViewSkin.exml │ │ ├── LoginViewSkin.exml │ │ └── simple │ │ ├── AlertSkin.exml │ │ ├── ButtonSkin.exml │ │ ├── CheckBoxSkin.exml │ │ ├── CloseButtonSkin.exml │ │ ├── DropDownListItemRendererSkin.exml │ │ ├── DropDownListOpenButtonSkin.exml │ │ ├── DropDownListSkin.exml │ │ ├── HScrollBarSkin.exml │ │ ├── HScrollBarThumbSkin.exml │ │ ├── HSliderSkin.exml │ │ ├── HSliderThumbSkin.exml │ │ ├── ItemRendererSkin.exml │ │ ├── ListSkin.exml │ │ ├── PanelSkin.exml │ │ ├── ProgressBarSkin.exml │ │ ├── RadioButtonSkin.exml │ │ ├── ScrollerSkin.exml │ │ ├── SkinnableContainerSkin.exml │ │ ├── SkinnableDataContainer.exml │ │ ├── SliderThumbSkin.exml │ │ ├── TabBarButtonSkin.exml │ │ ├── TabBarSkin.exml │ │ ├── TextAreaSkin.exml │ │ ├── TextInputSkin.exml │ │ ├── TitleWindowSkin.exml │ │ ├── ToggleButtonSkin.exml │ │ ├── ToggleSwitchSkin.exml │ │ ├── TreeDisclosureButtonSkin.exml │ │ ├── TreeItemRendererSkin.exml │ │ ├── TreeSkin.exml │ │ ├── VScrollBarSkin.exml │ │ ├── VScrollBarThumbSkin.exml │ │ ├── VSliderSkin.exml │ │ └── VSliderThumbSkin.exml ├── template │ └── runtime │ │ ├── native_loader.js │ │ ├── native_require.js │ │ └── runtime_loader.js └── wingProperties.json ├── demo2 ├── egretProperties.json ├── index.html ├── resource │ ├── assets │ │ ├── bg.jpg │ │ ├── nest │ │ │ ├── default.png │ │ │ ├── qq.png │ │ │ ├── right.png │ │ │ └── wx.png │ │ └── simple │ │ │ ├── CheckBox │ │ │ ├── checkbox-select_disabled.png │ │ │ ├── checkbox-select_normal.png │ │ │ ├── checkbox-select_over.png │ │ │ ├── checkbox-unselect_disabled.png │ │ │ ├── checkbox-unselect_normal.png │ │ │ └── checkbox-unselect_over.png │ │ │ ├── DropdownList │ │ │ ├── DropDownListButtonSkin_down.png │ │ │ ├── DropDownListButtonSkin_up.png │ │ │ ├── dropdownlist_arrow_down.png │ │ │ └── dropdownlist_arrow_up.png │ │ │ ├── HScrollBar │ │ │ ├── hscrollbtn.png │ │ │ └── hscrolltrack.png │ │ │ ├── HSlider │ │ │ ├── HSlider_fill.png │ │ │ ├── HSlider_thumb.png │ │ │ └── HSlider_track.png │ │ │ ├── ItemRenderer │ │ │ ├── app_list_item_cutlline.png │ │ │ ├── app_list_item_select.png │ │ │ └── app_list_item_up.png │ │ │ ├── NormalButton │ │ │ ├── button_disabled.png │ │ │ ├── button_down.png │ │ │ └── button_normal.png │ │ │ ├── ONOFFButton │ │ │ ├── onoffbutton_off_label.png │ │ │ ├── onoffbutton_off_thumb.png │ │ │ ├── onoffbutton_off_track.png │ │ │ ├── onoffbutton_on_label.png │ │ │ ├── onoffbutton_on_thumb.png │ │ │ └── onoffbutton_on_track.png │ │ │ ├── Panel │ │ │ ├── Panel_back.png │ │ │ └── Panel_headeBack.png │ │ │ ├── ProgressBar │ │ │ ├── Progressbar_fill.png │ │ │ └── Progressbar_track.png │ │ │ ├── RadioButton │ │ │ ├── RadioButton_select_disabled.png │ │ │ ├── RadioButton_select_normal.png │ │ │ ├── RadioButton_select_over.png │ │ │ ├── RadioButton_unselect_disabled.png │ │ │ ├── RadioButton_unselect_normal.png │ │ │ └── RadioButton_unselect_over.png │ │ │ ├── TabBar │ │ │ └── Tab Bar_select.png │ │ │ ├── TextInput │ │ │ └── textbox.png │ │ │ ├── TitleWindow │ │ │ ├── closebtn_disabled.png │ │ │ ├── closebtn_down.png │ │ │ └── closebtn_up.png │ │ │ ├── ToggleButton │ │ │ ├── togglebutton_disabled.png │ │ │ ├── togglebutton_normal.png │ │ │ ├── togglebutton_over.png │ │ │ └── togglebutton_selected.png │ │ │ ├── Tree │ │ │ ├── tree_back.png │ │ │ ├── tree_btnDisabled.png │ │ │ ├── tree_btnDisabledSelect.png │ │ │ ├── tree_btnDown.png │ │ │ ├── tree_btnDownSelect.png │ │ │ ├── tree_btnUp.png │ │ │ ├── tree_btnUpSelect.png │ │ │ ├── tree_icon_dir.png │ │ │ └── tree_icon_file.png │ │ │ ├── VScrollBar │ │ │ ├── vscrollbtn.png │ │ │ └── vscrolltrack.png │ │ │ └── VSlider │ │ │ ├── VSlider_fill.png │ │ │ ├── VSlider_thumb.png │ │ │ └── VSlider_track.png │ ├── config │ │ └── description.json │ ├── resource.json │ └── theme.thm ├── src │ ├── AssetAdapter.ts │ ├── LoadingUI.ts │ ├── Login.ts │ ├── MD5.ts │ ├── Main.ts │ ├── QuickTest.ts │ ├── ThemeAdapter.ts │ ├── components │ │ ├── GameEvent.ts │ │ ├── GameView.ts │ │ ├── LoginButtonView.ts │ │ ├── LoginTypeView.ts │ │ ├── LoginView.ts │ │ ├── PayItemView.ts │ │ ├── PayView.ts │ │ └── QuickTestView.ts │ ├── skins │ │ ├── ButtonSkin.exml │ │ ├── GameViewSkin.exml │ │ ├── LoginButtonSkin.exml │ │ ├── LoginTypeViewSkin.exml │ │ ├── LoginViewSkin.exml │ │ ├── PayItemSkin.exml │ │ ├── PayViewSkin.exml │ │ ├── QuickTestSkin.exml │ │ └── simple │ │ │ ├── AlertSkin.exml │ │ │ ├── ButtonSkin.exml │ │ │ ├── CheckBoxSkin.exml │ │ │ ├── CloseButtonSkin.exml │ │ │ ├── DropDownListItemRendererSkin.exml │ │ │ ├── DropDownListOpenButtonSkin.exml │ │ │ ├── DropDownListSkin.exml │ │ │ ├── HScrollBarSkin.exml │ │ │ ├── HScrollBarThumbSkin.exml │ │ │ ├── HSliderSkin.exml │ │ │ ├── HSliderThumbSkin.exml │ │ │ ├── ItemRendererSkin.exml │ │ │ ├── ListSkin.exml │ │ │ ├── PanelSkin.exml │ │ │ ├── ProgressBarSkin.exml │ │ │ ├── RadioButtonSkin.exml │ │ │ ├── ScrollerSkin.exml │ │ │ ├── SkinnableContainerSkin.exml │ │ │ ├── SkinnableDataContainer.exml │ │ │ ├── SliderThumbSkin.exml │ │ │ ├── TabBarButtonSkin.exml │ │ │ ├── TabBarSkin.exml │ │ │ ├── TextAreaSkin.exml │ │ │ ├── TextInputSkin.exml │ │ │ ├── TitleWindowSkin.exml │ │ │ ├── ToggleButtonSkin.exml │ │ │ ├── ToggleSwitchSkin.exml │ │ │ ├── TreeDisclosureButtonSkin.exml │ │ │ ├── TreeItemRendererSkin.exml │ │ │ ├── TreeSkin.exml │ │ │ ├── VScrollBarSkin.exml │ │ │ ├── VScrollBarThumbSkin.exml │ │ │ ├── VSliderSkin.exml │ │ │ └── VSliderThumbSkin.exml │ └── utils.ts ├── template │ └── runtime │ │ ├── native_loader.js │ │ ├── native_require.js │ │ └── runtime_loader.js └── wingProperties.json ├── libsrc ├── bin │ └── nest │ │ ├── nest.d.ts │ │ ├── nest.js │ │ └── nest.min.js ├── libs │ ├── CMGAME_SDK_EGRET.d.ts │ ├── EgretH5Sdk.d.ts │ ├── egret.d.ts │ └── game.d.ts ├── nest.json ├── package.json └── src │ ├── LogInOut.ts │ ├── Nest.ts │ ├── cm │ ├── CMGAME_SDK_EGRET.js │ └── NestForCM.ts │ ├── h5 │ └── NestForH5.ts │ ├── qqhall │ ├── NestForQQHall.ts │ └── NestForQQHallV2.ts │ ├── runtime │ └── NestForRuntime.ts │ └── utils │ ├── NestEntry.ts │ └── NestUtils.ts ├── login3.jpg ├── login4.jpg ├── loginAssets ├── QQ@3x.png ├── QQ微信登陆勾选@3x.png └── 微信@3x.png └── test ├── cm ├── cm.html └── entry.html ├── publishJson.html ├── qq └── entry.html └── runtime.html /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.zip 3 | libs/* 4 | bin-debug/* 5 | release/ 6 | runtime.json 7 | 8 | qq.html 9 | 10 | demo/bin-debug/* 11 | demo/libs/* 12 | 13 | demo2/bin-debug/* 14 | demo2/libs/* 15 | 16 | libsrc/bin/nest/test.html -------------------------------------------------------------------------------- /btns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/btns.png -------------------------------------------------------------------------------- /demo/egretProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "document_class": "Main", 3 | "modules": [ 4 | { 5 | "name": "egret" 6 | }, 7 | { 8 | "name": "game" 9 | }, 10 | { 11 | "name": "gui" 12 | }, 13 | { 14 | "name": "res" 15 | }, 16 | { 17 | "name": "nest", 18 | "path": "../libsrc" 19 | } 20 | ], 21 | "native": { 22 | "path_ignore": [] 23 | }, 24 | "egret_version": "2.5.5" 25 | } -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Egret Nest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 |
101 |
102 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /demo/resource/assets/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/bg.jpg -------------------------------------------------------------------------------- /demo/resource/assets/simple/CheckBox/checkbox-select_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/CheckBox/checkbox-select_disabled.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/CheckBox/checkbox-select_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/CheckBox/checkbox-select_normal.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/CheckBox/checkbox-select_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/CheckBox/checkbox-select_over.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/CheckBox/checkbox-unselect_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/CheckBox/checkbox-unselect_disabled.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/CheckBox/checkbox-unselect_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/CheckBox/checkbox-unselect_normal.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/CheckBox/checkbox-unselect_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/CheckBox/checkbox-unselect_over.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/DropdownList/DropDownListButtonSkin_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/DropdownList/DropDownListButtonSkin_down.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/DropdownList/DropDownListButtonSkin_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/DropdownList/DropDownListButtonSkin_up.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/DropdownList/dropdownlist_arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/DropdownList/dropdownlist_arrow_down.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/DropdownList/dropdownlist_arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/DropdownList/dropdownlist_arrow_up.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/HScrollBar/hscrollbtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/HScrollBar/hscrollbtn.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/HScrollBar/hscrolltrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/HScrollBar/hscrolltrack.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/HSlider/HSlider_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/HSlider/HSlider_fill.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/HSlider/HSlider_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/HSlider/HSlider_thumb.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/HSlider/HSlider_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/HSlider/HSlider_track.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ItemRenderer/app_list_item_cutlline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ItemRenderer/app_list_item_cutlline.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ItemRenderer/app_list_item_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ItemRenderer/app_list_item_select.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ItemRenderer/app_list_item_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ItemRenderer/app_list_item_up.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/NormalButton/button_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/NormalButton/button_disabled.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/NormalButton/button_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/NormalButton/button_down.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/NormalButton/button_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/NormalButton/button_normal.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ONOFFButton/onoffbutton_off_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ONOFFButton/onoffbutton_off_label.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ONOFFButton/onoffbutton_off_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ONOFFButton/onoffbutton_off_thumb.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ONOFFButton/onoffbutton_off_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ONOFFButton/onoffbutton_off_track.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ONOFFButton/onoffbutton_on_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ONOFFButton/onoffbutton_on_label.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ONOFFButton/onoffbutton_on_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ONOFFButton/onoffbutton_on_thumb.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ONOFFButton/onoffbutton_on_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ONOFFButton/onoffbutton_on_track.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Panel/Panel_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Panel/Panel_back.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Panel/Panel_headeBack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Panel/Panel_headeBack.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ProgressBar/Progressbar_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ProgressBar/Progressbar_fill.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ProgressBar/Progressbar_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ProgressBar/Progressbar_track.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/RadioButton/RadioButton_select_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/RadioButton/RadioButton_select_disabled.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/RadioButton/RadioButton_select_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/RadioButton/RadioButton_select_normal.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/RadioButton/RadioButton_select_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/RadioButton/RadioButton_select_over.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/RadioButton/RadioButton_unselect_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/RadioButton/RadioButton_unselect_disabled.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/RadioButton/RadioButton_unselect_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/RadioButton/RadioButton_unselect_normal.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/RadioButton/RadioButton_unselect_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/RadioButton/RadioButton_unselect_over.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/TabBar/Tab Bar_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/TabBar/Tab Bar_select.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/TextInput/textbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/TextInput/textbox.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/TitleWindow/closebtn_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/TitleWindow/closebtn_disabled.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/TitleWindow/closebtn_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/TitleWindow/closebtn_down.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/TitleWindow/closebtn_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/TitleWindow/closebtn_up.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ToggleButton/togglebutton_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ToggleButton/togglebutton_disabled.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ToggleButton/togglebutton_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ToggleButton/togglebutton_normal.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ToggleButton/togglebutton_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ToggleButton/togglebutton_over.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/ToggleButton/togglebutton_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/ToggleButton/togglebutton_selected.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_back.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_btnDisabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_btnDisabled.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_btnDisabledSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_btnDisabledSelect.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_btnDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_btnDown.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_btnDownSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_btnDownSelect.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_btnUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_btnUp.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_btnUpSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_btnUpSelect.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_icon_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_icon_dir.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/Tree/tree_icon_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/Tree/tree_icon_file.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/VScrollBar/vscrollbtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/VScrollBar/vscrollbtn.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/VScrollBar/vscrolltrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/VScrollBar/vscrolltrack.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/VSlider/VSlider_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/VSlider/VSlider_fill.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/VSlider/VSlider_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/VSlider/VSlider_thumb.png -------------------------------------------------------------------------------- /demo/resource/assets/simple/VSlider/VSlider_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo/resource/assets/simple/VSlider/VSlider_track.png -------------------------------------------------------------------------------- /demo/resource/config/description.json: -------------------------------------------------------------------------------- 1 | [ 2 | [ 3 | {"text" : "Open-source", "textColor":"0xF1C40F"}, 4 | {"text" : ",", "textColor":"0xFFFFFF"}, 5 | {"text" : "Free", "textColor":"0xF1C40F"}, 6 | {"text" : ",", "textColor":"0xFFFFFF"}, 7 | {"text" : "Multi-platform", "textColor":"0xF1C40F"} 8 | ], 9 | [ 10 | {"text" : "Push ", "textColor":"0xFFFFFF"}, 11 | {"text" : "Game ", "textColor":"0xF1C40F"}, 12 | {"text" : "Forward", "textColor":"0xFFFFFF"} 13 | ], 14 | [ 15 | {"text" : "HTML5 ", "textColor":"0xF1C40F"}, 16 | {"text" : "Game Engine", "textColor":"0xFFFFFF"} 17 | ] 18 | ] -------------------------------------------------------------------------------- /demo/resource/theme.thm: -------------------------------------------------------------------------------- 1 | { 2 | "skins": 3 | { 4 | "egret.gui.Alert":"skins.simple.AlertSkin", 5 | "egret.gui.Button":"skins.simple.ButtonSkin", 6 | "egret.gui.CheckBox":"skins.simple.CheckBoxSkin", 7 | "egret.gui.DropDownList":"skins.simple.DropDownListSkin", 8 | "egret.gui.HSlider":"skins.simple.HSliderSkin", 9 | "egret.gui.ItemRenderer":"skins.simple.ItemRendererSkin", 10 | "egret.gui.List":"skins.simple.ListSkin", 11 | "egret.gui.Panel":"skins.simple.PanelSkin", 12 | "egret.gui.ProgressBar":"skins.simple.ProgressBarSkin", 13 | "egret.gui.RadioButton":"skins.simple.RadioButtonSkin", 14 | "egret.gui.SkinnableContainer":"skins.simple.SkinnableContainerSkin", 15 | "egret.gui.SkinnableDataContainer":"skins.simple.SkinnableDataContainerSkin", 16 | "egret.gui.TabBar":"skins.simple.TabBarSkin", 17 | "egret.gui.TabBarButton":"skins.simple.TabBarButtonSkin", 18 | "egret.gui.Tree":"skins.simple.TreeSkin", 19 | "egret.gui.TreeItemRenderer":"skins.simple.TreeItemRendererSkin", 20 | "egret.gui.TitleWindow":"skins.simple.TitleWindowSkin", 21 | "egret.gui.ToggleButton":"skins.simple.ToggleButtonSkin", 22 | "egret.gui.ToggleSwitch":"skins.simple.ToggleSwitchSkin", 23 | "egret.gui.VSlider":"skins.simple.VSliderSkin", 24 | "egret.gui.Scroller":"skins.simple.ScrollerSkin", 25 | "egret.gui.HScrollBar":"skins.simple.HScrollBarSkin", 26 | "egret.gui.VScrollBar":"skins.simple.VScrollBarSkin", 27 | "egret.gui.TextInput":"skins.simple.TextInputSkin", 28 | "egret.gui.TextArea":"skins.simple.TextAreaSkin" 29 | } 30 | } -------------------------------------------------------------------------------- /demo/src/AssetAdapter.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | 30 | 31 | class AssetAdapter implements egret.gui.IAssetAdapter { 32 | 33 | /** 34 | * 解析素材 35 | * @method egret.gui.DefaultAssetAdapter#getAsset 36 | * @param source {any} 待解析的新素材标识符 37 | * @param compFunc {Function} 解析完成回调函数,示例:compFunc(content:any,source:any):void; 38 | * 回调参数content接受两种类型:DisplayObject或Texture。 39 | * @param thisObject {any} compFunc的this引用 40 | * @param oldContent any 旧的内容对象,传入值有可能为null。 41 | * 对于某些类型素材,例如MovieClip,可以重用传入的显示对象,只修改其数据再返回。 42 | */ 43 | public getAsset(source:any, compFunc:Function, thisObject:any, oldContent:any):void { 44 | 45 | function onGetRes(data:any):void { 46 | compFunc.call(thisObject, data, source); 47 | } 48 | 49 | var content:any = source; 50 | if (source.prototype) { 51 | content = new source(); 52 | } 53 | if (content instanceof egret.DisplayObject || content instanceof egret.Texture) { 54 | compFunc.call(thisObject, content, source); 55 | } 56 | else if (typeof(source) == "string") { 57 | if (RES.hasRes(source)) { 58 | RES.getResAsync(source, onGetRes, this); 59 | } 60 | else { 61 | RES.getResByUrl(source, onGetRes, this, RES.ResourceItem.TYPE_IMAGE); 62 | } 63 | } 64 | else { 65 | compFunc.call(thisObject, content, source); 66 | } 67 | } 68 | 69 | 70 | } -------------------------------------------------------------------------------- /demo/src/LoadingUI.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | 30 | class LoadingUI extends egret.Sprite { 31 | 32 | public constructor() { 33 | super(); 34 | this.createView(); 35 | } 36 | 37 | private textField:egret.TextField; 38 | 39 | private createView():void { 40 | this.textField = new egret.TextField(); 41 | this.addChild(this.textField); 42 | this.textField.y = 300; 43 | this.textField.width = 480; 44 | this.textField.height = 100; 45 | this.textField.textAlign = "center"; 46 | } 47 | 48 | public setProgress(current, total):void { 49 | this.textField.text = "Loading..." + current + "/" + total; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /demo/src/Main.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | 30 | class Main extends egret.DisplayObjectContainer { 31 | 32 | 33 | 34 | public constructor() { 35 | 36 | super(); 37 | this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this); 38 | } 39 | 40 | private onAddToStage(event:egret.Event) { 41 | this.removeEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this); 42 | 43 | 44 | egret.gui.mapClass("egret.gui.IAssetAdapter", AssetAdapter); 45 | egret.gui.Theme.load("resource/theme.thm"); 46 | 47 | RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this); 48 | RES.loadConfig("resource/resource.json", "resource/"); 49 | 50 | } 51 | 52 | /** 53 | * 配置文件加载完成,开始预加载preload资源组。 54 | * Loading of configuration file is complete, start to pre-load the preload resource group 55 | */ 56 | private onConfigComplete(event:RES.ResourceEvent):void { 57 | RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this); 58 | RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this); 59 | RES.loadGroup("preload"); 60 | } 61 | 62 | 63 | private onResourceLoadComplete(event:RES.ResourceEvent):void { 64 | if (event.groupName == "preload") { 65 | RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this); 66 | this.createGameScene(); 67 | } 68 | } 69 | 70 | /** 71 | * 创建游戏场景 72 | * Create a game scene 73 | */ 74 | private createGameScene():void { 75 | 76 | var uistage: egret.gui.UIStage = new egret.gui.UIStage(); 77 | this.addChild(uistage); 78 | 79 | uistage.addEventListener(GameEvent.LOGIN_SUCCESS,this.onLoginSuccess,this); 80 | 81 | 82 | utils.init(uistage); 83 | nest.core.startup({egretAppId:230}, function (){ 84 | utils.changeView(new LoginView()); 85 | }); 86 | } 87 | 88 | private onLoginSuccess(e:GameEvent):void{ 89 | utils.changeView(new GameView()); 90 | } 91 | } 92 | 93 | module utils { 94 | 95 | 96 | var _stage: egret.gui.UIStage; 97 | 98 | export function init(stage:egret.gui.UIStage){ 99 | _stage = stage; 100 | } 101 | 102 | export function changeView(view:egret.gui.UIComponent){ 103 | _stage.removeAllElements(); 104 | _stage.addElement(view); 105 | } 106 | } -------------------------------------------------------------------------------- /demo/src/components/GameEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class GameEvent extends egret.Event{ 7 | 8 | public static LOGIN_SUCCESS: string = "loginSuccess"; 9 | 10 | public constructor(type:string) { 11 | super(type,true); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /demo/src/components/GameView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class GameView extends egret.gui.SkinnableComponent{ 7 | 8 | 9 | public payButton: egret.gui.Button; 10 | 11 | public shareButton: egret.gui.Button; 12 | public logoutButton: egret.gui.Button; 13 | 14 | public constructor() { 15 | super(); 16 | this.skinName = skins.GameViewSkin; 17 | } 18 | 19 | public createChildren(){ 20 | super.createChildren(); 21 | 22 | this.payButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onPayButtonTapHandler,this); 23 | this.shareButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onShareButtonTapHandler,this); 24 | this.logoutButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onLogoutButtonTapHandler,this); 25 | } 26 | 27 | private onLogoutButtonTapHandler(e:egret.TouchEvent):void{ 28 | 29 | var loginInfo: nest.user.LoginInfo = {}; 30 | 31 | nest.user.logout(loginInfo, function (data) { 32 | alert(data); 33 | }); 34 | } 35 | 36 | private onPayButtonTapHandler(e:egret.TouchEvent):void{ 37 | 38 | var payInfo: nest.iap.PayInfo = { 39 | goodsId:"testpay2", 40 | goodsNumber:"1", 41 | serverId:"1", 42 | ext:"1" 43 | }; 44 | 45 | nest.iap.pay(payInfo,this.onPayHandler.bind(this)); 46 | } 47 | 48 | private onPayHandler(payInfo:nest.iap.PayCallbackInfo):void{ 49 | console.log(payInfo); 50 | } 51 | 52 | private onShareButtonTapHandler(e:egret.TouchEvent):void{ 53 | var self = this; 54 | nest.share.isSupport(function(supportData) { 55 | 56 | if (supportData.share){ 57 | var shareInfo: nest.share.ShareInfo = { 58 | title: "分享标题", 59 | description: "分享内容", 60 | img_title: "图片标题", 61 | img_url: "file:///sdcard/QQBrowser/", 62 | url: "分享URL" 63 | }; 64 | nest.share.share(shareInfo,this.onShareCompleteHandler.bind(self)); 65 | } 66 | 67 | }); 68 | } 69 | 70 | private onShareCompleteHandler(data:nest.share.ShareCallbackInfo){ 71 | if (data.result >= 0){ 72 | console.log("分享成功"); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /demo/src/components/LoginView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class LoginView extends egret.gui.SkinnableComponent { 7 | 8 | 9 | public info_txt:egret.gui.Label; 10 | 11 | public login_button:egret.gui.Button; 12 | 13 | public constructor() { 14 | super(); 15 | this.skinName = skins.LoginViewSkin; 16 | } 17 | 18 | 19 | public createChildren() { 20 | super.createChildren(); 21 | this.login_button.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchTapHandler, this); 22 | } 23 | 24 | private onTouchTapHandler(e:egret.TouchEvent):void { 25 | this.checkLogin(); 26 | } 27 | 28 | private checkLogin():void { 29 | this.info_txt.text = "正在检查是否已登录..."; 30 | // var loginInfo: nest.user.LoginInfo = {}; 31 | 32 | var loginInfo:any = {} 33 | 34 | 35 | nest.user.checkLogin(loginInfo, this.onCheckLoginCallback.bind(this)); 36 | } 37 | 38 | 39 | private onCheckLoginCallback(data:nest.user.LoginCallbackInfo):void { 40 | 41 | if (!data.token) { 42 | this.info_txt.text += "\n正在登录..."; 43 | var loginInfo:nest.user.LoginInfo = {}; 44 | nest.user.login(loginInfo, this.onLoginCallback.bind(this)); 45 | } 46 | else { 47 | this.onLoginCallback(data); 48 | } 49 | 50 | } 51 | 52 | private onLoginCallback(data:nest.user.LoginCallbackInfo):void { 53 | 54 | if (data.result == 0) { 55 | this.getUserInfo(data, this.onGetUserInfoCallback); 56 | } 57 | else { 58 | //登录失败 59 | this.info_txt.text += "\n正在获取用户信息..."; 60 | } 61 | 62 | } 63 | 64 | private onGetUserInfoCallback(data:any) { 65 | console.log(data); 66 | this.info_txt.text += "\n正在进入游戏..."; 67 | this.dispatchEvent(new GameEvent(GameEvent.LOGIN_SUCCESS)); 68 | } 69 | 70 | private getUserInfo(data:nest.user.LoginCallbackInfo, onGetUserInfoCallback:Function) { 71 | 72 | //为了保证安全性,这段代码请务必放在服务器端实现 73 | this.info_txt.text += "\n正在获取用户信息..."; 74 | var appId:number = 336; 75 | var appkey:string = "r83RydQxkjhjOsqFVs2OD"; 76 | var token = data.token; 77 | //注意,这里参数顺序请保持按字母顺序排列 78 | //签名生成规则可以参考文档:http://open.egret.com/Wiki?mid=2&cid=17 79 | var requestParams:any = { 80 | action: "user.getInfo", 81 | appId: appId, 82 | serverId: 1, 83 | time: Date.now(), 84 | token: token 85 | 86 | }; 87 | var signStr = ""; 88 | for (var key in requestParams) { 89 | signStr += key + "=" + requestParams[key]; 90 | } 91 | signStr += appkey; 92 | requestParams.sign = new md5().hex_md5(signStr); 93 | ; 94 | 95 | var urlLoader:egret.URLLoader = new egret.URLLoader(); 96 | var request:egret.URLRequest = new egret.URLRequest(); 97 | request.url = "http://api.egret-labs.org/v2/user/getInfo"; 98 | 99 | var variable:egret.URLVariables = new egret.URLVariables(); 100 | variable.variables = requestParams; 101 | request.data = variable; 102 | 103 | 104 | request.method = egret.URLRequestMethod.POST; 105 | urlLoader.load(request); 106 | urlLoader.addEventListener(egret.Event.COMPLETE, function (e:egret.Event) { 107 | var data = JSON.parse(urlLoader.data); 108 | onGetUserInfoCallback.call(this, data); 109 | }, this); 110 | 111 | 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /demo/src/skins/GameViewSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /demo/src/skins/LoginViewSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /demo/src/skins/simple/AlertSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo/src/skins/simple/ButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /demo/src/skins/simple/CheckBoxSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /demo/src/skins/simple/CloseButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 15 | -------------------------------------------------------------------------------- /demo/src/skins/simple/DropDownListItemRendererSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /demo/src/skins/simple/DropDownListOpenButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 14 | -------------------------------------------------------------------------------- /demo/src/skins/simple/DropDownListSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo/src/skins/simple/HScrollBarSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | -------------------------------------------------------------------------------- /demo/src/skins/simple/HScrollBarThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo/src/skins/simple/HSliderSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | 15 | -------------------------------------------------------------------------------- /demo/src/skins/simple/HSliderThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo/src/skins/simple/ItemRendererSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /demo/src/skins/simple/ListSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /demo/src/skins/simple/PanelSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /demo/src/skins/simple/ProgressBarSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /demo/src/skins/simple/RadioButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /demo/src/skins/simple/ScrollerSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /demo/src/skins/simple/SkinnableContainerSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/src/skins/simple/SkinnableDataContainer.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /demo/src/skins/simple/SliderThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo/src/skins/simple/TabBarButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 19 | -------------------------------------------------------------------------------- /demo/src/skins/simple/TabBarSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /demo/src/skins/simple/TextAreaSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /demo/src/skins/simple/TextInputSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 20 | -------------------------------------------------------------------------------- /demo/src/skins/simple/TitleWindowSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /demo/src/skins/simple/ToggleButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /demo/src/skins/simple/ToggleSwitchSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /demo/src/skins/simple/TreeDisclosureButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /demo/src/skins/simple/TreeItemRendererSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /demo/src/skins/simple/TreeSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /demo/src/skins/simple/VScrollBarSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | -------------------------------------------------------------------------------- /demo/src/skins/simple/VScrollBarThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo/src/skins/simple/VSliderSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | 15 | -------------------------------------------------------------------------------- /demo/src/skins/simple/VSliderThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo/template/runtime/native_loader.js: -------------------------------------------------------------------------------- 1 | require("launcher/native_require.js"); 2 | 3 | egret_native.egtMain = function () { 4 | egret_native.nativeType = "native"; 5 | 6 | egret_native.egretInit(); 7 | egret_native.egretStart(); 8 | }; 9 | -------------------------------------------------------------------------------- /demo/template/runtime/native_require.js: -------------------------------------------------------------------------------- 1 | 2 | var game_file_list = [ 3 | //以下为自动修改,请勿修改 4 | //----auto game_file_list start---- 5 | "libs/modules/egret/egret.js", 6 | "libs/modules/egret/egret.native.js", 7 | "libs/modules/game/game.js", 8 | "libs/modules/game/game.native.js", 9 | "libs/modules/gui/gui.js", 10 | "libs/modules/res/res.js", 11 | "libs/modules/nest/nest.js", 12 | "bin-debug/AssetAdapter.js", 13 | "bin-debug/LoadingUI.js", 14 | "bin-debug/MD5.js", 15 | "bin-debug/Main.js", 16 | "bin-debug/components/GameEvent.js", 17 | "bin-debug/components/GameView.js", 18 | "bin-debug/components/LoginView.js", 19 | "bin-debug/skins/GameViewSkin.g.js", 20 | "bin-debug/skins/LoginViewSkin.g.js", 21 | "bin-debug/skins/simple/AlertSkin.g.js", 22 | "bin-debug/skins/simple/ButtonSkin.g.js", 23 | "bin-debug/skins/simple/CheckBoxSkin.g.js", 24 | "bin-debug/skins/simple/CloseButtonSkin.g.js", 25 | "bin-debug/skins/simple/DropDownListItemRendererSkin.g.js", 26 | "bin-debug/skins/simple/DropDownListOpenButtonSkin.g.js", 27 | "bin-debug/skins/simple/DropDownListSkin.g.js", 28 | "bin-debug/skins/simple/HScrollBarSkin.g.js", 29 | "bin-debug/skins/simple/HScrollBarThumbSkin.g.js", 30 | "bin-debug/skins/simple/HSliderSkin.g.js", 31 | "bin-debug/skins/simple/HSliderThumbSkin.g.js", 32 | "bin-debug/skins/simple/ItemRendererSkin.g.js", 33 | "bin-debug/skins/simple/ListSkin.g.js", 34 | "bin-debug/skins/simple/PanelSkin.g.js", 35 | "bin-debug/skins/simple/ProgressBarSkin.g.js", 36 | "bin-debug/skins/simple/RadioButtonSkin.g.js", 37 | "bin-debug/skins/simple/ScrollerSkin.g.js", 38 | "bin-debug/skins/simple/SkinnableContainerSkin.g.js", 39 | "bin-debug/skins/simple/SkinnableDataContainer.g.js", 40 | "bin-debug/skins/simple/SliderThumbSkin.g.js", 41 | "bin-debug/skins/simple/TabBarButtonSkin.g.js", 42 | "bin-debug/skins/simple/TabBarSkin.g.js", 43 | "bin-debug/skins/simple/TextAreaSkin.g.js", 44 | "bin-debug/skins/simple/TextInputSkin.g.js", 45 | "bin-debug/skins/simple/TitleWindowSkin.g.js", 46 | "bin-debug/skins/simple/ToggleButtonSkin.g.js", 47 | "bin-debug/skins/simple/ToggleSwitchSkin.g.js", 48 | "bin-debug/skins/simple/TreeDisclosureButtonSkin.g.js", 49 | "bin-debug/skins/simple/TreeItemRendererSkin.g.js", 50 | "bin-debug/skins/simple/TreeSkin.g.js", 51 | "bin-debug/skins/simple/VScrollBarSkin.g.js", 52 | "bin-debug/skins/simple/VScrollBarThumbSkin.g.js", 53 | "bin-debug/skins/simple/VSliderSkin.g.js", 54 | "bin-debug/skins/simple/VSliderThumbSkin.g.js", 55 | //----auto game_file_list end---- 56 | ]; 57 | 58 | var window = {}; 59 | 60 | egret_native.setSearchPaths([""]); 61 | 62 | egret_native.requireFiles = function () { 63 | for (var key in game_file_list) { 64 | var src = game_file_list[key]; 65 | require(src); 66 | } 67 | }; 68 | 69 | egret_native.egretInit = function () { 70 | egret_native.requireFiles(); 71 | egret.TextField.default_fontFamily = "/system/fonts/DroidSansFallback.ttf"; 72 | //egret.dom为空实现 73 | egret.dom = {}; 74 | egret.dom.drawAsCanvas = function () { 75 | }; 76 | }; 77 | 78 | egret_native.egretStart = function () { 79 | var option = { 80 | //以下为自动修改,请勿修改 81 | //----auto option start---- 82 | entryClassName: "Main", 83 | frameRate: 60, 84 | scaleMode: "showAll", 85 | contentWidth: 480, 86 | contentHeight: 800, 87 | showPaintRect: false, 88 | showFPS: false, 89 | fpsStyles: "x:0,y:0,size:30", 90 | showLog: false, 91 | logFilter: "", 92 | maxTouches: 2, 93 | textureScaleFactor: 1 94 | //----auto option end---- 95 | }; 96 | 97 | egret.native.NativePlayer.option = option; 98 | egret.runEgret(); 99 | egret_native.Label.createLabel(egret.TextField.default_fontFamily, 20, "", 0); 100 | egret_native.EGTView.preSetOffScreenBufferEnable(true); 101 | }; -------------------------------------------------------------------------------- /demo/template/runtime/runtime_loader.js: -------------------------------------------------------------------------------- 1 | require("launcher/native_require.js"); 2 | 3 | egret_native.egtMain = function () { 4 | egret_native.nativeType = "runtime"; 5 | 6 | egret_native.egretInit(); 7 | egret_native.egretStart(); 8 | }; -------------------------------------------------------------------------------- /demo2/egretProperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "native": { 3 | "path_ignore": [] 4 | }, 5 | "publish": { 6 | "web": 0, 7 | "native": 1, 8 | "path": "../../demo_release/release/" 9 | }, 10 | "modules": [ 11 | { 12 | "name": "egret" 13 | }, 14 | { 15 | "name": "game" 16 | }, 17 | { 18 | "name": "gui" 19 | }, 20 | { 21 | "name": "res" 22 | }, 23 | { 24 | "name": "nest", 25 | "path": "../libsrc" 26 | } 27 | ], 28 | "egret_version": "3.0.6" 29 | } -------------------------------------------------------------------------------- /demo2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Egret Nest 6 | 7 | 8 | 9 | 10 | 11 | 12 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 |
116 |
117 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /demo2/resource/assets/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/bg.jpg -------------------------------------------------------------------------------- /demo2/resource/assets/nest/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/nest/default.png -------------------------------------------------------------------------------- /demo2/resource/assets/nest/qq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/nest/qq.png -------------------------------------------------------------------------------- /demo2/resource/assets/nest/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/nest/right.png -------------------------------------------------------------------------------- /demo2/resource/assets/nest/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/nest/wx.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/CheckBox/checkbox-select_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/CheckBox/checkbox-select_disabled.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/CheckBox/checkbox-select_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/CheckBox/checkbox-select_normal.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/CheckBox/checkbox-select_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/CheckBox/checkbox-select_over.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/CheckBox/checkbox-unselect_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/CheckBox/checkbox-unselect_disabled.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/CheckBox/checkbox-unselect_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/CheckBox/checkbox-unselect_normal.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/CheckBox/checkbox-unselect_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/CheckBox/checkbox-unselect_over.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/DropdownList/DropDownListButtonSkin_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/DropdownList/DropDownListButtonSkin_down.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/DropdownList/DropDownListButtonSkin_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/DropdownList/DropDownListButtonSkin_up.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/DropdownList/dropdownlist_arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/DropdownList/dropdownlist_arrow_down.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/DropdownList/dropdownlist_arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/DropdownList/dropdownlist_arrow_up.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/HScrollBar/hscrollbtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/HScrollBar/hscrollbtn.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/HScrollBar/hscrolltrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/HScrollBar/hscrolltrack.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/HSlider/HSlider_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/HSlider/HSlider_fill.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/HSlider/HSlider_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/HSlider/HSlider_thumb.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/HSlider/HSlider_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/HSlider/HSlider_track.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ItemRenderer/app_list_item_cutlline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ItemRenderer/app_list_item_cutlline.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ItemRenderer/app_list_item_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ItemRenderer/app_list_item_select.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ItemRenderer/app_list_item_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ItemRenderer/app_list_item_up.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/NormalButton/button_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/NormalButton/button_disabled.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/NormalButton/button_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/NormalButton/button_down.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/NormalButton/button_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/NormalButton/button_normal.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ONOFFButton/onoffbutton_off_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ONOFFButton/onoffbutton_off_label.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ONOFFButton/onoffbutton_off_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ONOFFButton/onoffbutton_off_thumb.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ONOFFButton/onoffbutton_off_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ONOFFButton/onoffbutton_off_track.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ONOFFButton/onoffbutton_on_label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ONOFFButton/onoffbutton_on_label.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ONOFFButton/onoffbutton_on_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ONOFFButton/onoffbutton_on_thumb.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ONOFFButton/onoffbutton_on_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ONOFFButton/onoffbutton_on_track.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Panel/Panel_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Panel/Panel_back.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Panel/Panel_headeBack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Panel/Panel_headeBack.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ProgressBar/Progressbar_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ProgressBar/Progressbar_fill.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ProgressBar/Progressbar_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ProgressBar/Progressbar_track.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/RadioButton/RadioButton_select_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/RadioButton/RadioButton_select_disabled.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/RadioButton/RadioButton_select_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/RadioButton/RadioButton_select_normal.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/RadioButton/RadioButton_select_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/RadioButton/RadioButton_select_over.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/RadioButton/RadioButton_unselect_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/RadioButton/RadioButton_unselect_disabled.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/RadioButton/RadioButton_unselect_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/RadioButton/RadioButton_unselect_normal.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/RadioButton/RadioButton_unselect_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/RadioButton/RadioButton_unselect_over.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/TabBar/Tab Bar_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/TabBar/Tab Bar_select.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/TextInput/textbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/TextInput/textbox.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/TitleWindow/closebtn_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/TitleWindow/closebtn_disabled.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/TitleWindow/closebtn_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/TitleWindow/closebtn_down.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/TitleWindow/closebtn_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/TitleWindow/closebtn_up.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ToggleButton/togglebutton_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ToggleButton/togglebutton_disabled.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ToggleButton/togglebutton_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ToggleButton/togglebutton_normal.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ToggleButton/togglebutton_over.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ToggleButton/togglebutton_over.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/ToggleButton/togglebutton_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/ToggleButton/togglebutton_selected.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_back.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_btnDisabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_btnDisabled.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_btnDisabledSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_btnDisabledSelect.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_btnDown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_btnDown.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_btnDownSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_btnDownSelect.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_btnUp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_btnUp.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_btnUpSelect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_btnUpSelect.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_icon_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_icon_dir.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/Tree/tree_icon_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/Tree/tree_icon_file.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/VScrollBar/vscrollbtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/VScrollBar/vscrollbtn.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/VScrollBar/vscrolltrack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/VScrollBar/vscrolltrack.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/VSlider/VSlider_fill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/VSlider/VSlider_fill.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/VSlider/VSlider_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/VSlider/VSlider_thumb.png -------------------------------------------------------------------------------- /demo2/resource/assets/simple/VSlider/VSlider_track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/demo2/resource/assets/simple/VSlider/VSlider_track.png -------------------------------------------------------------------------------- /demo2/resource/config/description.json: -------------------------------------------------------------------------------- 1 | [ 2 | [ 3 | {"text" : "Open-source", "textColor":"0xF1C40F"}, 4 | {"text" : ",", "textColor":"0xFFFFFF"}, 5 | {"text" : "Free", "textColor":"0xF1C40F"}, 6 | {"text" : ",", "textColor":"0xFFFFFF"}, 7 | {"text" : "Multi-platform", "textColor":"0xF1C40F"} 8 | ], 9 | [ 10 | {"text" : "Push ", "textColor":"0xFFFFFF"}, 11 | {"text" : "Game ", "textColor":"0xF1C40F"}, 12 | {"text" : "Forward", "textColor":"0xFFFFFF"} 13 | ], 14 | [ 15 | {"text" : "HTML5 ", "textColor":"0xF1C40F"}, 16 | {"text" : "Game Engine", "textColor":"0xFFFFFF"} 17 | ] 18 | ] -------------------------------------------------------------------------------- /demo2/resource/theme.thm: -------------------------------------------------------------------------------- 1 | { 2 | "skins":{ 3 | "egret.gui.Alert":"skins.simple.AlertSkin", 4 | "egret.gui.Button":"skins.simple.ButtonSkin", 5 | "egret.gui.CheckBox":"skins.simple.CheckBoxSkin", 6 | "egret.gui.DropDownList":"skins.simple.DropDownListSkin", 7 | "egret.gui.HScrollBar":"skins.simple.HScrollBarSkin", 8 | "egret.gui.HSlider":"skins.simple.HSliderSkin", 9 | "egret.gui.ItemRenderer":"skins.simple.ItemRendererSkin", 10 | "egret.gui.List":"skins.simple.ListSkin", 11 | "egret.gui.Panel":"skins.simple.PanelSkin", 12 | "egret.gui.ProgressBar":"skins.simple.ProgressBarSkin", 13 | "egret.gui.RadioButton":"skins.simple.RadioButtonSkin", 14 | "egret.gui.Scroller":"skins.simple.ScrollerSkin", 15 | "egret.gui.SkinnableContainer":"skins.simple.SkinnableContainerSkin", 16 | "egret.gui.SkinnableDataContainer":"skins.simple.SkinnableDataContainerSkin", 17 | "egret.gui.TabBar":"skins.simple.TabBarSkin", 18 | "egret.gui.TabBarButton":"skins.simple.TabBarButtonSkin", 19 | "egret.gui.TextArea":"skins.simple.TextAreaSkin", 20 | "egret.gui.TextInput":"skins.simple.TextInputSkin", 21 | "egret.gui.TitleWindow":"skins.simple.TitleWindowSkin", 22 | "egret.gui.ToggleButton":"skins.simple.ToggleButtonSkin", 23 | "egret.gui.ToggleSwitch":"skins.simple.ToggleSwitchSkin", 24 | "egret.gui.Tree":"skins.simple.TreeSkin", 25 | "egret.gui.TreeItemRenderer":"skins.simple.TreeItemRendererSkin", 26 | "egret.gui.VScrollBar":"skins.simple.VScrollBarSkin", 27 | "egret.gui.VSlider":"skins.simple.VSliderSkin" 28 | } 29 | } -------------------------------------------------------------------------------- /demo2/src/AssetAdapter.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | 30 | 31 | class AssetAdapter implements egret.gui.IAssetAdapter { 32 | 33 | /** 34 | * 解析素材 35 | * @method egret.gui.DefaultAssetAdapter#getAsset 36 | * @param source {any} 待解析的新素材标识符 37 | * @param compFunc {Function} 解析完成回调函数,示例:compFunc(content:any,source:any):void; 38 | * 回调参数content接受两种类型:DisplayObject或Texture。 39 | * @param thisObject {any} compFunc的this引用 40 | * @param oldContent any 旧的内容对象,传入值有可能为null。 41 | * 对于某些类型素材,例如MovieClip,可以重用传入的显示对象,只修改其数据再返回。 42 | */ 43 | public getAsset(source:any, compFunc:Function, thisObject:any, oldContent:any):void { 44 | 45 | function onGetRes(data:any):void { 46 | compFunc.call(thisObject, data, source); 47 | } 48 | 49 | var content:any = source; 50 | if (source.prototype) { 51 | content = new source(); 52 | } 53 | if (content instanceof egret.DisplayObject || content instanceof egret.Texture) { 54 | compFunc.call(thisObject, content, source); 55 | } 56 | else if (typeof(source) == "string") { 57 | if (RES.hasRes(source)) { 58 | RES.getResAsync(source, onGetRes, this); 59 | } 60 | else { 61 | RES.getResByUrl(source, onGetRes, this, RES.ResourceItem.TYPE_IMAGE); 62 | } 63 | } 64 | else { 65 | compFunc.call(thisObject, content, source); 66 | } 67 | } 68 | 69 | 70 | } -------------------------------------------------------------------------------- /demo2/src/LoadingUI.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | 30 | class LoadingUI extends egret.Sprite { 31 | 32 | public constructor() { 33 | super(); 34 | this.createView(); 35 | } 36 | 37 | private textField:egret.TextField; 38 | 39 | private createView():void { 40 | this.textField = new egret.TextField(); 41 | this.addChild(this.textField); 42 | this.textField.y = 300; 43 | this.textField.width = 480; 44 | this.textField.height = 100; 45 | this.textField.textAlign = "center"; 46 | } 47 | 48 | public setProgress(current, total):void { 49 | this.textField.text = "Loading..." + current + "/" + total; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /demo2/src/Login.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by yjtx on 15-10-19. 3 | */ 4 | 5 | class Login extends egret.EventDispatcher{ 6 | constructor() { 7 | super(); 8 | } 9 | 10 | login(data?:string|nest.user.LoginCallbackInfo):void { 11 | if (data == null || typeof data == "string") { 12 | var loginInfo: nest.user.LoginInfo = data ? {"loginType":data} : {}; 13 | egret.log("login start"); 14 | egret.log(JSON.stringify(loginInfo)); 15 | nest.user.login(loginInfo,this.onLoginCallback.bind(this)); 16 | } 17 | else { 18 | this.onLoginCallback(data); 19 | } 20 | } 21 | 22 | private onLoginCallback(data:nest.user.LoginCallbackInfo):void{ 23 | egret.log(JSON.stringify(data)); 24 | egret.log("login end"); 25 | if (data.result == 0){ 26 | //为了保证安全性,这段代码请务必放在服务器端实现 27 | utils.addLog("正在获取用户信息..."); 28 | this.getUserInfo(data, this.onGetUserInfoCallback); 29 | } 30 | else{ 31 | //登录失败 32 | utils.addLog("获取信息失败"); 33 | } 34 | } 35 | 36 | private getUserInfo(data:nest.user.LoginCallbackInfo,onGetUserInfoCallback:Function){ 37 | var appId: number = 336; 38 | var appkey: string = "r83RydQxkjhjOsqFVs2OD"; 39 | var token = data.token; 40 | var requestParams:any = { 41 | action: "user.getInfo", 42 | appId: appId, 43 | serverId: 1, 44 | time: Date.now(), 45 | token: token 46 | 47 | }; 48 | var signStr = ""; 49 | for (var key in requestParams){ 50 | signStr += key + "=" + requestParams[key]; 51 | } 52 | signStr += appkey; 53 | requestParams.sign = new md5().hex_md5(signStr);; 54 | 55 | var urlLoader: egret.URLLoader = new egret.URLLoader(); 56 | var request: egret.URLRequest = new egret.URLRequest(); 57 | request.url = "http://api.egret-labs.org/games/api.php"; 58 | 59 | var variable: egret.URLVariables = new egret.URLVariables(); 60 | variable.variables = requestParams; 61 | request.data = variable; 62 | 63 | request.method = egret.URLRequestMethod.POST; 64 | urlLoader.load(request); 65 | urlLoader.addEventListener(egret.Event.COMPLETE,function(e:egret.Event) { 66 | var data = JSON.parse(urlLoader.data); 67 | onGetUserInfoCallback.call(this,data); 68 | },this); 69 | } 70 | 71 | private onGetUserInfoCallback(data:any){ 72 | console.log(data); 73 | 74 | utils.addLog("\n正在进入游戏..."); 75 | utils.UIStage.dispatchEvent(new GameEvent(GameEvent.LOGIN_IN_SUCCESS)); 76 | } 77 | 78 | } -------------------------------------------------------------------------------- /demo2/src/Main.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | 30 | class Main extends egret.DisplayObjectContainer { 31 | 32 | 33 | 34 | public constructor() { 35 | 36 | super(); 37 | this.addEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this); 38 | } 39 | 40 | private onAddToStage(event:egret.Event) { 41 | this.removeEventListener(egret.Event.ADDED_TO_STAGE, this.onAddToStage, this); 42 | 43 | 44 | egret.gui.mapClass("egret.gui.IAssetAdapter", AssetAdapter); 45 | egret.gui.mapClass("egret.gui.IThemeAdapter", ThemeAdapter); 46 | 47 | RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this); 48 | RES.loadConfig("resource/resource.json", "resource/"); 49 | 50 | } 51 | 52 | /** 53 | * 配置文件加载完成,开始预加载preload资源组。 54 | * Loading of configuration file is complete, start to pre-load the preload resource group 55 | */ 56 | private onConfigComplete(event:RES.ResourceEvent):void { 57 | RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE, this.onConfigComplete, this); 58 | 59 | egret.gui.Theme.load("resource/theme.thm"); 60 | 61 | RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this); 62 | RES.loadGroup("preload"); 63 | } 64 | 65 | 66 | private onResourceLoadComplete(event:RES.ResourceEvent):void { 67 | if (event.groupName == "preload") { 68 | RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete, this); 69 | this.createGameScene(); 70 | } 71 | } 72 | 73 | /** 74 | * 创建游戏场景 75 | * Create a game scene 76 | */ 77 | private createGameScene():void { 78 | var uistage: egret.gui.UIStage = new egret.gui.UIStage(); 79 | this.addChild(uistage); 80 | 81 | uistage.addEventListener(GameEvent.LOGIN_IN_SUCCESS,this.onLoginInSuccess,this); 82 | uistage.addEventListener(GameEvent.LOGIN_OUT_SUCCESS,this.onLoginOutSuccess,this); 83 | 84 | utils.init(uistage); 85 | 86 | utils.changeView(new LoginView()); 87 | 88 | } 89 | 90 | private onLoginInSuccess(e:GameEvent):void{ 91 | utils.changeView(new GameView()); 92 | } 93 | private onLoginOutSuccess(e:GameEvent):void{ 94 | utils.changeView(new LoginView()); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /demo2/src/QuickTest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by yjtx on 15-10-16. 3 | */ 4 | 5 | class QuickTest { 6 | 7 | private logStr = ""; 8 | 9 | private text:egret.gui.Label; 10 | 11 | init(text:egret.gui.Label):void { 12 | this.text = text; 13 | } 14 | 15 | start():void { 16 | 17 | if (window && window.location && window.location.href) { 18 | this.addLog("href:" + window.location.href); 19 | } 20 | 21 | var self = this; 22 | nest.easyuser.startup({ 23 | egretAppId: 88888, 24 | version: 2, 25 | debug: true 26 | }, function (resultInfo:nest.core.ResultCallbackInfo) { 27 | if (resultInfo.result == 0) { 28 | self.checkLogin(); 29 | } 30 | }); 31 | } 32 | 33 | private addLog(msg:string):void { 34 | this.logStr = msg + "\n\n" + this.logStr; 35 | 36 | this.text.text = this.logStr; 37 | } 38 | 39 | private checkLogin():void { 40 | var self = this; 41 | 42 | self.addLog("checkLogin start"); 43 | 44 | var loginTypes:Array = nest.easyuser.getLoginTypes(); 45 | if (loginTypes.length) { 46 | utils.changeView(new LoginTypeView(loginTypes, function (logType:nest.easyuser.ILoginType):void { 47 | nest.easyuser.login(logType, function (data:nest.user.LoginCallbackInfo) { 48 | if (data.result == 0) { 49 | egret.log("log Success"); 50 | 51 | self.logData = data; 52 | 53 | self.getInfo(); 54 | } 55 | else { 56 | egret.log("log Fail"); 57 | } 58 | }); 59 | })); 60 | } 61 | else { 62 | nest.easyuser.login({}, function (data:nest.user.LoginCallbackInfo) { 63 | if (data.result == 0) { 64 | egret.log("log Success"); 65 | 66 | self.logData = data; 67 | 68 | self.getInfo(); 69 | } 70 | else { 71 | egret.log("log Fail"); 72 | } 73 | }); 74 | } 75 | 76 | } 77 | 78 | private logData:nest.user.LoginCallbackInfo; 79 | 80 | private getInfo() { 81 | 82 | this.addLog("getInfo start"); 83 | 84 | //为了保证安全性,这段代码请务必放在服务器端实现 85 | var appId:number = 336; 86 | var appkey:string = "r83RydQxkjhjOsqFVs2OD"; 87 | var token = this.logData.token; 88 | var requestParams:any = { 89 | action: "user.getInfo", 90 | appId: appId, 91 | serverId: 1, 92 | time: Date.now(), 93 | token: token 94 | }; 95 | var signStr = ""; 96 | for (var key in requestParams) { 97 | signStr += key + "=" + requestParams[key]; 98 | } 99 | signStr += appkey; 100 | requestParams.sign = new md5().hex_md5(signStr); 101 | 102 | var urlLoader:egret.URLLoader = new egret.URLLoader(); 103 | var request:egret.URLRequest = new egret.URLRequest(); 104 | request.url = "http://api.egret-labs.org/games/api.php"; 105 | 106 | var variable:egret.URLVariables = new egret.URLVariables(); 107 | variable.variables = requestParams; 108 | request.data = variable; 109 | 110 | request.method = egret.URLRequestMethod.POST; 111 | urlLoader.load(request); 112 | 113 | this.addLog("url: " + request.url); 114 | this.addLog("variables: " + JSON.stringify(requestParams)); 115 | this.addLog("method: " + request.method); 116 | 117 | var self = this; 118 | urlLoader.addEventListener(egret.Event.COMPLETE, function (e:egret.Event) { 119 | var data = JSON.parse(urlLoader.data); 120 | 121 | self.addLog("response: " + JSON.stringify(data, null, 4)); 122 | self.addLog("getInfo end"); 123 | 124 | self.getInfoSuccessNext(); 125 | }, this); 126 | } 127 | 128 | private getInfoSuccessNext():void { 129 | this.payTrue(); 130 | } 131 | 132 | private payTrue():void { 133 | var self = this; 134 | this.addLog("payTrue start"); 135 | 136 | var payInfo:nest.iap.PayInfo = { 137 | goodsId: "testpay1", 138 | goodsNumber: "2", 139 | serverId: "1", 140 | ext: "1" 141 | }; 142 | 143 | this.addLog("request:" + JSON.stringify(payInfo, null, 4)); 144 | 145 | nest.iap.pay(payInfo, function (callInfo:{result:number}) { 146 | self.addLog("response:" + JSON.stringify(callInfo, null, 4)); 147 | self.addLog("payTrue end"); 148 | if (callInfo.result == 0) { 149 | self.payTrueSuccess(); 150 | } 151 | else { 152 | self.addLog("payTrue fail"); 153 | } 154 | }); 155 | } 156 | 157 | private payTrueSuccess():void { 158 | this.payFalse(); 159 | } 160 | 161 | private payFalse():void { 162 | var self = this; 163 | this.addLog("payFalse start"); 164 | 165 | var payInfo:nest.iap.PayInfo = { 166 | goodsId: "", 167 | goodsNumber: "2", 168 | serverId: "1", 169 | ext: "1" 170 | }; 171 | 172 | nest.iap.pay(payInfo, function (callInfo:nest.iap.PayCallbackInfo) { 173 | this.addLog("response:" + JSON.stringify(callInfo, null, 4)); 174 | this.addLog("payFalse end"); 175 | if (callInfo.result == 0) { 176 | self.payFalseSuccess(); 177 | } 178 | else { 179 | self.addLog("payTrue fail"); 180 | } 181 | }); 182 | } 183 | 184 | private payFalseSuccess():void { 185 | this.logout(); 186 | } 187 | 188 | private share():void { 189 | 190 | } 191 | 192 | private logout():void { 193 | this.addLog("logout start"); 194 | var loginInfo:nest.user.LoginInfo = {}; 195 | 196 | var self = this; 197 | nest.easyuser.logout(loginInfo, function (data) { 198 | this.addLog(JSON.stringify(data, null, 4)); 199 | this.addLog("logout end"); 200 | 201 | if (data["result"] == 0) { 202 | self.logoutSuccess(); 203 | } 204 | else { 205 | self.addLog("logout fail"); 206 | } 207 | }); 208 | } 209 | 210 | private logoutSuccess():void { 211 | this.loginAgain(); 212 | } 213 | 214 | private loginAgain():void { 215 | var self = this; 216 | self.addLog("loginAgin start"); 217 | nest.user.checkLogin({}, function (data:nest.user.LoginCallbackInfo) { 218 | self.addLog(JSON.stringify(data)); 219 | 220 | self.addLog("loginAgin end"); 221 | 222 | self.allSuccess(); 223 | 224 | }); 225 | } 226 | 227 | private allSuccess():void { 228 | this.addLog("allSuccess"); 229 | } 230 | } -------------------------------------------------------------------------------- /demo2/src/ThemeAdapter.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | 30 | 31 | class ThemeAdapter implements egret.gui.IThemeAdapter { 32 | 33 | /** 34 | * 解析主题 35 | * @param url 待解析的主题url 36 | * @param compFunc 解析完成回调函数,示例:compFunc(e:egret.Event):void; 37 | * @param errorFunc 解析失败回调函数,示例:errorFunc():void; 38 | * @param thisObject 回调的this引用 39 | */ 40 | public getTheme(url:string,compFunc:Function,errorFunc:Function,thisObject:any):void { 41 | function onGetRes(e:string):void { 42 | compFunc.call(thisObject, e); 43 | } 44 | function onError(e:RES.ResourceEvent):void { 45 | if(e.resItem.url == url) { 46 | RES.removeEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR, onError, null); 47 | errorFunc.call(thisObject); 48 | } 49 | } 50 | RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR, onError, null); 51 | RES.getResByUrl(url, onGetRes, this, RES.ResourceItem.TYPE_TEXT); 52 | } 53 | } -------------------------------------------------------------------------------- /demo2/src/components/GameEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class GameEvent extends egret.Event{ 7 | 8 | public static LOGIN_IN_SUCCESS: string = "loginInSuccess"; 9 | 10 | public static LOGIN_OUT_SUCCESS: string = "loginOutSuccess"; 11 | 12 | 13 | public constructor(type:string) { 14 | super(type,true); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /demo2/src/components/GameView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class GameView extends egret.gui.SkinnableComponent{ 7 | 8 | 9 | public shareButton: egret.gui.Button; 10 | public logoutButton: egret.gui.Button; 11 | 12 | num_txt:egret.gui.Label; 13 | 14 | public constructor() { 15 | super(); 16 | this.skinName = skins.GameViewSkin; 17 | } 18 | 19 | public createChildren(){ 20 | super.createChildren(); 21 | 22 | this.shareButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onShareButtonTapHandler,this); 23 | this.logoutButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onLogoutButtonTapHandler,this); 24 | } 25 | 26 | private onLogoutButtonTapHandler(e:egret.TouchEvent):void{ 27 | 28 | var loginInfo: nest.user.LoginInfo = {}; 29 | 30 | var self = this; 31 | egret.log("logout start"); 32 | nest.easyuser.logout(loginInfo, function (data) { 33 | egret.log(JSON.stringify(data)); 34 | egret.log("logout end"); 35 | if (data["result"] == 0) { 36 | self.dispatchEvent(new GameEvent(GameEvent.LOGIN_OUT_SUCCESS)); 37 | } 38 | else { 39 | alert("登出失败!"); 40 | } 41 | }); 42 | } 43 | 44 | private onShareButtonTapHandler(e:egret.TouchEvent):void{ 45 | var self = this; 46 | nest.share.isSupport(function(supportData) { 47 | 48 | if (supportData.share){ 49 | var shareInfo: nest.share.ShareInfo = { 50 | title: "分享标题", 51 | description: "分享内容", 52 | img_title: "图片标题", 53 | img_url: "file:///sdcard/QQBrowser/", 54 | url: "分享URL" 55 | }; 56 | nest.share.share(shareInfo,this.onShareCompleteHandler.bind(self)); 57 | } 58 | 59 | }); 60 | } 61 | 62 | private onShareCompleteHandler(data:nest.share.ShareCallbackInfo){ 63 | if (data.result >= 0){ 64 | console.log("分享成功"); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /demo2/src/components/LoginButtonView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class LoginButtonView extends egret.gui.SkinnableComponent{ 7 | 8 | icon_group:egret.gui.Group; 9 | right_ui:egret.gui.UIAsset; 10 | name_txt:egret.gui.Label; 11 | 12 | private type:string; 13 | private url:string; 14 | 15 | public constructor(type:string, url:string) { 16 | super(); 17 | this.skinName = skins.LoginButtonSkin; 18 | 19 | this.type = type; 20 | this.url = url; 21 | } 22 | 23 | public childrenCreated(){ 24 | super.childrenCreated(); 25 | 26 | var ui:egret.gui.UIAsset = new egret.gui.UIAsset(); 27 | ui.source = this.type + "_png"; 28 | this.icon_group.addElementAt(ui, 0); 29 | 30 | if (this.url && this.url != "") { 31 | this.right_ui.visible = true; 32 | 33 | var con:egret.DisplayObjectContainer = new egret.DisplayObjectContainer(); 34 | var shape:egret.Shape = new egret.Shape(); 35 | shape.graphics.beginFill(0xff0000); 36 | shape.graphics.drawCircle(100, 100, 100); 37 | shape.graphics.endFill(); 38 | con.addChild(shape); 39 | 40 | var bitmap:egret.Bitmap = new egret.Bitmap(); 41 | RES.getResByUrl(this.url, function (texture) { 42 | bitmap.texture = texture; 43 | bitmap.width = 200; 44 | bitmap.height = 200; 45 | }, this, RES.ResourceItem.TYPE_IMAGE); 46 | con.addChild(bitmap); 47 | bitmap.mask = shape; 48 | 49 | var icon:egret.gui.UIAsset = new egret.gui.UIAsset(); 50 | icon.source = con; 51 | this.icon_group.addElementAt(icon, 0); 52 | } 53 | else { 54 | 55 | this.right_ui.visible = false; 56 | } 57 | 58 | this.name_txt.text = this.getLabelName(this.type, this.url && this.url != ""); 59 | } 60 | 61 | private getLabelName(type:string, hasUrl:boolean):string { 62 | 63 | var str:string = ""; 64 | switch (type) { 65 | case "qq" : 66 | str = "qq"; 67 | break; 68 | case "wx" : 69 | str = "微信"; 70 | break; 71 | case "wb" : 72 | str = "微博"; 73 | break; 74 | default: 75 | str = "默认"; 76 | } 77 | 78 | if (hasUrl) { 79 | return str + "--" + "一键登录"; 80 | } 81 | 82 | return str + "登录"; 83 | } 84 | 85 | 86 | } 87 | -------------------------------------------------------------------------------- /demo2/src/components/LoginTypeView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class LoginTypeView extends egret.gui.SkinnableComponent { 7 | 8 | 9 | public btnGroup:egret.gui.Group; 10 | 11 | private loginTypes:Array; 12 | 13 | private onChoose:(logType:nest.easyuser.ILoginType)=>void; 14 | 15 | public constructor(loginTypes:Array, onChoose:(logType:nest.easyuser.ILoginType)=>void) { 16 | super(); 17 | 18 | this.loginTypes = loginTypes; 19 | this.onChoose = onChoose; 20 | this.skinName = skins.LoginTypeViewSkin; 21 | } 22 | 23 | public childrenCreated() { 24 | super.childrenCreated(); 25 | 26 | var self = this; 27 | 28 | for (var i:number = 0; i < this.loginTypes.length; i++) { 29 | var logT:nest.easyuser.ILoginType = this.loginTypes[i]; 30 | 31 | var url = ""; 32 | if (logT.accInfo && logT.accInfo.avatarUrl) { 33 | url = logT.accInfo.avatarUrl; 34 | } 35 | var btn:LoginButtonView = new LoginButtonView(logT.loginType, url); 36 | btn.name = i + ""; 37 | this.btnGroup.addElement(btn); 38 | btn.scaleX = btn.scaleY = 0.5; 39 | 40 | btn.touchEnabled = true; 41 | btn.addEventListener(egret.TouchEvent.TOUCH_TAP, function (e:egret.TouchEvent) { 42 | this.onChoose(this.loginTypes[parseInt(e.currentTarget.name)]); 43 | }, this); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /demo2/src/components/LoginView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class LoginView extends egret.gui.SkinnableComponent{ 7 | 8 | 9 | public info_txt: egret.gui.Label; 10 | 11 | public login_button: egret.gui.Button; 12 | quickTest_btn: egret.gui.Button; 13 | public constructor() { 14 | super(); 15 | this.skinName = skins.LoginViewSkin; 16 | } 17 | 18 | 19 | public createChildren(){ 20 | super.createChildren(); 21 | //this.login_button.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onTouchTapHandler,this); 22 | //this.quickTest_btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onQuickTestHandler,this); 23 | 24 | this.onTouchTapHandler(null); 25 | } 26 | 27 | private onQuickTestHandler(e:egret.TouchEvent):void { 28 | utils.changeView(new QuickTestView()); 29 | } 30 | 31 | private onTouchTapHandler(e:egret.TouchEvent):void{ 32 | 33 | var self = this; 34 | nest.easyuser.startup({egretAppId : 88888, version : 2, debug:true}, function(resultInfo:nest.core.ResultCallbackInfo) { 35 | if (resultInfo.result == 0) { 36 | self.login(); 37 | } 38 | }); 39 | } 40 | 41 | private login():void{ 42 | egret.log("login start"); 43 | 44 | var loginTypes:Array = nest.easyuser.getLoginTypes(); 45 | 46 | if (loginTypes.length) {//需要显示对应的登录按钮 47 | var typeInfo:nest.easyuser.ILoginType = loginTypes[0]; 48 | if (loginTypes.length == 1 && (typeInfo.loginType == "wx" || typeInfo.loginType == "qq")) { 49 | nest.easyuser.login(typeInfo, function (data:nest.user.LoginCallbackInfo) { 50 | if (data.result == 0) { 51 | egret.log("log Success"); 52 | new Login().login(data); 53 | } 54 | else { 55 | egret.log("log Fail"); 56 | } 57 | }); 58 | } 59 | else { 60 | var loginView:LoginTypeView = new LoginTypeView(loginTypes, function (logType:nest.easyuser.ILoginType) { 61 | nest.easyuser.login(logType, function (data:nest.user.LoginCallbackInfo) { 62 | if (data.result == 0) { 63 | egret.log("log Success"); 64 | new Login().login(data); 65 | } 66 | else { 67 | egret.log("log Fail"); 68 | } 69 | }); 70 | }); 71 | 72 | utils.changeView(loginView); 73 | } 74 | } 75 | else {//不需要登录按钮,直接调用登录进游戏 76 | nest.easyuser.login({}, function (data:nest.user.LoginCallbackInfo) { 77 | if (data.result == 0) { 78 | egret.log("log Success"); 79 | new Login().login(data); 80 | } 81 | else { 82 | egret.log("log Fail"); 83 | } 84 | }); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /demo2/src/components/PayItemView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class PayItemView extends egret.gui.ItemRenderer { 7 | 8 | payButton: egret.gui.Button; 9 | 10 | number_txt: egret.gui.TextInput; 11 | 12 | name_txt: egret.gui.Label; 13 | 14 | public constructor() { 15 | super(); 16 | this.skinName = skins.PayItemSkin; 17 | } 18 | 19 | 20 | public createChildren() { 21 | super.createChildren(); 22 | 23 | this.payButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onPayButtonTapHandler,this); 24 | } 25 | 26 | dataChanged():void { 27 | super.dataChanged(); 28 | 29 | this.name_txt.text = this.data["name"]; 30 | } 31 | 32 | private onPayButtonTapHandler(e:egret.TouchEvent):void{ 33 | var num: number = !isNaN(parseInt(this.number_txt.text)) ? parseInt(this.number_txt.text) : 1; 34 | 35 | var payInfo: nest.iap.PayInfo = { 36 | goodsId:this.data["name"], 37 | goodsNumber:num.toString(), 38 | serverId:"1", 39 | ext:"1" 40 | }; 41 | 42 | console.log(payInfo); 43 | 44 | nest.iap.pay(payInfo,this.onPayHandler.bind(this)); 45 | } 46 | 47 | private onPayHandler(payInfo:nest.iap.PayCallbackInfo):void{ 48 | console.log(payInfo); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /demo2/src/components/PayView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class PayView extends egret.gui.SkinnableComponent { 7 | 8 | list: egret.gui.List; 9 | public payButton: egret.gui.Button; 10 | 11 | public constructor() { 12 | super(); 13 | this.skinName = skins.PayViewSkin; 14 | } 15 | 16 | 17 | public createChildren() { 18 | super.createChildren(); 19 | 20 | var dp = []; 21 | for (var i:number = 1; i < 10; i++) 22 | { 23 | dp.push({label:"item"+i, name: "testpay" + i}); 24 | } 25 | this.list.dataProvider = new egret.gui.ArrayCollection(dp); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /demo2/src/components/QuickTestView.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 3 | * @author 4 | * 5 | */ 6 | class QuickTestView extends egret.gui.SkinnableComponent { 7 | 8 | public log_txt: egret.gui.Label; 9 | private test: QuickTest; 10 | public constructor() { 11 | super(); 12 | this.skinName = skins.QuickTestSkin; 13 | } 14 | 15 | public createChildren(){ 16 | super.createChildren(); 17 | 18 | this.log_txt.height = NaN; 19 | 20 | this.test = new QuickTest(); 21 | this.test.init(this.log_txt); 22 | this.test.start(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /demo2/src/skins/ButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /demo2/src/skins/GameViewSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /demo2/src/skins/LoginButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /demo2/src/skins/LoginTypeViewSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /demo2/src/skins/LoginViewSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /demo2/src/skins/PayItemSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /demo2/src/skins/PayViewSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /demo2/src/skins/QuickTestSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/AlertSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/ButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/CheckBoxSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 27 | 28 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/CloseButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 15 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/DropDownListItemRendererSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/DropDownListOpenButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 14 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/DropDownListSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/HScrollBarSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/HScrollBarThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/HSliderSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | 15 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/HSliderThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/ItemRendererSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/ListSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/PanelSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/ProgressBarSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/RadioButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/ScrollerSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/SkinnableContainerSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/SkinnableDataContainer.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/SliderThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/TabBarButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 19 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/TabBarSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/TextAreaSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/TextInputSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 17 | 20 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/TitleWindowSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/ToggleButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 20 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/ToggleSwitchSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/TreeDisclosureButtonSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/TreeItemRendererSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/TreeSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/VScrollBarSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/VScrollBarThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/VSliderSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 13 | 15 | -------------------------------------------------------------------------------- /demo2/src/skins/simple/VSliderThumbSkin.exml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /demo2/src/utils.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by yjtx on 15-10-19. 3 | */ 4 | module utils { 5 | export var UIStage: egret.gui.UIStage; 6 | 7 | export function init(stage:egret.gui.UIStage){ 8 | UIStage = stage; 9 | 10 | UIStage.addEventListener(GameEvent.LOGIN_IN_SUCCESS, onLoginInSuccess, this); 11 | UIStage.addEventListener(GameEvent.LOGIN_OUT_SUCCESS, onLoginOutSuccess, this); 12 | } 13 | 14 | export function changeView(view:egret.gui.UIComponent){ 15 | UIStage.removeAllElements(); 16 | UIStage.addElement(view); 17 | } 18 | 19 | export function addLog(msg:string):void { 20 | 21 | } 22 | 23 | function onLoginInSuccess(e:GameEvent):void { 24 | changeView(new GameView()); 25 | } 26 | 27 | function onLoginOutSuccess(e:GameEvent):void { 28 | changeView(new LoginView()); 29 | } 30 | } -------------------------------------------------------------------------------- /demo2/template/runtime/native_loader.js: -------------------------------------------------------------------------------- 1 | require("launcher/native_require.js"); 2 | 3 | egret_native.egtMain = function () { 4 | egret_native.nativeType = "native"; 5 | 6 | egret_native.egretInit(); 7 | egret_native.egretStart(); 8 | }; 9 | -------------------------------------------------------------------------------- /demo2/template/runtime/native_require.js: -------------------------------------------------------------------------------- 1 | 2 | var game_file_list = [ 3 | //以下为自动修改,请勿修改 4 | //----auto game_file_list start---- 5 | "libs/modules/egret/egret.js", 6 | "libs/modules/egret/egret.native.js", 7 | "libs/modules/game/game.js", 8 | "libs/modules/game/game.native.js", 9 | "libs/modules/gui/gui.js", 10 | "libs/modules/res/res.js", 11 | "libs/modules/nest/nest.js", 12 | "bin-debug/AssetAdapter.js", 13 | "bin-debug/LoadingUI.js", 14 | "bin-debug/Login.js", 15 | "bin-debug/MD5.js", 16 | "bin-debug/Main.js", 17 | "bin-debug/QuickTest.js", 18 | "bin-debug/ThemeAdapter.js", 19 | "bin-debug/components/GameEvent.js", 20 | "bin-debug/components/GameView.js", 21 | "bin-debug/components/LoginButtonView.js", 22 | "bin-debug/components/LoginTypeView.js", 23 | "bin-debug/components/LoginView.js", 24 | "bin-debug/components/PayItemView.js", 25 | "bin-debug/components/PayView.js", 26 | "bin-debug/components/QuickTestView.js", 27 | "bin-debug/skins/ButtonSkin.g.js", 28 | "bin-debug/skins/GameViewSkin.g.js", 29 | "bin-debug/skins/LoginButtonSkin.g.js", 30 | "bin-debug/skins/LoginTypeViewSkin.g.js", 31 | "bin-debug/skins/LoginViewSkin.g.js", 32 | "bin-debug/skins/PayItemSkin.g.js", 33 | "bin-debug/skins/PayViewSkin.g.js", 34 | "bin-debug/skins/QuickTestSkin.g.js", 35 | "bin-debug/skins/simple/AlertSkin.g.js", 36 | "bin-debug/skins/simple/ButtonSkin.g.js", 37 | "bin-debug/skins/simple/CheckBoxSkin.g.js", 38 | "bin-debug/skins/simple/CloseButtonSkin.g.js", 39 | "bin-debug/skins/simple/DropDownListItemRendererSkin.g.js", 40 | "bin-debug/skins/simple/DropDownListOpenButtonSkin.g.js", 41 | "bin-debug/skins/simple/DropDownListSkin.g.js", 42 | "bin-debug/skins/simple/HScrollBarSkin.g.js", 43 | "bin-debug/skins/simple/HScrollBarThumbSkin.g.js", 44 | "bin-debug/skins/simple/HSliderSkin.g.js", 45 | "bin-debug/skins/simple/HSliderThumbSkin.g.js", 46 | "bin-debug/skins/simple/ItemRendererSkin.g.js", 47 | "bin-debug/skins/simple/ListSkin.g.js", 48 | "bin-debug/skins/simple/PanelSkin.g.js", 49 | "bin-debug/skins/simple/ProgressBarSkin.g.js", 50 | "bin-debug/skins/simple/RadioButtonSkin.g.js", 51 | "bin-debug/skins/simple/ScrollerSkin.g.js", 52 | "bin-debug/skins/simple/SkinnableContainerSkin.g.js", 53 | "bin-debug/skins/simple/SkinnableDataContainer.g.js", 54 | "bin-debug/skins/simple/SliderThumbSkin.g.js", 55 | "bin-debug/skins/simple/TabBarButtonSkin.g.js", 56 | "bin-debug/skins/simple/TabBarSkin.g.js", 57 | "bin-debug/skins/simple/TextAreaSkin.g.js", 58 | "bin-debug/skins/simple/TextInputSkin.g.js", 59 | "bin-debug/skins/simple/TitleWindowSkin.g.js", 60 | "bin-debug/skins/simple/ToggleButtonSkin.g.js", 61 | "bin-debug/skins/simple/ToggleSwitchSkin.g.js", 62 | "bin-debug/skins/simple/TreeDisclosureButtonSkin.g.js", 63 | "bin-debug/skins/simple/TreeItemRendererSkin.g.js", 64 | "bin-debug/skins/simple/TreeSkin.g.js", 65 | "bin-debug/skins/simple/VScrollBarSkin.g.js", 66 | "bin-debug/skins/simple/VScrollBarThumbSkin.g.js", 67 | "bin-debug/skins/simple/VSliderSkin.g.js", 68 | "bin-debug/skins/simple/VSliderThumbSkin.g.js", 69 | "bin-debug/utils.js", 70 | //----auto game_file_list end---- 71 | ]; 72 | 73 | var window = {}; 74 | 75 | egret_native.setSearchPaths([""]); 76 | 77 | egret_native.requireFiles = function () { 78 | for (var key in game_file_list) { 79 | var src = game_file_list[key]; 80 | require(src); 81 | } 82 | }; 83 | 84 | egret_native.egretInit = function () { 85 | egret_native.requireFiles(); 86 | egret.TextField.default_fontFamily = "/system/fonts/DroidSansFallback.ttf"; 87 | //egret.dom为空实现 88 | egret.dom = {}; 89 | egret.dom.drawAsCanvas = function () { 90 | }; 91 | }; 92 | 93 | egret_native.egretStart = function () { 94 | var option = { 95 | //以下为自动修改,请勿修改 96 | //----auto option start---- 97 | entryClassName: "Main", 98 | frameRate: 60, 99 | scaleMode: "showAll", 100 | contentWidth: 480, 101 | contentHeight: 800, 102 | showPaintRect: false, 103 | showFPS: true, 104 | fpsStyles: "x:0,y:0,size:30", 105 | showLog: true, 106 | logFilter: "", 107 | maxTouches: 2, 108 | textureScaleFactor: 1 109 | //----auto option end---- 110 | }; 111 | 112 | egret.native.NativePlayer.option = option; 113 | egret.runEgret(); 114 | egret_native.Label.createLabel(egret.TextField.default_fontFamily, 20, "", 0); 115 | egret_native.EGTView.preSetOffScreenBufferEnable(true); 116 | }; -------------------------------------------------------------------------------- /demo2/template/runtime/runtime_loader.js: -------------------------------------------------------------------------------- 1 | require("launcher/native_require.js"); 2 | 3 | egret_native.egtMain = function () { 4 | egret_native.nativeType = "runtime"; 5 | 6 | egret_native.egretInit(); 7 | egret_native.egretStart(); 8 | }; -------------------------------------------------------------------------------- /libsrc/libs/CMGAME_SDK_EGRET.d.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * CMCM Game SDK - CMGAME_SDK_EGRET.d.ts 3 | * version: 2.0.2 4 | * Build: Tue Feb 16 2016 14:55:02 GMT+0800 (中国标准时间) 5 | * link: http://game.liebao.cn/game/cm_game_sdk/doc/ 6 | */ 7 | declare module CMGAME_SDK_EGRET { 8 | class ad { 9 | constructor(option:Object); 10 | show(option?:Object): void; 11 | static show(option:Object):void; 12 | } 13 | var client: { 14 | checkIsGameSDK(callback:Function): void; 15 | saveShortcutInfo(option:Object): void; 16 | pushIcon(option:Object): void; 17 | dispatchGameLoginData(option:Object, callback:Function):void; 18 | getGameSDKDeviceID():string; 19 | getGameSDKDeviceIDAsync(callback:Function):void; 20 | }; 21 | var pay: { 22 | on(eventName: String, callback: Function):void; 23 | off(eventName: String, callback: Function): void; 24 | purchase(option: Object): void; 25 | }; 26 | } 27 | declare var CMPAY_DEBUG: Boolean; 28 | declare var CMGAME_EGRET: { 29 | checkIsGameSDK(callback:Function): void; 30 | saveShortcutInfo(option:Object): void; 31 | pushIcon(option:Object): void; 32 | dispatchGameLoginData(option:Object, callback:Function):void; 33 | getGameSDKDeviceID():string; 34 | getGameSDKDeviceIDAsync(callback:Function):void; 35 | } 36 | declare var CMPAY_EGRET: { 37 | on(eventName: String, callback: Function):void; 38 | off(eventName: String, callback: Function): void; 39 | fire(eventName: String, ...args): void; 40 | isReady: Boolean; 41 | type: String; 42 | getVersion(); 43 | ready(callback: Function): void; 44 | purchase(option: Object): void; 45 | } -------------------------------------------------------------------------------- /libsrc/libs/EgretH5Sdk.d.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | declare class EgretH5Sdk 30 | { 31 | static checkLogin(fun:any, thisObj:any); 32 | static login(fun:any, thisObj:any, loginType?:string); 33 | static logout(fun:any, thisObj:any); 34 | static pay(para:any, fun:any, thisObj?:any); 35 | static attention(appId:any, id:any); 36 | static isOpenAttention(appId:any, id:any, callbackFun:Function, callbackFunClass:any); 37 | static getCustomInfo(appId:any, id:any, callbackFun?:Function, callbackFunClass?:any); 38 | 39 | static isOpenShare(appId:any, id:any, callbackFun:Function, callbackFunClass:any); 40 | static share(appId:any, id:any, shareTxt?:any, callbackFun?:Function, callbackFunClass?:any); 41 | 42 | //以下为v2版本新增接口 43 | static init(data:any, callbackFun:Function); 44 | static isSupportShare(data:any, callbackFun:Function); 45 | static isSupportAttention(data:any, callbackFun:Function); 46 | static setShareDefaultData(data:any, callbackFun:Function); 47 | static getLoginType(data:any, callbackFun:Function); 48 | 49 | static isSupportOpenBBS(data:any, callbackFun:Function); 50 | static openBBS(data:any, callbackFun:Function); 51 | static isSupportSendToDesktop(data:any, callbackFun:Function); 52 | static sendToDesktop(data:any, callbackFun:Function); 53 | } 54 | -------------------------------------------------------------------------------- /libsrc/nest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nest", 3 | "dependence": ["core"], 4 | "source":"./src", 5 | "file_list" : [ 6 | "utils/NestUtils.ts", 7 | "utils/NestEntry.ts", 8 | "cm/CMGAME_SDK_EGRET.js", 9 | "../libs/CMGAME_SDK_EGRET.d.ts", 10 | "Nest.ts", 11 | "LogInOut.ts", 12 | "runtime/NestForRuntime.ts", 13 | "cm/NestForCM.ts", 14 | "h5/NestForH5.ts", 15 | "../libs/EgretH5Sdk.d.ts", 16 | "qqhall/NestForQQHall.ts", 17 | "qqhall/NestForQQHallV2.ts" 18 | ] 19 | } -------------------------------------------------------------------------------- /libsrc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "egret", 3 | "version": "2.5.0", 4 | "modules": [ 5 | { 6 | "name": "nest", 7 | "description": "nest", 8 | "files": [ 9 | "Nest.ts", 10 | "LogInOut.ts", 11 | "utils/NestUtils.ts", 12 | "cm/CMGAME_SDK_EGRET.js", 13 | "runtime/NestForRuntime.ts", 14 | "cm/NestForCM.ts", 15 | "qqhall/NestForQQHall.ts", 16 | "qqhall/NestForQQHallV2.ts", 17 | "h5/NestForH5.ts", 18 | "utils/NestEntry.ts" 19 | ], 20 | "root": "src" 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /libsrc/src/utils/NestEntry.ts: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // Copyright (c) 2014-2015, Egret Technology Inc. 4 | // All rights reserved. 5 | // Redistribution and use in source and binary forms, with or without 6 | // modification, are permitted provided that the following conditions are met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above copyright 11 | // notice, this list of conditions and the following disclaimer in the 12 | // documentation and/or other materials provided with the distribution. 13 | // * Neither the name of the Egret nor the 14 | // names of its contributors may be used to endorse or promote products 15 | // derived from this software without specific prior written permission. 16 | // 17 | // THIS SOFTWARE IS PROVIDED BY EGRET AND CONTRIBUTORS "AS IS" AND ANY EXPRESS 18 | // OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | // IN NO EVENT SHALL EGRET AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;LOSS OF USE, DATA, 23 | // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | // 28 | ////////////////////////////////////////////////////////////////////////////////////// 29 | 30 | nest.core = nest.core || {}; 31 | //给一个默认空实现 32 | nest.core.addCallback = function (){}; 33 | nest.core.startup = function (info:nest.core.StartupInfo, callback:Function) { 34 | try { 35 | new egret.HashObject(); 36 | nest.utils.$EGRET_SUPPORT = true; 37 | } 38 | catch (e) { 39 | nest.utils.$EGRET_SUPPORT = false; 40 | } 41 | var api:string = "http://api.egret-labs.org/v2/"; 42 | nest.utils.$APP_ID = info.egretAppId; 43 | 44 | nest.utils.$DEBUG_LOG = info.debug; 45 | 46 | if (nest.utils.$isRuntime) { 47 | //qq渠道换为腾讯云 48 | if (nest.utils.$isQQBrowser() || nest.utils.$isTargetPlatform(10080) || nest.utils.$isTargetPlatform(10835) || nest.utils.$isTargetPlatform(20546)) { 49 | api = "http://api.gz.1251278653.clb.myqcloud.com/v2/"; 50 | } 51 | nest.utils.$API_DOMAIN = api; 52 | 53 | nest.core.callCustomMethod = nest.runtime.core.callCustomMethod; 54 | //猎豹 55 | if (nest.utils.$isTargetPlatform(10044) || (!nest.utils.$getOption("egret.runtime.nest"))) { 56 | egret_native["setOption"]("channelTag", "liebao"); 57 | CMPAY_DEBUG = false; 58 | var spid:number; 59 | if (nest.utils.$APP_ID == 85 || nest.utils.$APP_ID == 88) { 60 | spid = 10044; 61 | } 62 | else { 63 | spid = 18287; 64 | } 65 | egret_native["setOption"]("egret.runtime.spid", spid); 66 | nest.utils.$spid = spid; 67 | nest.utils.$changeMethod("cm"); 68 | } 69 | //qq大厅 70 | else if (nest.utils.$isTargetPlatform(10835) || nest.utils.$isTargetPlatform(20546)) { 71 | var spid:number; 72 | //古龙和萌战机用旧版API 73 | if(nest.utils.$APP_ID == 66 || nest.utils.$APP_ID == 86) { 74 | nest.qqhall.init(); 75 | nest.utils.$changeMethod("qqhall"); 76 | } 77 | else { 78 | nest.qqhall2.init(); 79 | nest.utils.$changeMethod("qqhall2"); 80 | } 81 | } 82 | else { 83 | nest.utils.$changeMethod("runtime"); 84 | } 85 | } 86 | //h5 87 | else { 88 | var domain = nest.utils.$getOption("egretServerDomain"); 89 | if(domain) { 90 | api = domain + "/"; 91 | } 92 | else { 93 | nest.utils.$API_DOMAIN = api; 94 | } 95 | var sdkDomain = nest.utils.$getOption("egretSdkDomain"); 96 | if(!sdkDomain) { 97 | sdkDomain = nest.utils.$API_DOMAIN; 98 | } 99 | if (info.version == 2) { 100 | //新版api 101 | nest.utils.$changeMethod("h5_2"); 102 | 103 | //加载h5sdk 104 | var url = sdkDomain + "/misc/scripts/egreth5sdk.js"; 105 | var s = document.createElement('script'); 106 | if (s.hasOwnProperty("async")) { 107 | s.async = false; 108 | } 109 | s.src = url; 110 | s.id = "egreth5sdk"; 111 | s.addEventListener('load', function f1() { 112 | this.removeEventListener('load', f1, false); 113 | EgretH5Sdk.init({}, callback); 114 | }, false); 115 | s.addEventListener('error', function f2() { 116 | s.parentNode.removeChild(s); 117 | this.removeEventListener('error', f2, false); 118 | callback({"result": -2}); 119 | }, false); 120 | document.head.appendChild(s); 121 | return; 122 | } 123 | else { 124 | //旧版api 125 | nest.utils.$changeMethod("h5"); 126 | } 127 | } 128 | 129 | callback({"result": 0}); 130 | }; -------------------------------------------------------------------------------- /login3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/login3.jpg -------------------------------------------------------------------------------- /login4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/login4.jpg -------------------------------------------------------------------------------- /loginAssets/QQ@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/loginAssets/QQ@3x.png -------------------------------------------------------------------------------- /loginAssets/QQ微信登陆勾选@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/loginAssets/QQ微信登陆勾选@3x.png -------------------------------------------------------------------------------- /loginAssets/微信@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/egret-labs/Nest/b8fe4d3e64f3596b8d8ff969937cd677ed1ad233/loginAssets/微信@3x.png -------------------------------------------------------------------------------- /test/cm/cm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 猎豹Nest测试 5 | 6 | 7 | 8 | 9 | 68 | 69 | -------------------------------------------------------------------------------- /test/cm/entry.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 猎豹Nest测试 5 | 6 | 7 | 19 | 20 | 21 | 22 | 49 | 50 | -------------------------------------------------------------------------------- /test/publishJson.html: -------------------------------------------------------------------------------- 1 | {"code_url":"http://10.0.11.177/Egret/Nest/release/android/yjtx2/game_code_yjtx2.zip","update_url":"http://10.0.11.177/Egret/Nest/release/android/yjtx2/"} -------------------------------------------------------------------------------- /test/qq/entry.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | QQ Nest测试 5 | 6 | 7 | 8 | 20 | 21 | 22 | 23 | 70 | 71 | -------------------------------------------------------------------------------- /test/runtime.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 猎豹Nest测试 5 | 6 | 7 | 19 | 20 | 21 | runtime地址: 22 | 游戏id: 23 | 横竖屏设置: 27 | 28 | 29 | 78 | 79 | --------------------------------------------------------------------------------