Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qiaqia_qx
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
邱旭
qiaqia_qx
Commits
2c7a7b8c
Commit
2c7a7b8c
authored
Jun 05, 2020
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
panel
parent
15fc1da5
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
124 additions
and
37 deletions
+124
-37
workspace.xml
.idea/workspace.xml
+30
-29
ExRecordPanel.ts
src/panels/ExRecordPanel.ts
+49
-2
ShopPanel.ts
src/panels/ShopPanel.ts
+20
-2
WareHousePanel.ts
src/panels/WareHousePanel.ts
+22
-3
UILayer.ts
src/parts/UI/UILayer.ts
+3
-1
No files found.
.idea/workspace.xml
View file @
2c7a7b8c
This diff is collapsed.
Click to expand it.
src/panels/ExRecordPanel.ts
View file @
2c7a7b8c
import
{
Panel
}
from
"../../module/views/Panel"
;
import
{
Tool
}
from
"../Tools"
;
import
Sprite
=
FYGE
.
Sprite
;
import
{
layers
}
from
"../../module/views/layers"
;
import
Tween
=
FYGE
.
Tween
;
import
ScrollList
=
FYGE
.
ScrollList
;
import
Container
=
FYGE
.
Container
;
import
IScrollListItem
=
FYGE
.
IScrollListItem
;
export
default
class
ExRecordPanel
extends
Panel
{
get
groupNames
()
{
...
...
@@ -8,15 +13,40 @@ export default class ExRecordPanel extends Panel {
}
closeBtn
:
Sprite
;
scroll
:
ScrollList
;
initUi
()
{
this
.
addChild
(
Tool
.
getSprite
(
"rule_bg.png"
));
this
.
addChild
(
Tool
.
getSprite
(
"comm_bg.png"
))
.
position
.
set
(
0
,
65
);
let
title
=
this
.
addChild
(
Tool
.
getSprite
(
"record_icon.png"
));
title
.
position
.
set
((
this
.
width
-
title
.
width
)
/
2
,
0
);
this
.
closeBtn
=
this
.
addChild
(
Tool
.
getSprite
(
'closeBtn.png'
));
this
.
closeBtn
.
position
.
set
(
600
,
350
);
this
.
closeBtn
.
position
.
set
(
670
,
-
50
);
this
.
scroll
=
this
.
addChild
(
new
ScrollList
(
RecordItem
,
653
,
200
,
654
,
830
));
this
.
scroll
.
position
.
set
((
this
.
width
-
this
.
scroll
.
width
)
/
2
,
210
);
this
.
scroll
.
updateData
([
1
,
2
,
3
,
4
,
5
,
6
]);
}
public
showAni
()
{
if
(
this
.
isShowing
)
return
;
this
.
isShowing
=
true
;
this
.
y
=
this
.
height
;
const
_y
=
layers
.
height
-
this
.
height
+
30
;
Tween
.
get
(
this
)
.
to
({
y
:
_y
},
500
,
FYGE
.
Ease
.
quartOut
)
.
call
(()
=>
{
this
.
isShowing
=
false
;
});
}
start
(
data
)
{
super
.
start
();
}
...
...
@@ -30,3 +60,20 @@ export default class ExRecordPanel extends Panel {
}
}
class
RecordItem
extends
Container
implements
IScrollListItem
{
public
data
:
number
;
public
id
:
number
;
public
initData
(
id
:
number
,
data
:
any
):
void
{
if
(
!
data
)
return
;
}
constructor
()
{
super
();
this
.
addChild
(
Tool
.
getSprite
(
'record_item_bg.png'
));
}
}
src/panels/ShopPanel.ts
View file @
2c7a7b8c
import
{
Panel
}
from
"../../module/views/Panel"
;
import
{
Tool
}
from
"../Tools"
;
import
Sprite
=
FYGE
.
Sprite
;
import
{
layers
}
from
"../../module/views/layers"
;
import
Tween
=
FYGE
.
Tween
;
export
default
class
ShopPanel
extends
Panel
{
get
groupNames
()
{
...
...
@@ -10,11 +12,27 @@ export default class ShopPanel extends Panel {
closeBtn
:
Sprite
;
initUi
()
{
this
.
addChild
(
Tool
.
getSprite
(
"rule_bg.png"
));
this
.
addChild
(
Tool
.
getSprite
(
"comm_bg.png"
))
.
position
.
set
(
0
,
65
);
let
title
=
this
.
addChild
(
Tool
.
getSprite
(
"shop_icon.png"
));
title
.
position
.
set
((
this
.
width
-
title
.
width
)
/
2
,
0
);
this
.
closeBtn
=
this
.
addChild
(
Tool
.
getSprite
(
'closeBtn.png'
));
this
.
closeBtn
.
position
.
set
(
6
00
,
3
50
);
this
.
closeBtn
.
position
.
set
(
6
70
,
-
50
);
}
public
showAni
()
{
if
(
this
.
isShowing
)
return
;
this
.
isShowing
=
true
;
this
.
y
=
this
.
height
;
const
_y
=
layers
.
height
-
this
.
height
+
30
;
Tween
.
get
(
this
)
.
to
({
y
:
_y
},
500
,
FYGE
.
Ease
.
quartOut
)
.
call
(()
=>
{
this
.
isShowing
=
false
;
});
}
start
(
data
)
{
...
...
src/panels/WareHousePanel.ts
View file @
2c7a7b8c
import
{
Panel
}
from
"../../module/views/Panel"
;
import
{
Tool
}
from
"../Tools"
;
import
Sprite
=
FYGE
.
Sprite
;
import
{
layers
}
from
"../../module/views/layers"
;
import
Tween
=
FYGE
.
Tween
;
import
Ease
=
FYGE
.
Ease
;
export
default
class
WareHousePanel
extends
Panel
{
get
groupNames
()
{
...
...
@@ -10,13 +13,29 @@ export default class WareHousePanel extends Panel {
closeBtn
:
Sprite
;
initUi
()
{
this
.
addChild
(
Tool
.
getSprite
(
"rule_bg.png"
));
this
.
closeBtn
=
this
.
addChild
(
Tool
.
getSprite
(
'closeBtn.png'
));
this
.
closeBtn
.
position
.
set
(
600
,
350
);
this
.
addChild
(
Tool
.
getSprite
(
"comm_bg.png"
))
.
position
.
set
(
0
,
65
);
let
title
=
this
.
addChild
(
Tool
.
getSprite
(
"wareHouse_icon.png"
));
title
.
position
.
set
((
this
.
width
-
title
.
width
)
/
2
,
0
);
this
.
closeBtn
=
this
.
addChild
(
Tool
.
getSprite
(
'closeBtn.png'
));
this
.
closeBtn
.
position
.
set
(
670
,
-
50
);
}
public
showAni
()
{
if
(
this
.
isShowing
)
return
;
this
.
isShowing
=
true
;
this
.
y
=
this
.
height
;
const
_y
=
layers
.
height
-
this
.
height
+
30
;
Tween
.
get
(
this
)
.
to
({
y
:
_y
},
500
,
Ease
.
quartOut
)
.
call
(()
=>
{
this
.
isShowing
=
false
;
});
}
start
(
data
)
{
super
.
start
();
}
...
...
src/parts/UI/UILayer.ts
View file @
2c7a7b8c
...
...
@@ -9,6 +9,7 @@ import RulePanel from "../../panels/RulePanel";
import
TaskPanel
from
"../../panels/TaskPanel"
;
import
WareHousePanel
from
"../../panels/WareHousePanel"
;
import
ShopPanel
from
"../../panels/ShopPanel"
;
import
ExRecordPanel
from
"../../panels/ExRecordPanel"
;
export
class
UILayer
extends
Container
{
...
...
@@ -64,7 +65,8 @@ export class UILayer extends Container {
break
;
case
this
.
ruleBtn
:
console
.
log
(
'点击了规则'
);
PanelCtrl
.
instance
.
show
(
RulePanel
);
// PanelCtrl.instance.show(RulePanel);
PanelCtrl
.
instance
.
show
(
ExRecordPanel
);
break
;
case
this
.
adBtn
:
console
.
log
(
'点击了广告'
);
...
...
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