Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wfc13
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
wildfirecode13
wfc13
Commits
de5e6189
Commit
de5e6189
authored
Aug 05, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c4533cd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
19 deletions
+40
-19
ShareMask.ts
project/src/common/ShareMask.ts
+5
-0
prize.ts
project/src/panels/prize.ts
+35
-19
No files found.
project/src/common/ShareMask.ts
View file @
de5e6189
import
{
layers
}
from
"../../module/views/layers"
;
import
TestLabel
from
"./TestLabel"
;
import
TestLabel
from
"./TestLabel"
;
export
default
class
ShareMask
extends
FYGE
.
Sprite
{
export
default
class
ShareMask
extends
FYGE
.
Sprite
{
...
@@ -27,4 +28,8 @@ export default class ShareMask extends FYGE.Sprite {
...
@@ -27,4 +28,8 @@ export default class ShareMask extends FYGE.Sprite {
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
callback
,
this
);
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
callback
,
this
);
}
}
}
export
const
showShareMask
=
()
=>
{
layers
.
shareLayer
.
addChild
(
new
ShareMask
())
}
}
\ No newline at end of file
project/src/panels/prize.ts
View file @
de5e6189
...
@@ -2,6 +2,7 @@ import { changeScene } from "../../module/ctrls";
...
@@ -2,6 +2,7 @@ import { changeScene } from "../../module/ctrls";
import
{
RES
}
from
"../../module/RES"
;
import
{
RES
}
from
"../../module/RES"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
Group
from
"../common/Group"
;
import
Group
from
"../common/Group"
;
import
{
showShareMask
}
from
"../common/ShareMask"
;
import
TestButton
from
"../common/TestButton"
;
import
TestButton
from
"../common/TestButton"
;
import
TestLabel
from
"../common/TestLabel"
;
import
TestLabel
from
"../common/TestLabel"
;
import
getObject
from
"../getObject"
;
import
getObject
from
"../getObject"
;
...
@@ -11,28 +12,32 @@ import updateShare from "../updateShare";
...
@@ -11,28 +12,32 @@ import updateShare from "../updateShare";
import
{
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
import
{
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
export
class
PrizePanel
extends
Panel
{
export
class
PrizePanel
extends
Panel
{
amountTxt
:
FYGE
.
TextField
;
amountTxt
:
FYGE
.
TextField
;
percentTxt
:
FYGE
.
TextField
;
percentTxt
:
FYGE
.
TextField
;
closeBtn
;
inviteBtn
;
initUi
()
{
initUi
()
{
super
.
initUi
();
super
.
initUi
();
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
this
.
position
.
set
(
skin
.
x
,
skin
.
y
);
const
group
=
new
Group
();
const
group
=
new
Group
();
this
.
addChild
(
group
)
this
.
addChild
(
group
)
const
prizeBtn
=
new
TestButton
(
'立即拆开'
);
group
.
add
(
prizeBtn
);
const
closeBtn
=
this
.
closeBtn
=
new
TestButton
(
'关闭按钮'
);
group
.
add
(
closeBtn
);
const
inviteBtn
=
this
.
inviteBtn
=
new
TestButton
(
'邀请按钮'
);
group
.
add
(
inviteBtn
);
const
label
=
new
TestLabel
({
const
label
=
new
TestLabel
({
text
:
'1000元'
,
color
:
'0x000000'
,
w
:
500
,
h
:
100
,
size
:
50
text
:
'1000元'
,
color
:
'0x000000'
,
w
:
500
,
h
:
100
,
size
:
50
});
});
group
.
add
(
label
);
group
.
add
(
label
);
this
.
amountTxt
=
label
.
textfield
;
this
.
amountTxt
=
label
.
textfield
;
const
label2
=
new
TestLabel
({
const
label2
=
new
TestLabel
({
text
:
'1000/1000000'
,
color
:
'0x000000'
,
w
:
500
,
h
:
100
,
size
:
50
text
:
'1000/1000000'
,
color
:
'0x000000'
,
w
:
500
,
h
:
100
,
size
:
50
});
});
group
.
add
(
label2
);
group
.
add
(
label2
);
...
@@ -40,15 +45,6 @@ export class PrizePanel extends Panel {
...
@@ -40,15 +45,6 @@ export class PrizePanel extends Panel {
}
}
get
groupNames
()
{
return
[
"prize"
]
}
get
skinName
()
{
return
"prize"
}
//两个按钮都是关闭作用
get
closeBtns
()
{
return
[
getObject
(
this
,
'prize_closebtn'
),
getObject
(
this
,
'prize_okbtn'
)];
}
async
start
(
data
)
{
async
start
(
data
)
{
super
.
start
();
super
.
start
();
const
indexResult
=
await
sendWebNet
(
WebNetName
.
index
)
const
indexResult
=
await
sendWebNet
(
WebNetName
.
index
)
...
@@ -57,8 +53,28 @@ export class PrizePanel extends Panel {
...
@@ -57,8 +53,28 @@ export class PrizePanel extends Panel {
hidePanel
()
{
hidePanel
()
{
super
.
hidePanel
();
super
.
hidePanel
();
changeScene
(
IndexScene
);
changeScene
(
IndexScene
);
}
onClick_inviteBtn
(){
showShareMask
();
}
//两个按钮都是关闭作用
get
closeBtns
()
{
return
[
this
.
closeBtn
];
}
}
initEvents
()
{
super
.
initEvents
();
this
.
inviteBtn
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_inviteBtn
,
this
);
}
removeEvents
()
{
super
.
removeEvents
();
this
.
inviteBtn
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
this
.
onClick_inviteBtn
,
this
);
}
get
groupNames
()
{
return
[
"prize"
]
}
get
skinName
()
{
return
"prize"
}
}
}
\ 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