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
Show 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";
...
@@ -40,8 +40,8 @@ import getHomeData, { BLOOD_NUMS_MAX } from "../../src/getHomeData";
import
BloodPanel2
from
"../../src/panels/BloodPanel2"
;
import
BloodPanel2
from
"../../src/panels/BloodPanel2"
;
import
ExchangePanel
from
"../../src/panels/ExchangePanel"
;
import
ExchangePanel
from
"../../src/panels/ExchangePanel"
;
import
{
initstatistics
}
from
"../../src/statistics"
;
import
{
initstatistics
}
from
"../../src/statistics"
;
import
TaskPanel
from
"../../src/panels/TaskItemRenderer"
;
import
ADPanel
from
"../../src/panels/ADPanel"
;
import
ADPanel
from
"../../src/panels/ADPanel"
;
import
TaskPanel
from
"../../src/panels/TaskPanel"
;
export
default
class
MainBase
extends
eui
.
UILayer
{
export
default
class
MainBase
extends
eui
.
UILayer
{
constructor
()
{
constructor
()
{
...
...
egret/resource/default.thm.json
View file @
c62eac94
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 @@
...
@@ -67,7 +67,15 @@
</e:Skin>
</e:Skin>
</e:skinName>
</e:skinName>
</e:Button>
</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:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"recordbtn_png"
source.down=
"recordbtn_png"
source.disabled=
"recordbtn_png"
/>
<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"?>
<?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>
</e:Skin>
\ No newline at end of file
egret/resource/skins/TaskSkin.exml
View file @
c62eac94
<?xml version="1.0" encoding="utf-8"?>
<?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>
</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 {
...
@@ -308,7 +308,10 @@ export default class MapScene extends Scene {
this
[
'bloodTxt'
].
text
=
`
${
data
.
remainEnargy
}
`
;
this
[
'bloodTxt'
].
text
=
`
${
data
.
remainEnargy
}
`
;
}
}
onTap_taskBtn
(){
onTap_taskBtn
(){
console
.
log
(
'onTap_taskBtn'
)
PanelCtrl
.
instance
.
show
(
'task'
);
}
onTap_adBtn
(){
PanelCtrl
.
instance
.
show
(
'ad'
);
}
}
onTap_signBtn
(){
onTap_signBtn
(){
NetManager
.
ins
.
getSignInfo
(()
=>
{
NetManager
.
ins
.
getSignInfo
(()
=>
{
...
@@ -318,6 +321,7 @@ export default class MapScene extends Scene {
...
@@ -318,6 +321,7 @@ export default class MapScene extends Scene {
protected
initEvents
()
{
protected
initEvents
()
{
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this)
// 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
[
'taskBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_taskBtn
,
this
)
this
[
'signBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_signBtn
,
this
)
this
[
'signBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_signBtn
,
this
)
this
[
'bloodBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_bloodBtn
,
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
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
{
export
default
class
ADPanel
extends
Panel
{
start
(
data
)
{
start
(
data
)
{
...
@@ -23,15 +11,15 @@ export default class ADPanel extends Panel {
...
@@ -23,15 +11,15 @@ export default class ADPanel extends Panel {
// NetManager.ins.showLog(getlogItem(4));
// NetManager.ins.showLog(getlogItem(4));
}
}
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapInvite
,
this
)
//
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
}
}
onTapInvite
()
{
onTapInvite
()
{
}
}
protected
get
closeBtns
():
eui
.
Button
[]
{
return
[
this
[
'closeBtn'
]]
}
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
getSkinPath
from
"../../libs/new_wx/utils/getSkinPath"
;
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
Task
Panel
extends
Panel
{
export
default
class
Task
ItemRenderer
extends
eui
.
ItemRenderer
{
start
(
data
)
{
constructor
(
)
{
super
.
start
();
super
();
this
.
s
howlog
(
);
this
.
s
kinName
=
getSkinPath
(
'TaskItem'
);
}
}
showlog
(){
dataChanged
(){
// NetManager.ins.showLog(getlogItem(3));
this
[
'nameTxt'
].
text
=
this
.
data
+
''
;
// NetManager.ins.showLog(getlogItem(4));
}
}
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
Panel
from
"../../libs/new_wx/components/Panel"
;
import
getHomeData
,
{
BLOOD_NUMS_MAX
}
from
"../getHomeData"
;
import
TaskItemRenderer
from
"./TaskItemRenderer"
;
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
TaskPanel
extends
Panel
{
export
default
class
TaskPanel
extends
Panel
{
public
list
:
eui
.
List
;
start
(
data
)
{
start
(
data
)
{
super
.
start
();
super
.
start
();
this
.
showlog
();
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
(){
showlog
(){
...
@@ -26,7 +21,7 @@ export default class TaskPanel extends Panel {
...
@@ -26,7 +21,7 @@ export default class TaskPanel extends Panel {
initEvents
()
{
initEvents
()
{
super
.
initEvents
();
super
.
initEvents
();
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTapInvite
,
this
)
//
this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
}
}
onTapInvite
()
{
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