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
2ec6f4ed
Commit
2ec6f4ed
authored
Mar 16, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
fbebaffa
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
24 deletions
+45
-24
recharge_bg.png
egret/resource/assets/recharge/recharge_bg.png
+0
-0
recharge_btn_bg.png
egret/resource/assets/recharge/recharge_btn_bg.png
+0
-0
recharge_icon.png
egret/resource/assets/recharge/recharge_icon.png
+0
-0
default.res.json
egret/resource/default.res.json
+9
-8
RechargeSkin.exml
egret/resource/skins/RechargeSkin.exml
+13
-10
RechargePanel.ts
egret/src/panels/RechargePanel.ts
+8
-6
ShopPanel.ts
egret/src/panels/ShopPanel.ts
+15
-0
No files found.
egret/resource/assets/recharge/recharge_bg.png
View replaced file @
fbebaffa
View file @
2ec6f4ed
91.6 KB
|
W:
|
H:
129 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/recharge/recharge_btn_bg.png
View replaced file @
fbebaffa
View file @
2ec6f4ed
24.1 KB
|
W:
|
H:
31.9 KB
|
W:
|
H:
2-up
Swipe
Onion skin
egret/resource/assets/recharge/recharge_icon.png
0 → 100644
View file @
2ec6f4ed
2.39 KB
egret/resource/default.res.json
View file @
2ec6f4ed
This diff is collapsed.
Click to expand it.
egret/resource/skins/RechargeSkin.exml
View file @
2ec6f4ed
<?xml version="1.0" encoding="utf-8"?>
<e:Skin
class=
"SignPrizeSkin"
width=
"750"
height=
"
1206
"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<e:Skin
class=
"SignPrizeSkin"
width=
"750"
height=
"
928
"
xmlns:e=
"http://ns.egret.com/eui"
xmlns:w=
"http://ns.egret.com/wing"
>
<w:Config
id=
"16d5c2563cb"
/>
<e:Image
y=
"186.48"
source=
"recharge_bg_png
"
horizontalCenter=
"0"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"
610"
y=
"178.48
"
>
<e:Image
source=
"recharge_bg_png"
verticalCenter=
"0
"
horizontalCenter=
"0"
/>
<e:Button
id=
"closeBtn"
label=
""
x=
"
599"
y=
"119
"
>
<e:skinName>
<e:Skin
states=
"up,down,disabled"
>
<e:Image
width=
"100%"
height=
"100%"
source=
"closeCommonBtn_png"
source.down=
"closeCommonBtn_png"
source.disabled=
"closeCommonBtn_png"
/>
...
...
@@ -10,18 +10,21 @@
</e:Skin>
</e:skinName>
</e:Button>
<e:Group
y=
"
444.48
"
horizontalCenter=
"0"
>
<e:Group
y=
"
352.07
"
horizontalCenter=
"0"
>
<e:Image
source=
"recharge_num_bg_png"
y=
"0"
x=
"0"
/>
<e:Image
id=
"addBtn"
source=
"recharge_add_en_png"
x=
"409"
y=
"8"
/>
<e:Image
id=
"subBtn"
source=
"recharge_sub_ds_png"
x=
"6"
y=
"8"
/>
<e:Label
id=
"numLabel"
text=
"0"
y=
"38"
fontFamily=
"FZY4JW"
textColor=
"0xf54500"
horizontalCenter=
"0"
/>
</e:Group>
<e:Group
id=
"btn"
y=
"
719.48
"
horizontalCenter=
"0"
>
<e:Group
id=
"btn"
y=
"
592.11
"
horizontalCenter=
"0"
>
<e:Image
source=
"recharge_btn_bg_png"
y=
"0"
x=
"0"
/>
<e:Label
id=
"btnLabel"
text=
"-0云钻"
size=
"40"
horizontalCenter=
"0"
verticalCenter=
"-12.5"
stroke=
"1"
strokeColor=
"0x005ad6"
fontFamily=
"FZY4JW"
/>
<e:Label
id=
"btnLabel"
text=
"-0云钻"
size=
"40"
horizontalCenter=
"0"
verticalCenter=
"-8.5"
stroke=
"1"
strokeColor=
"0xffffff"
fontFamily=
"FZY4JW"
/>
</e:Group>
<e:Image
id=
"btn_10"
x=
"123"
y=
"486.07"
source=
"recharge_10_ds_png"
/>
<e:Image
id=
"btn_50"
x=
"303"
y=
"486.07"
source=
"recharge_50_ds_png"
/>
<e:Image
id=
"btn_100"
x=
"482"
y=
"486.07"
source=
"recharge_100_ds_png"
/>
<e:Group
y=
"730.43"
horizontalCenter=
"0"
height=
"29"
>
<e:Label
id=
"zuanLabel"
text=
"我的云钻:0"
size=
"26"
fontFamily=
"FZY3JW"
textColor=
"0xc17343"
x=
"48.68"
verticalCenter=
"0.5"
/>
<e:Image
source=
"recharge_icon_png"
x=
"0"
verticalCenter=
"0"
/>
</e:Group>
<e:Label
id=
"zuanLabel"
text=
"我的云钻:0"
y=
"833.48"
textColor=
"0xf54500"
size=
"26"
fontFamily=
"FZY3JW"
horizontalCenter=
"0.5"
/>
<e:Image
id=
"btn_10"
x=
"123"
y=
"578.48"
source=
"recharge_10_ds_png"
/>
<e:Image
id=
"btn_50"
x=
"303"
y=
"578.48"
source=
"recharge_50_ds_png"
/>
<e:Image
id=
"btn_100"
x=
"482"
y=
"578.48"
source=
"recharge_100_ds_png"
/>
</e:Skin>
egret/src/panels/RechargePanel.ts
View file @
2ec6f4ed
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
Panel
from
"../../libs/new_wx/components/Panel"
;
import
PanelCtrl
from
"../../libs/new_wx/ctrls/panelCtrl"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
{
NetManager
}
from
"../../libs/tw/manager/NetManager"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
{
getlogItem
}
from
"../Main"
;
import
Utils
from
"../Utils"
;
import
{
showToast
}
from
"../../libs/new_wx/ctrls/toastCtrl"
;
import
SceneCtrl
from
"../../libs/new_wx/ctrls/sceneCtrl"
;
import
{
loadSvga
}
from
"../loadSvga"
;
import
getResPath
from
"../../libs/new_tc/getResPath"
;
import
{
setGlow2
}
from
"./ShopPanel"
;
const
MIN
:
number
=
1
;
const
MAX
:
number
=
100
;
...
...
@@ -134,6 +135,7 @@ export default class RechargePanel extends Panel {
this
.
setNumBtn
();
this
.
numLabel
.
text
=
''
+
this
.
nowNumber
;
this
.
btnLabel
.
text
=
`-
${
this
.
nowNumber
*
10
}
云钻`
;
setGlow2
(
this
.
btnLabel
,
0xff7038
,
1
);
}
private
onTouchBtn
(
e
:
egret
.
TouchEvent
)
{
...
...
@@ -179,14 +181,14 @@ export default class RechargePanel extends Panel {
}
private
getYunZuan
()
{
this
.
zuanLabel
.
text
=
'
我的云钻
:0'
;
this
.
zuanLabel
.
text
=
'
剩余
:0'
;
NetManager
.
ins
.
getCloudNum
((
success
,
res
)
=>
{
if
(
!
success
)
{
return
;
}
const
data
=
res
.
data
;
this
.
totalNum
=
data
;
this
.
zuanLabel
.
text
=
`
我的云钻
:
${
data
}
`
;
this
.
zuanLabel
.
text
=
`
剩余
:
${
data
}
`
;
})
}
...
...
egret/src/panels/ShopPanel.ts
View file @
2ec6f4ed
...
...
@@ -19,6 +19,21 @@ const setGlow = (img: egret.DisplayObject, color: number,alpha:number) => {
}
export
const
setGlow2
=
(
img
:
egret
.
DisplayObject
,
color
:
number
,
alpha
:
number
)
=>
{
// const color = 0x33CCFF; /// 光晕的颜色,十六进制,不包含透明度
// const alpha = 0.8; /// 光晕的颜色透明度,是对 color 参数的透明度设定。有效值为 0.0 到 1.0。例如,0.8 设置透明度值为 80%。
const
blurX
=
3
;
/// 水平模糊量。有效值为 0 到 255.0(浮点)
const
blurY
=
3
;
/// 垂直模糊量。有效值为 0 到 255.0(浮点)
const
strength
=
10
;
/// 压印的强度,值越大,压印的颜色越深,而且发光与背景之间的对比度也越强。有效值为 0 到 255。暂未实现
const
quality
:
number
=
egret
.
BitmapFilterQuality
.
HIGH
;
/// 应用滤镜的次数,建议用 BitmapFilterQuality 类的常量来体现
const
inner
=
false
;
/// 指定发光是否为内侧发光,暂未实现
const
knockout
=
false
;
/// 指定对象是否具有挖空效果,暂未实现
const
glowFilter
:
egret
.
GlowFilter
=
new
egret
.
GlowFilter
(
color
,
alpha
,
blurX
,
blurY
,
strength
,
quality
,
inner
,
knockout
);
img
.
filters
=
[
glowFilter
];
}
export
default
class
ShopPanel
extends
Panel
{
start
(
data
)
{
...
...
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