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
Show 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"
;
export
default
class
ShareMask
extends
FYGE
.
Sprite
{
...
...
@@ -28,3 +29,7 @@ export default class ShareMask extends FYGE.Sprite {
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";
import
{
RES
}
from
"../../module/RES"
;
import
{
Panel
}
from
"../../module/views/Panel"
;
import
Group
from
"../common/Group"
;
import
{
showShareMask
}
from
"../common/ShareMask"
;
import
TestButton
from
"../common/TestButton"
;
import
TestLabel
from
"../common/TestLabel"
;
import
getObject
from
"../getObject"
;
...
...
@@ -11,8 +12,9 @@ import updateShare from "../updateShare";
import
{
getWebData
,
sendWebNet
,
WebNetName
}
from
"../WebNet"
;
export
class
PrizePanel
extends
Panel
{
amountTxt
:
FYGE
.
TextField
;
percentTxt
:
FYGE
.
TextField
;
amountTxt
:
FYGE
.
TextField
;
percentTxt
:
FYGE
.
TextField
;
closeBtn
;
inviteBtn
;
initUi
()
{
super
.
initUi
();
var
skin
=
RES
.
getSkinDataByName
(
this
.
skinName
);
...
...
@@ -20,18 +22,21 @@ export class PrizePanel extends Panel {
const
group
=
new
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
({
text
:
'1000元'
,
color
:
'0x000000'
,
w
:
500
,
h
:
100
,
size
:
50
text
:
'1000元'
,
color
:
'0x000000'
,
w
:
500
,
h
:
100
,
size
:
50
});
group
.
add
(
label
);
this
.
amountTxt
=
label
.
textfield
;
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
);
...
...
@@ -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
)
{
super
.
start
();
const
indexResult
=
await
sendWebNet
(
WebNetName
.
index
)
...
...
@@ -57,8 +53,28 @@ export class PrizePanel extends Panel {
hidePanel
()
{
super
.
hidePanel
();
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