Commit d5a6821b authored by wildfirecode's avatar wildfirecode

1

parent ceaa0231
...@@ -45,6 +45,7 @@ import TaskPanel from "../../src/panels/TaskPanel"; ...@@ -45,6 +45,7 @@ import TaskPanel from "../../src/panels/TaskPanel";
import TaskPrizePanel from "../../src/panels/TaskPrizePanel"; import TaskPrizePanel from "../../src/panels/TaskPrizePanel";
import BackPanel from "../../src/panels/BackPanel"; import BackPanel from "../../src/panels/BackPanel";
import InvitePanel from "../../src/panels/InvitePanel"; import InvitePanel from "../../src/panels/InvitePanel";
import FriendPanel from "../../src/panels/FriendPanel";
export default class MainBase extends eui.UILayer { export default class MainBase extends eui.UILayer {
constructor() { constructor() {
...@@ -82,6 +83,7 @@ export default class MainBase extends eui.UILayer { ...@@ -82,6 +83,7 @@ export default class MainBase extends eui.UILayer {
['taskPrize', { cls: TaskPrizePanel }], ['taskPrize', { cls: TaskPrizePanel }],
['back', { cls: BackPanel }], ['back', { cls: BackPanel }],
['invite', { cls: InvitePanel }], ['invite', { cls: InvitePanel }],
['friend', { cls: FriendPanel }],
['ad', { cls: ADPanel }], ['ad', { cls: ADPanel }],
]; ];
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
"resource/skins/TargetItemSkin.exml", "resource/skins/TargetItemSkin.exml",
"resource/skins/TaskItemSkin.exml", "resource/skins/TaskItemSkin.exml",
"resource/skins/TaskSkin.exml", "resource/skins/TaskSkin.exml",
"resource/skins/FriendSkin.exml",
"resource/skins/FriendItemSkin.exml",
"resource/skins/TaskPrizeSkin.exml", "resource/skins/TaskPrizeSkin.exml",
"resource/skins/ADSkin.exml", "resource/skins/ADSkin.exml",
"resource/skins/BackSkin.exml", "resource/skins/BackSkin.exml",
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FriendItemSkin" width="400" height="50" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Label id="nameTxt" text="111" x="20" y="16"/>
</e:Skin>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="FriendSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<e:Image source="闯关失败_png" y="27" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="609" y="197">
<e:skinName>
<e:Skin states="up,down,disabled" xmlns:w="http://ns.egret.com/wing">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Scroller id="scroll" width="400" height="400" y="279" horizontalCenter="0" scrollPolicyV="on" scrollPolicyH="off">
<e:Group>
<e:List id="list" width="100%" itemRendererSkinName="FriendItemSkin">
<e:ArrayCollection>
<e:Array>
<e:Object a="taskname1"/>
<e:Object a="taskname2"/>
<e:Object a="taskname3"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
<e:Object a="null"/>
</e:Array>
</e:ArrayCollection>
<e:layout>
<e:VerticalLayout gap="0"/>
</e:layout>
</e:List>
</e:Group>
</e:Scroller>
<e:Label text="friendBtn" x="80" y="468"/>
</e:Skin>
\ No newline at end of file
...@@ -83,6 +83,14 @@ ...@@ -83,6 +83,14 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Button id="friendBtn" label="" x="185" y="158.57">
<e:skinName>
<e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="recordbtn_png" source.down="recordbtn_png" source.disabled="recordbtn_png"/>
<e:Label id="labelDisplay" horizontalCenter="0" verticalCenter="0"/>
</e:Skin>
</e:skinName>
</e:Button>
<e:Button id="inviteBtn" label="" x="608.17" y="460.41"> <e:Button id="inviteBtn" label="" x="608.17" y="460.41">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
......
...@@ -317,6 +317,9 @@ export default class MapScene extends Scene { ...@@ -317,6 +317,9 @@ export default class MapScene extends Scene {
onTap_inviteBtn(){ onTap_inviteBtn(){
PanelCtrl.instance.show('invite'); PanelCtrl.instance.show('invite');
} }
onTap_friendBtn(){
PanelCtrl.instance.show('friend');
}
onTap_adBtn(){ onTap_adBtn(){
console.log('onTap_adBtn') console.log('onTap_adBtn')
} }
...@@ -329,6 +332,7 @@ export default class MapScene extends Scene { ...@@ -329,6 +332,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['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['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this) this['adBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_adBtn, this)
this['taskBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_taskBtn, this) this['taskBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_taskBtn, this)
this['signBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_signBtn, this) this['signBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_signBtn, this)
......
import getSkinPath from "../../libs/new_wx/utils/getSkinPath";
export default class FriendItemRenderer extends eui.ItemRenderer {
constructor() {
super();
this.skinName = getSkinPath('FriendItem');
}
dataChanged(){
this['nameTxt'].text = this.data + '';
}
}
\ No newline at end of file
import Panel from "../../libs/new_wx/components/Panel";
import FriendItemRenderer from "./FriendItemRenderer";
export default class FriendPanel extends Panel {
public list: eui.List;
start(data) {
super.start();
this.showlog();
this.list.useVirtualLayout = false;
this.list.itemRenderer = FriendItemRenderer;
const ac = new eui.ArrayCollection([1,2,3,4,5,6,7,8,9,10]);
this.list.dataProvider = ac;
}
showlog(){
// NetManager.ins.showLog(getlogItem(3));
// NetManager.ins.showLog(getlogItem(4));
}
initEvents() {
super.initEvents();
// this['inviteBtn'].addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTapInvite, this)
}
onTapInvite() {
}
protected get closeBtns(): eui.Button[] { return [this['closeBtn']] }
get skinKey() { return 'Friend' }
}
\ 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