Commit 2ec6f4ed authored by wildfirecode's avatar wildfirecode

1

parent fbebaffa
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="SignPrizeSkin" width="750" height="1206" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing"> <e:Skin class="SignPrizeSkin" width="750" height="928" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16d5c2563cb"/> <w:Config id="16d5c2563cb"/>
<e:Image y="186.48" source="recharge_bg_png" horizontalCenter="0"/> <e:Image source="recharge_bg_png" verticalCenter="0" horizontalCenter="0"/>
<e:Button id="closeBtn" label="" x="610" y="178.48"> <e:Button id="closeBtn" label="" x="599" y="119">
<e:skinName> <e:skinName>
<e:Skin states="up,down,disabled"> <e:Skin states="up,down,disabled">
<e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/> <e:Image width="100%" height="100%" source="closeCommonBtn_png" source.down="closeCommonBtn_png" source.disabled="closeCommonBtn_png"/>
...@@ -10,18 +10,21 @@ ...@@ -10,18 +10,21 @@
</e:Skin> </e:Skin>
</e:skinName> </e:skinName>
</e:Button> </e:Button>
<e:Group y="444.48" horizontalCenter="0"> <e:Group y="352.07" horizontalCenter="0">
<e:Image source="recharge_num_bg_png" y="0" x="0"/> <e:Image source="recharge_num_bg_png" y="0" x="0"/>
<e:Image id="addBtn" source="recharge_add_en_png" x="409" y="8"/> <e:Image id="addBtn" source="recharge_add_en_png" x="409" y="8"/>
<e:Image id="subBtn" source="recharge_sub_ds_png" x="6" y="8"/> <e:Image id="subBtn" source="recharge_sub_ds_png" x="6" y="8"/>
<e:Label id="numLabel" text="0" y="38" fontFamily="FZY4JW" textColor="0xf54500" horizontalCenter="0"/> <e:Label id="numLabel" text="0" y="38" fontFamily="FZY4JW" textColor="0xf54500" horizontalCenter="0"/>
</e:Group> </e:Group>
<e:Group id="btn" y="719.48" horizontalCenter="0"> <e:Group id="btn" y="592.11" horizontalCenter="0">
<e:Image source="recharge_btn_bg_png" y="0" x="0"/> <e:Image source="recharge_btn_bg_png" y="0" x="0"/>
<e:Label id="btnLabel" text="-0云钻" size="40" horizontalCenter="0" verticalCenter="-12.5" stroke="1" strokeColor="0x005ad6" fontFamily="FZY4JW"/> <e:Label id="btnLabel" text="-0云钻" size="40" horizontalCenter="0" verticalCenter="-8.5" stroke="1" strokeColor="0xffffff" fontFamily="FZY4JW"/>
</e:Group>
<e:Image id="btn_10" x="123" y="486.07" source="recharge_10_ds_png"/>
<e:Image id="btn_50" x="303" y="486.07" source="recharge_50_ds_png"/>
<e:Image id="btn_100" x="482" y="486.07" source="recharge_100_ds_png"/>
<e:Group y="730.43" horizontalCenter="0" height="29">
<e:Label id="zuanLabel" text="我的云钻:0" size="26" fontFamily="FZY3JW" textColor="0xc17343" x="48.68" verticalCenter="0.5"/>
<e:Image source="recharge_icon_png" x="0" verticalCenter="0"/>
</e:Group> </e:Group>
<e:Label id="zuanLabel" text="我的云钻:0" y="833.48" textColor="0xf54500" size="26" fontFamily="FZY3JW" horizontalCenter="0.5"/>
<e:Image id="btn_10" x="123" y="578.48" source="recharge_10_ds_png"/>
<e:Image id="btn_50" x="303" y="578.48" source="recharge_50_ds_png"/>
<e:Image id="btn_100" x="482" y="578.48" source="recharge_100_ds_png"/>
</e:Skin> </e:Skin>
import getResPath from "../../libs/new_tc/getResPath";
import Panel from "../../libs/new_wx/components/Panel"; import Panel from "../../libs/new_wx/components/Panel";
import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl"; import PanelCtrl from "../../libs/new_wx/ctrls/panelCtrl";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl";
import { NetManager } from "../../libs/tw/manager/NetManager"; import { NetManager } from "../../libs/tw/manager/NetManager";
import { loadSvga } from "../loadSvga";
import { getlogItem } from "../Main"; import { getlogItem } from "../Main";
import Utils from "../Utils"; import Utils from "../Utils";
import { showToast } from "../../libs/new_wx/ctrls/toastCtrl"; import { setGlow2 } from "./ShopPanel";
import SceneCtrl from "../../libs/new_wx/ctrls/sceneCtrl";
import { loadSvga } from "../loadSvga";
import getResPath from "../../libs/new_tc/getResPath";
const MIN: number = 1; const MIN: number = 1;
const MAX: number = 100; const MAX: number = 100;
...@@ -134,6 +135,7 @@ export default class RechargePanel extends Panel { ...@@ -134,6 +135,7 @@ export default class RechargePanel extends Panel {
this.setNumBtn(); this.setNumBtn();
this.numLabel.text = '' + this.nowNumber; this.numLabel.text = '' + this.nowNumber;
this.btnLabel.text = `-${this.nowNumber * 10}云钻`; this.btnLabel.text = `-${this.nowNumber * 10}云钻`;
setGlow2(this.btnLabel,0xff7038,1);
} }
private onTouchBtn(e: egret.TouchEvent) { private onTouchBtn(e: egret.TouchEvent) {
...@@ -179,14 +181,14 @@ export default class RechargePanel extends Panel { ...@@ -179,14 +181,14 @@ export default class RechargePanel extends Panel {
} }
private getYunZuan() { private getYunZuan() {
this.zuanLabel.text = '我的云钻:0'; this.zuanLabel.text = '剩余:0';
NetManager.ins.getCloudNum((success, res) => { NetManager.ins.getCloudNum((success, res) => {
if(!success) { if(!success) {
return; return;
} }
const data = res.data; const data = res.data;
this.totalNum = data; this.totalNum = data;
this.zuanLabel.text = `我的云钻${data}`; this.zuanLabel.text = `剩余${data}`;
}) })
} }
......
...@@ -19,6 +19,21 @@ const setGlow = (img: egret.DisplayObject, color: number,alpha:number) => { ...@@ -19,6 +19,21 @@ const setGlow = (img: egret.DisplayObject, color: number,alpha:number) => {
} }
export const setGlow2 = (img: egret.DisplayObject, color: number,alpha:number) => {
// const color = 0x33CCFF; /// 光晕的颜色,十六进制,不包含透明度
// const alpha = 0.8; /// 光晕的颜色透明度,是对 color 参数的透明度设定。有效值为 0.0 到 1.0。例如,0.8 设置透明度值为 80%。
const blurX = 3; /// 水平模糊量。有效值为 0 到 255.0(浮点)
const blurY = 3; /// 垂直模糊量。有效值为 0 到 255.0(浮点)
const strength = 10; /// 压印的强度,值越大,压印的颜色越深,而且发光与背景之间的对比度也越强。有效值为 0 到 255。暂未实现
const quality: number = egret.BitmapFilterQuality.HIGH; /// 应用滤镜的次数,建议用 BitmapFilterQuality 类的常量来体现
const inner = false; /// 指定发光是否为内侧发光,暂未实现
const knockout = false; /// 指定对象是否具有挖空效果,暂未实现
const glowFilter: egret.GlowFilter = new egret.GlowFilter(color, alpha, blurX, blurY,
strength, quality, inner, knockout);
img.filters = [glowFilter];
}
export default class ShopPanel extends Panel { export default class ShopPanel extends Panel {
start(data) { start(data) {
......
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