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
6c4d64d9
Commit
6c4d64d9
authored
Oct 25, 2019
by
邱旭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d9d5ee78
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
3 deletions
+94
-3
eui.d.ts
egret/libs/modules/eui/eui.d.ts
+1
-1
eui.js
egret/libs/modules/eui/eui.js
+1
-1
MapScene.ts
egret/src/mapScene/MapScene.ts
+4
-1
IconBase.ts
egret/src/mapScene/icon/IconBase.ts
+62
-0
ScratchIcon.ts
egret/src/mapScene/icon/ScratchIcon.ts
+26
-0
No files found.
egret/libs/modules/eui/eui.d.ts
View file @
6c4d64d9
...
@@ -3292,7 +3292,7 @@ declare namespace eui {
...
@@ -3292,7 +3292,7 @@ declare namespace eui {
*/
*/
private
_icon
;
private
_icon
;
/**
/**
* Icon to appear on the Button control.
* Icon
Base
to appear on the Button control.
* @version Egret 2.4
* @version Egret 2.4
* @version eui 1.0
* @version eui 1.0
* @platform Web,Native
* @platform Web,Native
...
...
egret/libs/modules/eui/eui.js
View file @
6c4d64d9
...
@@ -4936,7 +4936,7 @@ var eui;
...
@@ -4936,7 +4936,7 @@ var eui;
});
});
Object
.
defineProperty
(
Button
.
prototype
,
"icon"
,
{
Object
.
defineProperty
(
Button
.
prototype
,
"icon"
,
{
/**
/**
* Icon to appear on the Button control.
* Icon
Base
to appear on the Button control.
* @version Egret 2.4
* @version Egret 2.4
* @version eui 1.0
* @version eui 1.0
* @platform Web,Native
* @platform Web,Native
...
...
egret/src/mapScene/MapScene.ts
View file @
6c4d64d9
...
@@ -22,6 +22,7 @@ import AvatarComp from "./AvatarComp";
...
@@ -22,6 +22,7 @@ import AvatarComp from "./AvatarComp";
import
Utils
from
"../Utils"
;
import
Utils
from
"../Utils"
;
import
{
GDispatcher
}
from
"../../libs/tc/util/GDispatcher"
;
import
{
GDispatcher
}
from
"../../libs/tc/util/GDispatcher"
;
import
Loading
from
"../../libs/new_wx/components/Loading"
;
import
Loading
from
"../../libs/new_wx/components/Loading"
;
import
ScratchIcon
from
"./icon/ScratchIcon"
;
let
doHelpFlag
=
false
;
let
doHelpFlag
=
false
;
// let adTag = false;
// let adTag = false;
...
@@ -88,6 +89,8 @@ export default class MapScene extends Scene {
...
@@ -88,6 +89,8 @@ export default class MapScene extends Scene {
stopGamebg
();
stopGamebg
();
let
scratchBtn
=
new
ScratchIcon
(
"scratch"
,
this
[
"scratchGroup"
],
this
[
"scratchBtn"
],
this
[
"scratchTipsBg"
],
this
[
"scratchTips"
]);
NetManager
.
ins
.
getSignInfo
(()
=>
{
NetManager
.
ins
.
getSignInfo
(()
=>
{
const
panels
=
[];
const
panels
=
[];
const
date
=
new
Date
();
const
date
=
new
Date
();
...
@@ -652,7 +655,7 @@ export default class MapScene extends Scene {
...
@@ -652,7 +655,7 @@ export default class MapScene extends Scene {
protected
initEvents
()
{
protected
initEvents
()
{
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this)
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, this)
this
[
'turnTableBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_turnTableBtn
,
this
)
this
[
'turnTableBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_turnTableBtn
,
this
)
this
[
'scratchBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_scratchBtn
,
this
)
//
this['scratchBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_scratchBtn, this)
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_inviteBtn
,
this
)
this
[
'inviteBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_inviteBtn
,
this
)
this
[
'friendBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_friendBtn
,
this
)
this
[
'friendBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_friendBtn
,
this
)
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_adBtn
,
this
)
this
[
'adBtn'
].
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTap_adBtn
,
this
)
...
...
egret/src/mapScene/icon/IconBase.ts
0 → 100644
View file @
6c4d64d9
/**
* 地图页图标基类
* 2019.10.24
*/
export
default
class
IconBase
{
private
iconGroup
:
eui
.
Group
;
private
iconBtn
:
eui
.
Button
;
private
iconTipsBg
:
eui
.
Image
;
private
iconTips
:
eui
.
Label
;
private
readonly
_name
:
string
;
public
get
name
(){
return
this
.
_name
;
}
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
:
eui
.
Image
,
tipsLabel
:
eui
.
Label
){
this
.
iconGroup
=
group
;
this
.
iconBtn
=
btn
;
this
.
iconTipsBg
=
tipsBg
;
this
.
iconTips
=
tipsLabel
;
this
.
_name
=
name
;
this
.
initEvents
();
}
protected
initEvents
(){
this
.
iconBtn
.
addEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchBtn
,
this
);
}
protected
onTouchBtn
(
e
:
egret
.
TouchEvent
){
console
.
log
(
"基类"
);
}
protected
removeEvents
(){
this
.
iconBtn
.
removeEventListener
(
egret
.
TouchEvent
.
TOUCH_TAP
,
this
.
onTouchBtn
,
this
);
}
protected
destory
(){
this
.
removeEvents
();
}
/**
* 设置图标提示的隐藏与显示
* @param visible
*/
public
set
tipsVisible
(
visible
:
boolean
){
this
.
iconTipsBg
.
visible
=
visible
;
this
.
iconTips
.
visible
=
visible
;
}
/**
* 设置图标隐藏与显示
* @param visible
*/
public
set
visible
(
visible
:
boolean
){
this
.
iconGroup
.
visible
=
visible
;
this
.
iconBtn
.
visible
=
visible
;
this
.
iconTipsBg
.
visible
=
visible
;
this
.
iconTips
.
visible
=
visible
;
}
}
\ No newline at end of file
egret/src/mapScene/icon/ScratchIcon.ts
0 → 100644
View file @
6c4d64d9
import
IconBase
from
"./IconBase"
;
export
default
class
ScratchIcon
extends
IconBase
{
constructor
(
name
:
string
,
group
:
eui
.
Group
,
btn
:
eui
.
Button
,
tipsBg
:
eui
.
Image
,
tipsLabel
:
eui
.
Label
)
{
super
(
name
,
group
,
btn
,
tipsBg
,
tipsLabel
);
}
protected
initEvents
()
{
super
.
initEvents
();
}
protected
onTouchBtn
(
e
:
egret
.
TouchEvent
)
{
super
.
onTouchBtn
(
e
);
console
.
log
(
"子类"
);
}
protected
removeEvents
()
{
super
.
removeEvents
();
}
protected
destory
()
{
super
.
destory
();
}
}
\ 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