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
70978553
Commit
70978553
authored
Oct 16, 2019
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
21e79a8e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
165 additions
and
48 deletions
+165
-48
exml.json
egret/.wing/exml.json
+1
-1
default.thm.json
egret/resource/default.thm.json
+1
-0
RankFriendListSkin.exml
egret/resource/skins/RankFriendListSkin.exml
+19
-0
StartPanelSkin.exml
egret/resource/skins/StartPanelSkin.exml
+18
-16
RankFriendList.ts
egret/src/mapScene/RankFriendList.ts
+46
-0
FriendItemRenderer.ts
egret/src/panels/FriendItemRenderer.ts
+1
-1
FriendPanel.ts
egret/src/panels/FriendPanel.ts
+1
-1
StartPanel.ts
egret/src/panels/StartPanel.ts
+4
-28
totalNumRank.json
mock/happyclear/totalNumRank.json
+74
-1
No files found.
egret/.wing/exml.json
View file @
70978553
...
...
@@ -8,7 +8,7 @@
"globalBackgroundHeight"
:
-1
,
"globalBackgroundColor"
:
"#c1c1c1"
,
"globalBackgroundImage"
:
""
,
"globalAutoLayerMarkEnable"
:
fals
e
"globalAutoLayerMarkEnable"
:
tru
e
},
"1667fb18fa6"
:
{
"bindingDataTestObj"
:
[
...
...
egret/resource/default.thm.json
View file @
70978553
...
...
@@ -2,6 +2,7 @@
"skins"
:
{},
"autoGenerateExmlsList"
:
true
,
"exmls"
:
[
"resource/skins/RankFriendListSkin.exml"
,
"resource/skins/ADSkin.exml"
,
"resource/skins/ADSmallSkin.exml"
,
"resource/skins/AlertSkin.exml"
,
...
...
egret/resource/skins/RankFriendListSkin.exml
0 → 100644
View file @
70978553
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"RankFriendListSkin"
width=
"582"
height=
"203"
xmlns:e=
"http://ns.egret.com/eui"
>
<e:Image
source=
"startpanel_bg2_png"
y=
"0"
x=
"0"
/>
<e:List
id=
"friendlist"
itemRendererSkinName=
"FriendItem2Skin"
y=
"48"
x=
"9"
>
<e:ArrayCollection>
<e:Array>
<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:HorizontalLayout/>
</e:layout>
</e:List>
<e:Label
id=
"empty"
text=
"该关卡没有好友通关"
y=
"97"
textColor=
"0xC33700"
size=
"26"
x=
"174"
/>
</e:Skin>
\ No newline at end of file
egret/resource/skins/StartPanelSkin.exml
View file @
70978553
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"StartPanelSkin"
width=
"750"
height=
"1206"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16cd285c715"
/>
<e:Image
source=
"startpanel_bg2_png"
y=
"925"
horizontalCenter=
"0"
/>
<e:Group
x=
"84"
y=
"925"
visible=
"false"
>
<e:Image
source=
"startpanel_bg2_png"
y=
"0"
x=
"0"
/>
<e:List
id=
"friendlist"
itemRendererSkinName=
"FriendItem2Skin"
y=
"48"
x=
"9"
>
<e:ArrayCollection>
<e:Array>
<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:HorizontalLayout/>
</e:layout>
</e:List>
<e:Label
id=
"empty"
text=
"该关卡没有好友通关"
y=
"97"
textColor=
"0xc33700"
size=
"26"
x=
"174"
/>
</e:Group>
<e:Image
y=
"52"
horizontalCenter=
"0"
source=
"startpanel通关条件_png"
/>
<e:Label
id=
"levelTxt"
text=
"第一关"
y=
"204"
horizontalCenter=
"0"
size=
"42"
/>
<e:Label
id=
"targetTxt"
text=
"在规定的步数内\n消除足够数量目标"
y=
"332"
width=
"444"
x=
"157"
textAlign=
"center"
lineSpacing=
"15"
verticalAlign=
"middle"
height=
"156"
anchorOffsetX=
"0"
textColor=
"0xa32020"
visible=
"false"
/>
...
...
@@ -61,19 +78,4 @@
</e:List>
<e:Label
id=
"tips"
text=
"在指定步数内消灭目标元素"
y=
"7"
size=
"23"
textColor=
"0x885037"
bold=
"true"
horizontalCenter=
"0"
/>
</e:Group>
<e:List
id=
"friendlist"
itemRendererSkinName=
"FriendItem2Skin"
horizontalCenter=
"0"
y=
"973"
visible=
"false"
>
<e:ArrayCollection>
<e:Array>
<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:HorizontalLayout/>
</e:layout>
</e:List>
<e:Label
id=
"empty"
text=
"该关卡没有好友通关"
y=
"1022"
horizontalCenter=
"0"
textColor=
"0xc33700"
size=
"26"
/>
</e:Skin>
\ No newline at end of file
egret/src/mapScene/RankFriendList.ts
0 → 100644
View file @
70978553
import
ComponentBase
from
"../../libs/new_wx/components/ComponentBase"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
FriendItem2Renderer
from
"../panels/FriendItem2Renderer"
;
export
default
class
RankFriendList
extends
ComponentBase
{
public
friendlist
:
eui
.
List
;
start
(
data
?)
{
this
.
friendlist
.
useVirtualLayout
=
false
;
this
.
friendlist
.
itemRenderer
=
FriendItem2Renderer
;
this
.
friendlist
.
visible
=
false
;
this
[
'empty'
].
visible
=
false
;
NetManager
.
ins
.
hc_levelNumRank
(()
=>
{
let
friends
=
DataManager
.
ins
.
getData
(
'hc_levelNumRank'
).
data
;
if
(
friends
==
null
)
friends
=
{
rank
:
[]
};
friends
=
friends
.
rank
;
if
(
friends
&&
friends
.
length
>
0
)
{
this
.
friendlist
.
visible
=
true
;
if
(
friends
.
length
>
5
)
friends
.
length
=
5
;
friends
.
forEach
((
ele
,
index
)
=>
{
ele
.
rank
=
index
+
1
;
});
const
ac
=
new
eui
.
ArrayCollection
(
friends
);
this
.
friendlist
.
dataProvider
=
ac
;
}
else
{
this
[
'empty'
].
visible
=
true
;
}
},
data
)
}
get
skinKey
():
string
{
return
'RankFriendList'
}
}
export
const
addRankFriendList
=
(
x
,
y
,
parent
:
egret
.
DisplayObjectContainer
)
=>
{
const
comp
=
new
RankFriendList
();
comp
.
loadSkin
();
comp
.
start
();
parent
.
addChildAt
(
comp
,
0
);
comp
.
x
=
x
;
comp
.
y
=
y
;
}
egret/src/panels/FriendItemRenderer.ts
View file @
70978553
...
...
@@ -24,7 +24,7 @@ export default class FriendItemRenderer extends eui.ItemRenderer {
this
[
'rankTxt'
].
visible
=
true
;
}
this
[
'nameTxt'
].
text
=
getNick
(
this
.
data
.
nickName
)
;
this
[
'nameTxt'
].
text
=
getNick
(
this
.
data
.
nickName
,
10
)
;
this
[
'avatar'
].
source
=
this
.
data
.
avatar
;
this
[
'star'
].
text
=
`X
${
this
.
data
.
stars
}
`
;
this
.
progress
.
textFlow
=
(
new
egret
.
HtmlTextParser
).
parser
(
...
...
egret/src/panels/FriendPanel.ts
View file @
70978553
...
...
@@ -63,7 +63,7 @@ export default class FriendPanel extends Panel {
const
{
data
}
=
DataManager
.
ins
.
getData
(
'hc_userInfo'
);
this
[
'avatar'
].
source
=
this
[
'avatar0'
].
source
=
data
.
avatar
;
this
[
'nameTxt'
].
text
=
getNick
(
data
.
nickname
);
this
[
'nameTxt'
].
text
=
getNick
(
data
.
nickname
,
10
);
this
[
'nameTxt0'
].
text
=
getNick
(
data
.
nickname
,
10
);
});
}
...
...
egret/src/panels/StartPanel.ts
View file @
70978553
...
...
@@ -16,41 +16,17 @@ import { showShare } from "../shareCtrl";
import
{
Chapters
}
from
"../something/Chapters"
;
import
{
ElementType
}
from
"../something/enum/ElementType"
;
import
{
PassType
}
from
"../something/enum/PassType"
;
import
FriendItem2Renderer
from
"./FriendItem2Renderer"
;
import
TargetItemRenderer
from
"./TargetItemRenderer"
;
import
{
DataManager
}
from
"../../libs/tw/manager/DataManager
"
;
import
{
addRankFriendList
}
from
"../mapScene/RankFriendList
"
;
export
default
class
StartPanel
extends
Panel
{
private
_level
;
private
list
:
eui
.
List
;
public
friendlist
:
eui
.
List
;
start
(
data
)
{
super
.
start
();
this
.
friendlist
.
useVirtualLayout
=
false
;
this
.
friendlist
.
itemRenderer
=
FriendItem2Renderer
;
this
.
friendlist
.
visible
=
false
;
this
[
'empty'
].
visible
=
false
;
NetManager
.
ins
.
hc_levelNumRank
(()
=>
{
let
friends
=
DataManager
.
ins
.
getData
(
'hc_levelNumRank'
).
data
;
if
(
friends
==
null
)
friends
=
{
rank
:
[]
};
friends
=
friends
.
rank
;
if
(
friends
&&
friends
.
length
>
0
)
{
this
.
friendlist
.
visible
=
true
;
if
(
friends
.
length
>
5
)
friends
.
length
=
5
;
friends
.
forEach
((
ele
,
index
)
=>
{
ele
.
rank
=
index
+
1
;
});
const
ac
=
new
eui
.
ArrayCollection
(
friends
);
this
.
friendlist
.
dataProvider
=
ac
;
}
else
{
this
[
'empty'
].
visible
=
true
;
}
},
data
)
addRankFriendList
(
84
,
925
,
this
);
setGlow
(
this
[
'levelTxt'
],
0xfa4b09
,
1
);
this
[
'levelTxt'
].
text
=
`第
${
data
}
关`
;
...
...
mock/happyclear/totalNumRank.json
View file @
70978553
{
"success"
:
true
,
"code"
:
"0000000000"
,
"desc"
:
"OK"
,
"timestamp"
:
1571055816178
,
"data"
:
null
}
\ No newline at end of file
{
"success"
:
true
,
"code"
:
null
,
"desc"
:
null
,
"timestamp"
:
1566199822308
,
"data"
:
{
"userRank"
:
{
"levelNum"
:
555
,
"nickName"
:
"奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
666
,
"maxScore"
:
1234567
,
"rank"
:
123
},
"rank"
:[
{
"levelNum"
:
11
,
"nickName"
:
"1奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
11
,
"maxScore"
:
111111
,
"rank"
:
1
},
{
"levelNum"
:
22
,
"nickName"
:
"2奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
22
,
"maxScore"
:
222222
,
"rank"
:
2
},
{
"levelNum"
:
33
,
"nickName"
:
"3奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
33
,
"maxScore"
:
33333
,
"rank"
:
3
},
{
"levelNum"
:
44
,
"nickName"
:
"3奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
44
,
"maxScore"
:
4444444
,
"rank"
:
4
},
{
"levelNum"
:
55
,
"nickName"
:
"3奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
55
,
"maxScore"
:
1234567
,
"rank"
:
5
},
{
"levelNum"
:
55
,
"nickName"
:
"3奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
55
,
"maxScore"
:
1234567
,
"rank"
:
5
},
{
"levelNum"
:
9999
,
"nickName"
:
"99奈何本人没文化,一句卧槽行天下"
,
"avatar"
:
"http://yun.dui88.com/images/201604/c6s5l4dgea.jpg"
,
"stars"
:
55
,
"maxScore"
:
1234567
,
"rank"
:
999
}
]
}
}
\ No newline at end of file
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