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
0510b849
Commit
0510b849
authored
Aug 13, 2021
by
wildfirecode13
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
u
parent
2e45c9c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
ShareMask.ts
project/src/common/ShareMask.ts
+10
-9
stage.ts
project/src/common/stage.ts
+5
-0
No files found.
project/src/common/ShareMask.ts
View file @
0510b849
import
{
RES
}
from
"../../module/RES"
;
import
{
layers
}
from
"../../module/views/layers"
;
import
centerTextField
from
"./centerTextField"
;
import
{
getStageHeight
}
from
"./stage"
;
let
mask
;
export
default
class
ShareMask
extends
FYGE
.
Sprite
{
...
...
@@ -25,15 +26,15 @@ export default class ShareMask extends FYGE.Sprite {
callback
=
()
=>
{
this
.
parent
&&
this
.
parent
.
removeChild
(
this
);
this
.
removeEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
callback
,
this
);
mask
=
null
;
mask
=
null
;
};
const
sharepicWrapper
=
new
FYGE
.
Sprite
();
const
pic
=
sharepicWrapper
.
addChild
(
new
FYGE
.
Sprite
(
RES
.
getRes
(
'sharemask.png'
)));
const
gap
=
30
;
sharepicWrapper
.
x
=
750
-
pic
.
width
-
gap
;
sharepicWrapper
.
y
=
gap
;
sharepicWrapper
.
x
=
750
-
pic
.
width
-
gap
;
sharepicWrapper
.
y
=
(
1624
-
getStageHeight
())
+
gap
;
this
.
addChild
(
sharepicWrapper
);
this
.
addEventListener
(
FYGE
.
MouseEvent
.
CLICK
,
callback
,
this
);
...
...
@@ -41,13 +42,13 @@ export default class ShareMask extends FYGE.Sprite {
}
export
const
showShareMask
=
()
=>
{
if
(
mask
)
return
;
export
const
showShareMask
=
()
=>
{
if
(
mask
)
return
;
mask
=
new
ShareMask
();
layers
.
shareLayer
.
addChild
(
mask
);
}
export
const
hideShareMask
=
()
=>
{
if
(
!
mask
)
return
;
export
const
hideShareMask
=
()
=>
{
if
(
!
mask
)
return
;
layers
.
shareLayer
.
removeChild
(
mask
);
mask
=
null
;
mask
=
null
;
}
\ No newline at end of file
project/src/common/stage.ts
0 → 100644
View file @
0510b849
import
{
layers
}
from
"../../module/views/layers"
export
const
getStageWidth
=
()
=>
{
return
layers
.
stage
.
viewRect
.
width
}
export
const
getStageHeight
=
()
=>
{
return
layers
.
stage
.
viewRect
.
height
}
export
const
getStageOffset
=
()
=>
{
return
(
1624
-
getStageHeight
())
/
2
}
\ 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