Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
xiaoxiaole
Commits
c62eac94
Commit
c62eac94
authored
Oct 08, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
15788746
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
128 additions
and
112 deletions
+128
-112
MainBase.ts
egret/libs/new_wx/MainBase.ts
+1
-1
default.thm.json
egret/resource/default.thm.json
+47
-47
ADSkin.exml
egret/resource/skins/ADSkin.exml
+13
-0
MapSkin.exml
egret/resource/skins/MapSkin.exml
+9
-1
TaskItemSkin.exml
egret/resource/skins/TaskItemSkin.exml
+2
-1
TaskSkin.exml
egret/resource/skins/TaskSkin.exml
+33
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+5
-1
ADPanel.ts
egret/src/panels/ADPanel.ts
+3
-15
TaskItemRenderer.ts
egret/src/panels/TaskItemRenderer.ts
+7
-32
TaskPanel.ts
egret/src/panels/TaskPanel.ts
+8
-13
No files found.
egret/libs/new_wx/MainBase.ts
View file @
c62eac94
...
...
@@ -40,8 +40,8 @@ import getHomeData, { BLOOD_NUMS_MAX } from "../../src/getHomeData";
import
BloodPanel2
from
"../../src/panels/BloodPanel2"
;
import
ExchangePanel
from
"../../src/panels/ExchangePanel"
;
import
{
initstatistics
}
from
"../../src/statistics"
;
import
TaskPanel
from
"../../src/panels/TaskItemRenderer"
;
import
ADPanel
from
"../../src/panels/ADPanel"
;
import
TaskPanel
from
"../../src/panels/TaskPanel"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
...
...
egret/resource/default.thm.json
View file @
c62eac94
{
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"resource/skins/AlertSkin.exml"
,
"resource/skins/Blood2Skin.exml"
,
"resource/skins/BloodSkin.exml"
,
"resource/skins/Box2Skin.exml"
,
"resource/skins/BoxSkin.exml"
,
"resource/skins/Buy1Skin.exml"
,
"resource/skins/Buy2Skin.exml"
,
"resource/skins/Buy3Skin.exml"
,
"resource/skins/ExchangeSkin.exml"
,
"resource/skins/FailSkin.exml"
,
"resource/skins/IconButtonSkin.exml"
,
"resource/skins/Main2Skin.exml"
,
"resource/skins/MapBottomSkin.exml"
,
"resource/skins/MapRepeatSkin.exml"
,
"resource/skins/MapSkin.exml"
,
"resource/skins/MapTopSkin.exml"
,
"resource/skins/NoPrizeSkin.exml"
,
"resource/skins/OptionItemSkin.exml"
,
"resource/skins/OptionsSkin.exml"
,
"resource/skins/PlaySkin.exml"
,
"resource/skins/Prize2Skin.exml"
,
"resource/skins/PrizeSkin.exml"
,
"resource/skins/QuitSkin.exml"
,
"resource/skins/RankItemSkin.exml"
,
"resource/skins/RankSkin.exml"
,
"resource/skins/ReliveSkin.exml"
,
"resource/skins/RuleSkin.exml"
,
"resource/skins/Share2Skin.exml"
,
"resource/skins/ShareSkin.exml"
,
"resource/skins/ShopSkin.exml"
,
"resource/skins/ShowOffSkin.exml"
,
"resource/skins/SignItemSkin.exml"
,
"resource/skins/SignPrizeSkin.exml"
,
"resource/skins/SignSkin.exml"
,
"resource/skins/StarSkin.exml"
,
"resource/skins/StartPanelSkin.exml"
,
"resource/skins/StartSkin.exml"
,
"resource/skins/TargetItemSkin.exml"
,
"resource/skins/TaskItemSkin.exml"
,
"resource/skins/TaskSkin.exml"
,
"resource/skins/ToastSkin.exml"
,
"resource/skins/VScrollBarSkin.exml"
],
"path"
:
"resource/default.thm.json"
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"resource/skins/AlertSkin.exml"
,
"resource/skins/Blood2Skin.exml"
,
"resource/skins/BloodSkin.exml"
,
"resource/skins/Box2Skin.exml"
,
"resource/skins/BoxSkin.exml"
,
"resource/skins/Buy1Skin.exml"
,
"resource/skins/Buy2Skin.exml"
,
"resource/skins/Buy3Skin.exml"
,
"resource/skins/ExchangeSkin.exml"
,
"resource/skins/FailSkin.exml"
,
"resource/skins/IconButtonSkin.exml"
,
"resource/skins/Main2Skin.exml"
,
"resource/skins/MapBottomSkin.exml"
,
"resource/skins/MapRepeatSkin.exml"
,
"resource/skins/MapSkin.exml"
,
"resource/skins/MapTopSkin.exml"
,
"resource/skins/NoPrizeSkin.exml"
,
"resource/skins/OptionItemSkin.exml"
,
"resource/skins/OptionsSkin.exml"
,
"resource/skins/PlaySkin.exml"
,
"resource/skins/Prize2Skin.exml"
,
"resource/skins/PrizeSkin.exml"
,
"resource/skins/QuitSkin.exml"
,
"resource/skins/RankItemSkin.exml"
,
"resource/skins/RankSkin.exml"
,
"resource/skins/ReliveSkin.exml"
,
"resource/skins/RuleSkin.exml"
,
"resource/skins/Share2Skin.exml"
,
"resource/skins/ShareSkin.exml"
,
"resource/skins/ShopSkin.exml"
,
"resource/skins/ShowOffSkin.exml"
,
"resource/skins/SignItemSkin.exml"
,
"resource/skins/SignPrizeSkin.exml"
,
"resource/skins/SignSkin.exml"
,
"resource/skins/StarSkin.exml"
,
"resource/skins/StartPanelSkin.exml"
,
"resource/skins/StartSkin.exml"
,
"resource/skins/TargetItemSkin.exml"
,
"resource/skins/TaskItemSkin.exml"
,
"resource/skins/TaskSkin.exml"
,
"resource/skins/ToastSkin.exml"
,
"resource/skins/VScrollBarSkin.exml"
],
"path"
:
"resource/default.thm.json"
}
\ No newline at end of file
egret/resource/skins/ADSkin.exml
0 → 100644
View file @
c62eac94
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"AddSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Image
source=
"闯关失败_png"
y=
"27"
horizontalCenter=
"0"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"609"
y=
"197"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Label
text=
"AD广告"
x=
"260"
y=
"604"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/MapSkin.exml
View file @
c62eac94
...
...
@@ -67,7 +67,15 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"taskBtn"
label=
""
x=
"31.7"
y=
"305.41"
visible=
"false"
>
<e:Button
id=
"taskBtn"
label=
""
x=
"31.7"
y=
"305.41"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"recordbtn_png"
source.down=
"recordbtn_png"
source.disabled=
"recordbtn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button
id=
"adBtn"
label=
""
x=
"44.3"
y=
"459.41"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"recordbtn_png"
source.down=
"recordbtn_png"
source.disabled=
"recordbtn_png"
/>
...
...
egret/resource/skins/TaskItemSkin.exml
View file @
c62eac94
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"TaskItemSkin"
width=
"400"
height=
"300"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Skin
class=
"TaskItemSkin"
width=
"400"
height=
"50"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Label
id=
"nameTxt"
text=
"111"
x=
"20"
y=
"16"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/TaskSkin.exml
View file @
c62eac94
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"TaskSkin"
width=
"400"
height=
"300"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Skin
class=
"TaskSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
source=
"闯关失败_png"
y=
"27"
horizontalCenter=
"0"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"609"
y=
"197"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
<e:Label
id=
"labelDisplay"
horizontalCenter=
"0"
verticalCenter=
"0"
/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Scroller
id=
"scroll"
width=
"400"
height=
"400"
y=
"279"
horizontalCenter=
"0"
scrollPolicyV=
"on"
scrollPolicyH=
"off"
>
<e:Group>
<e:List
id=
"list"
width=
"100%"
itemRendererSkinName=
"TaskItemSkin"
>
<e:ArrayCollection>
<e:Array>
<e:Object
a=
"taskname1"
/>
<e:Object
a=
"taskname2"
/>
<e:Object
a=
"taskname3"
/>
<e:Object
a=
"null"
/>
<e:Object
a=
"null"
/>
<e:Object
a=
"null"
/>
<e:Object
a=
"null"
/>
<e:Object
a=
"null"
/>
<e:Object
a=
"null"
/>
<e:Object
a=
"null"
/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:VerticalLayout
gap=
"0"
/>
</e:layout>
</e:List>
</e:Group>
</e:Scroller>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/MapScene.ts
View file @
c62eac94
...
...
@@ -308,7 +308,10 @@ export default class MapScene extends Scene {
this
[
'bloodTxt'
].
text
=
`
${
data
.
remainEnargy
}
`
;
}
onTap_taskBtn
(){
console
.
log
(
'onTap_taskBtn'
)
PanelCtrl
.
instance
.
show
(
'task'
);
}
onTap_adBtn
(){
PanelCtrl
.
instance
.
show
(
'ad'
);
}
onTap_signBtn
(){
NetManager
.
ins
.
getSignInfo
(()
=>
{
...
...
@@ -318,6 +321,7 @@ export default class MapScene extends Scene {
protected
initEvents
()
{
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this)
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_adBtn
,
this
)
this
[
'taskBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_taskBtn
,
this
)
this
[
'signBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_signBtn
,
this
)
this
[
'bloodBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_bloodBtn
,
this
)
...
...
egret/src/panels/ADPanel.ts
View file @
c62eac94
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
getHomeData
,
{
BLOOD_NUMS_MAX
}
from
"../getHomeData"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
{
iswx
}
from
"../iswx"
;
import
getShowOffPic
from
"../getShowOffPic"
;
import
getSharePic
,
{
getShareUrl
}
from
"../getSharePic"
;
import
CountDown
from
"../mapScene/CountDown"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
export
default
class
ADPanel
extends
Panel
{
start
(
data
)
{
...
...
@@ -23,15 +11,15 @@ export default class ADPanel extends Panel {
// NetManager.ins.showLog(getlogItem(4));
}
initEvents
()
{
super
.
initEvents
();
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapInvite
,
this
)
//
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
}
onTapInvite
()
{
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
get
skinKey
()
{
return
'
Task
'
}
get
skinKey
()
{
return
'
AD
'
}
}
\ No newline at end of file
egret/src/panels/TaskItemRenderer.ts
View file @
c62eac94
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
getHomeData
,
{
BLOOD_NUMS_MAX
}
from
"../getHomeData"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
{
iswx
}
from
"../iswx"
;
import
getShowOffPic
from
"../getShowOffPic"
;
import
getSharePic
,
{
getShareUrl
}
from
"../getSharePic"
;
import
CountDown
from
"../mapScene/CountDown"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
import
getSkinPath
from
"../../libs/new_wx/utils/getSkinPath"
;
export
default
class
Task
Panel
extends
Panel
{
start
(
data
)
{
super
.
start
();
this
.
s
howlog
(
);
export
default
class
Task
ItemRenderer
extends
eui
.
ItemRenderer
{
constructor
(
)
{
super
();
this
.
s
kinName
=
getSkinPath
(
'TaskItem'
);
}
showlog
(){
// NetManager.ins.showLog(getlogItem(3));
// NetManager.ins.showLog(getlogItem(4));
dataChanged
(){
this
[
'nameTxt'
].
text
=
this
.
data
+
''
;
}
initEvents
()
{
super
.
initEvents
();
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapInvite
,
this
)
}
onTapInvite
()
{
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
get
skinKey
()
{
return
'Task'
}
}
\ No newline at end of file
egret/src/panels/TaskPanel.ts
View file @
c62eac94
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
getHomeData
,
{
BLOOD_NUMS_MAX
}
from
"../getHomeData"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
getlogItem
}
from
"../Main"
;
import
wait
from
"../../libs/new_tc/wait"
;
import
{
showShare
}
from
"../shareCtrl"
;
import
{
iswx
}
from
"../iswx"
;
import
getShowOffPic
from
"../getShowOffPic"
;
import
getSharePic
,
{
getShareUrl
}
from
"../getSharePic"
;
import
CountDown
from
"../mapScene/CountDown"
;
import
{
updateMainTimer
}
from
"../../libs/new_wx/MainBase"
;
import
TaskItemRenderer
from
"./TaskItemRenderer"
;
export
default
class
TaskPanel
extends
Panel
{
public
list
:
eui
.
List
;
start
(
data
)
{
super
.
start
();
this
.
showlog
();
this
.
list
.
useVirtualLayout
=
false
;
this
.
list
.
itemRenderer
=
TaskItemRenderer
;
const
ac
=
new
eui
.
ArrayCollection
([
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
]);
this
.
list
.
dataProvider
=
ac
;
}
showlog
(){
...
...
@@ -26,7 +21,7 @@ export default class TaskPanel extends Panel {
initEvents
()
{
super
.
initEvents
();
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapInvite
,
this
)
//
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
}
onTapInvite
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment