Commit 6c4d64d9 authored by 邱旭's avatar 邱旭

1

parent d9d5ee78
......@@ -3292,7 +3292,7 @@ declare namespace eui {
*/
private _icon;
/**
* Icon to appear on the Button control.
* IconBase to appear on the Button control.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
......
......@@ -4936,7 +4936,7 @@ var eui;
});
Object.defineProperty(Button.prototype, "icon", {
/**
* Icon to appear on the Button control.
* IconBase to appear on the Button control.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
......
......@@ -22,6 +22,7 @@ import AvatarComp from "./AvatarComp";
import Utils from "../Utils";
import { GDispatcher } from "../../libs/tc/util/GDispatcher";
import Loading from "../../libs/new_wx/components/Loading";
import ScratchIcon from "./icon/ScratchIcon";
let doHelpFlag = false;
// let adTag = false;
......@@ -88,6 +89,8 @@ export default class MapScene extends Scene {
stopGamebg();
let scratchBtn = new ScratchIcon("scratch", this["scratchGroup"], this["scratchBtn"], this["scratchTipsBg"], this["scratchTips"]);
NetManager.ins.getSignInfo(() => {
const panels = [];
const date = new Date();
......@@ -652,7 +655,7 @@ export default class MapScene extends Scene {
protected initEvents() {
// this['goldBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_goldBtn, 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['friendBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_friendBtn, this)
this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this)
......
/**
* 地图页图标基类
* 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
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment