Commit 154925d4 authored by wildfirecode13's avatar wildfirecode13

u

parent 04bfa569
No preview for this file type
No preview for this file type
......@@ -12,6 +12,10 @@
"keys": "comCloseBtn.png,index_box.png,index_prizeitembg.png,sharemask.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,知道啦.png",
"name": "common"
},
{
"keys": "cost_bg.png,cost_close.png,cost_open.png",
"name": "cost"
},
{
"keys": "index_bg.png,index_bg2.png,index_logo1.png,index_logo2.png,index_opentips.png,index_prizebg.png,index_record.png,index_rule.png,index_sharetips.png",
"name": "index"
......@@ -20,10 +24,22 @@
"keys": "进度条.png,进度条底.png",
"name": "loading"
},
{
"keys": "newRule_bg.png,newRule_close.png",
"name": "newRule"
},
{
"keys": "noprize_bg.png,noprize_close.png,noprize_ok.png",
"name": "noprize"
},
{
"keys": "playBg.jpg",
"name": "playScene"
},
{
"keys": "prize_bg.png,prize_bg2.png,prize_close.png,prize_open.png",
"name": "prize"
},
{
"keys": "share_bg.png,share_close.png,share_go.png",
"name": "share"
......
{"x":0,"y":0,"type":"container","children":[{"name":"RulePanel","x":0,"y":0,"type":"container","children":[{"name":"ruleBg","x":28,"y":248,"type":"sprite","props":{"source":"ruleBg.png"}},{"name":"规则内容","x":74,"y":369,"type":"text","props":{"text":"游戏规则\n","size":30,"fillColor":"#000000","textAlpha":1},"id":"ruleTxt"},{"name":"我知道了","x":164,"y":1197,"type":"button","props":{"tUp":"我知道了.png"},"id":"knowBtn"},{"name":"关闭按钮","x":625,"y":272,"type":"button","props":{"tUp":"关闭按钮.png"},"id":"closeBtn"}]},{"name":"StartScene","x":0,"y":0,"type":"container","children":[{"name":"startSceneBg","x":0,"y":0,"type":"sprite","props":{"source":"startSceneBg.jpg"}},{"name":"底部按钮区","x":0,"y":1242,"type":"container","children":[{"name":"底部按钮区背景","x":0,"y":0,"type":"sprite","props":{"source":"底部按钮区背景.png"}},{"name":"icon","x":56,"y":35,"type":"container","children":[{"name":"赚次数按钮","x":547,"y":0,"type":"button","props":{"tUp":"赚次数按钮.png"},"id":"taskBtn"},{"name":"运动锦鲤按钮","x":258,"y":0,"type":"button","props":{"tUp":"运动锦鲤按钮.png"},"id":"lotBtn"},{"name":"排行榜按钮","x":0,"y":0,"type":"button","props":{"tUp":"排行榜按钮.png"},"id":"rankBtn"}]}]},{"name":"timesTxt","x":286,"y":1205,"type":"text","props":{"text":"剩余次数:3次","size":16.00722,"fillColor":"#ffffff","textAlpha":1},"id":"timesTxt"},{"name":"开始游戏","x":171,"y":1052,"type":"button","props":{"tUp":"开始游戏.png"},"id":"startBtn"},{"name":"规则按钮","x":621,"y":212,"type":"button","props":{"tUp":"规则按钮.png"},"id":"ruleBtn"},{"name":"奖品按钮","x":11,"y":212,"type":"button","props":{"tUp":"奖品按钮.png"},"id":"recordBtn"}]},{"name":"share","x":126,"y":508,"type":"container","children":[{"name":"share_bg","x":0,"y":0,"type":"sprite","props":{"source":"share_bg.png"}},{"name":"share_go","x":139,"y":458,"type":"sprite","props":{"source":"share_go.png"}},{"name":"share_tips","x":122,"y":299,"type":"text","props":{"text":"获得一次拆盲盒机会","size":28,"fillColor":"#000000","textAlpha":1}},{"name":"share_close","x":216,"y":635,"type":"sprite","props":{"source":"share_close.png"}}]},{"name":"index","x":0,"y":0,"type":"container","children":[{"name":"index_bg","x":0,"y":0,"type":"sprite","props":{"source":"index_bg.png"}},{"name":"index_bg2","x":31,"y":424,"type":"sprite","props":{"source":"index_bg2.png"}},{"name":"index_moneytips2","x":608,"y":1133,"type":"text","props":{"text":"XX","size":32,"fillColor":"#000000","textAlpha":1}},{"name":"index_moneytips","x":490,"y":1133,"type":"text","props":{"text":"我的积分:","size":24,"fillColor":"#000000","textAlpha":1}},{"name":"index_timestips2","x":255,"y":1132,"type":"text","props":{"text":"XX","size":32,"fillColor":"#000000","textAlpha":1}},{"name":"index_timestips","x":137,"y":1132,"type":"text","props":{"text":"剩余次数:","size":24,"fillColor":"#000000","textAlpha":1}},{"name":"index_costtips","x":322,"y":434,"type":"text","props":{"text":"XX积分/次","size":30,"fillColor":"#000000","textAlpha":1}},{"name":"index_prizebg","x":31,"y":1256,"type":"sprite","props":{"source":"index_prizebg.png"}},{"name":"index_opentips","x":200,"y":1206,"type":"sprite","props":{"source":"index_opentips.png"}},{"name":"index_logo2","x":173,"y":291,"type":"sprite","props":{"source":"index_logo2.png"}},{"name":"index_logo1","x":237,"y":215,"type":"sprite","props":{"source":"index_logo1.png"}},{"name":"index_rule","x":0,"y":230,"type":"sprite","props":{"source":"index_rule.png"}},{"name":"index_record","x":608,"y":230,"type":"sprite","props":{"source":"index_record.png"}},{"name":"index_sharetips","x":184,"y":1187,"type":"sprite","props":{"source":"index_sharetips.png"}}]}]}
{"x":0,"y":0,"type":"container","children":[{"name":"RulePanel","x":0,"y":0,"type":"container","children":[{"name":"ruleBg","x":28,"y":248,"type":"sprite","props":{"source":"ruleBg.png"}},{"name":"规则内容","x":74,"y":369,"type":"text","props":{"text":"游戏规则\n","size":30,"fillColor":"#000000","textAlpha":1},"id":"ruleTxt"},{"name":"我知道了","x":164,"y":1197,"type":"button","props":{"tUp":"我知道了.png"},"id":"knowBtn"},{"name":"关闭按钮","x":625,"y":272,"type":"button","props":{"tUp":"关闭按钮.png"},"id":"closeBtn"}]},{"name":"StartScene","x":0,"y":0,"type":"container","children":[{"name":"startSceneBg","x":0,"y":0,"type":"sprite","props":{"source":"startSceneBg.jpg"}},{"name":"底部按钮区","x":0,"y":1242,"type":"container","children":[{"name":"底部按钮区背景","x":0,"y":0,"type":"sprite","props":{"source":"底部按钮区背景.png"}},{"name":"icon","x":56,"y":35,"type":"container","children":[{"name":"赚次数按钮","x":547,"y":0,"type":"button","props":{"tUp":"赚次数按钮.png"},"id":"taskBtn"},{"name":"运动锦鲤按钮","x":258,"y":0,"type":"button","props":{"tUp":"运动锦鲤按钮.png"},"id":"lotBtn"},{"name":"排行榜按钮","x":0,"y":0,"type":"button","props":{"tUp":"排行榜按钮.png"},"id":"rankBtn"}]}]},{"name":"timesTxt","x":286,"y":1205,"type":"text","props":{"text":"剩余次数:3次","size":16.00722,"fillColor":"#ffffff","textAlpha":1},"id":"timesTxt"},{"name":"开始游戏","x":171,"y":1052,"type":"button","props":{"tUp":"开始游戏.png"},"id":"startBtn"},{"name":"规则按钮","x":621,"y":212,"type":"button","props":{"tUp":"规则按钮.png"},"id":"ruleBtn"},{"name":"奖品按钮","x":11,"y":212,"type":"button","props":{"tUp":"奖品按钮.png"},"id":"recordBtn"}]},{"name":"share","x":126,"y":508,"type":"container","children":[{"name":"share_bg","x":0,"y":0,"type":"sprite","props":{"source":"share_bg.png"}},{"name":"share_go","x":139,"y":458,"type":"sprite","props":{"source":"share_go.png"}},{"name":"share_tips","x":122,"y":299,"type":"text","props":{"text":"获得一次拆盲盒机会","size":28,"fillColor":"#000000","textAlpha":1}},{"name":"share_close","x":216,"y":635,"type":"sprite","props":{"source":"share_close.png"}}]},{"name":"index","x":0,"y":0,"type":"container","children":[{"name":"index_bg","x":0,"y":0,"type":"sprite","props":{"source":"index_bg.png"}},{"name":"index_bg2","x":31,"y":424,"type":"sprite","props":{"source":"index_bg2.png"}},{"name":"index_moneytips2","x":608,"y":1133,"type":"text","props":{"text":"XX","size":32,"fillColor":"#000000","textAlpha":1}},{"name":"index_moneytips","x":490,"y":1133,"type":"text","props":{"text":"我的积分:","size":24,"fillColor":"#000000","textAlpha":1}},{"name":"index_timestips2","x":255,"y":1132,"type":"text","props":{"text":"XX","size":32,"fillColor":"#000000","textAlpha":1}},{"name":"index_timestips","x":137,"y":1132,"type":"text","props":{"text":"剩余次数:","size":24,"fillColor":"#000000","textAlpha":1}},{"name":"index_costtips","x":322,"y":434,"type":"text","props":{"text":"XX积分/次","size":30,"fillColor":"#000000","textAlpha":1}},{"name":"index_prizebg","x":31,"y":1256,"type":"sprite","props":{"source":"index_prizebg.png"}},{"name":"index_opentips","x":200,"y":1206,"type":"sprite","props":{"source":"index_opentips.png"}},{"name":"index_logo2","x":173,"y":291,"type":"sprite","props":{"source":"index_logo2.png"}},{"name":"index_logo1","x":237,"y":215,"type":"sprite","props":{"source":"index_logo1.png"}},{"name":"index_rule","x":0,"y":230,"type":"sprite","props":{"source":"index_rule.png"}},{"name":"index_record","x":608,"y":230,"type":"sprite","props":{"source":"index_record.png"}},{"name":"index_sharetips","x":184,"y":1187,"type":"sprite","props":{"source":"index_sharetips.png"}}]},{"name":"cost","x":126,"y":508,"type":"container","children":[{"name":"cost_bg","x":0,"y":0,"type":"sprite","props":{"source":"cost_bg.png"}},{"name":"cost_tips","x":133,"y":296,"type":"text","props":{"text":"消耗10积分拆开1个盲盒","size":24,"fillColor":"#000000","textAlpha":1}},{"name":"cost_open","x":139,"y":455,"type":"sprite","props":{"source":"cost_open.png"}},{"name":"cost_close","x":216,"y":635,"type":"sprite","props":{"source":"cost_close.png"}}]},{"name":"prize","x":9,"y":447,"type":"container","children":[{"name":"prize_bg2","x":0,"y":0,"type":"sprite","props":{"source":"prize_bg2.png"}},{"name":"prize_bg","x":78,"y":23,"type":"sprite","props":{"source":"prize_bg.png"}},{"name":"prize_tips","x":251,"y":565,"type":"text","props":{"text":"请在中奖后24小时内领取~","size":22,"fillColor":"#000000","textAlpha":1}},{"name":"prize_close","x":333,"y":696,"type":"sprite","props":{"source":"prize_close.png"}},{"name":"prize_open","x":256,"y":500,"type":"sprite","props":{"source":"prize_open.png"}},{"name":"prize_name","x":325,"y":454,"type":"text","props":{"text":"奖品名称","size":24,"fillColor":"#000000","textAlpha":1}}]},{"name":"noprize","x":126,"y":508,"type":"container","children":[{"name":"noprize_bg","x":0,"y":0,"type":"sprite","props":{"source":"noprize_bg.png"}},{"name":"noprize_ok","x":139,"y":455,"type":"sprite","props":{"source":"noprize_ok.png"}},{"name":"noprize_close","x":216,"y":635,"type":"sprite","props":{"source":"noprize_close.png"}}]},{"name":"newRule","x":110,"y":463,"type":"container","children":[{"name":"newRule_bg","x":0,"y":0,"type":"sprite","props":{"source":"newRule_bg.png"}},{"name":"newRule_tips","x":51,"y":158,"type":"text","props":{"text":"加载中... ...","size":24,"fillColor":"#000000","textAlpha":1}},{"name":"newRule_close","x":232,"y":772,"type":"sprite","props":{"source":"newRule_close.png"}}]}]}
......@@ -52,8 +52,8 @@ export class Main {
if(getQueryParams().iscustom) {
console.log('fuck');
sendWebNet(WebNetName.login,{
appID:getUrlParams("appID"),
unionid:1,
appId:getUrlParams("appID"),
unionid:'oIbvOt3D_z7AfHz9lI6VmDEeYDIk',
redirectUrl:'https://www.baidu.com/'
});
return;
......
......@@ -2,396 +2,48 @@ export const ResJson = {
"groups": [
{
"keys": "ruleBg.png,我知道了.png",
"name": "RulePanel",
"atlas": {
"ruleBg.png": {
"x": 2,
"y": 2,
"w": 680,
"h": 1120,
"ox": 0,
"oy": 0,
"sw": 680,
"sh": 1120,
"ro": false
},
"我知道了.png": {
"x": 684,
"y": 2,
"w": 412,
"h": 114,
"ox": 0,
"oy": 0,
"sw": 412,
"sh": 114,
"ro": true
}
}
"name": "RulePanel"
},
{
"keys": "startSceneBg.jpg,奖品按钮.png,底部按钮区背景.png,开始游戏.png,排行榜按钮.png,规则按钮.png,赚次数按钮.png,运动锦鲤按钮.png",
"name": "StartScene",
"atlas": {
"底部按钮区背景.png": {
"x": 2,
"y": 2,
"w": 750,
"h": 191,
"ox": 0,
"oy": 0,
"sw": 750,
"sh": 191,
"ro": false
},
"开始游戏.png": {
"x": 2,
"y": 195,
"w": 413,
"h": 149,
"ox": 0,
"oy": 0,
"sw": 413,
"sh": 149,
"ro": false
},
"运动锦鲤按钮.png": {
"x": 417,
"y": 195,
"w": 121,
"h": 117,
"ox": 0,
"oy": 0,
"sw": 121,
"sh": 117,
"ro": true
},
"奖品按钮.png": {
"x": 536,
"y": 195,
"w": 119,
"h": 44,
"ox": 0,
"oy": 0,
"sw": 119,
"sh": 44,
"ro": true
},
"规则按钮.png": {
"x": 582,
"y": 195,
"w": 119,
"h": 44,
"ox": 0,
"oy": 0,
"sw": 119,
"sh": 44,
"ro": true
},
"排行榜按钮.png": {
"x": 628,
"y": 195,
"w": 91,
"h": 117,
"ox": 0,
"oy": 0,
"sw": 91,
"sh": 117,
"ro": true
},
"赚次数按钮.png": {
"x": 2,
"y": 346,
"w": 92,
"h": 117,
"ox": 0,
"oy": 0,
"sw": 92,
"sh": 117,
"ro": true
}
}
"name": "StartScene"
},
{
"keys": "comCloseBtn.png,index_box.png,index_prizeitembg.png,sharemask.png,toastBg.png,waitingBg.png,waitingRot.png,关闭按钮.png,知道啦.png",
"name": "common",
"atlas": {
"toastBg.png": {
"x": 2,
"y": 2,
"w": 460,
"h": 130,
"ox": 0,
"oy": 0,
"sw": 460,
"sh": 130,
"ro": false
},
"知道啦.png": {
"x": 2,
"y": 134,
"w": 306,
"h": 102,
"ox": 0,
"oy": 0,
"sw": 306,
"sh": 102,
"ro": false
},
"sharemask.png": {
"x": 2,
"y": 238,
"w": 248,
"h": 229,
"ox": 0,
"oy": 0,
"sw": 248,
"sh": 229,
"ro": false
},
"index_box.png": {
"x": 252,
"y": 238,
"w": 181,
"h": 198,
"ox": 0,
"oy": 0,
"sw": 181,
"sh": 198,
"ro": true
},
"waitingBg.png": {
"x": 464,
"y": 2,
"w": 160,
"h": 180,
"ox": 0,
"oy": 0,
"sw": 160,
"sh": 180,
"ro": false
},
"index_prizeitembg.png": {
"x": 452,
"y": 184,
"w": 131,
"h": 131,
"ox": 0,
"oy": 0,
"sw": 131,
"sh": 131,
"ro": false
},
"关闭按钮.png": {
"x": 310,
"y": 134,
"w": 60,
"h": 60,
"ox": 0,
"oy": 0,
"sw": 60,
"sh": 60,
"ro": false
},
"waitingRot.png": {
"x": 372,
"y": 134,
"w": 56,
"h": 56,
"ox": 0,
"oy": 0,
"sw": 56,
"sh": 56,
"ro": false
},
"comCloseBtn.png": {
"x": 452,
"y": 317,
"w": 48,
"h": 48,
"ox": 0,
"oy": 0,
"sw": 48,
"sh": 48,
"ro": false
}
}
"name": "common"
},
{
"keys": "cost_bg.png,cost_close.png,cost_open.png",
"name": "cost"
},
{
"keys": "index_bg.png,index_bg2.png,index_logo1.png,index_logo2.png,index_opentips.png,index_prizebg.png,index_record.png,index_rule.png,index_sharetips.png",
"name": "index",
"atlas": {
"index_bg.png": {
"x": 2,
"y": 2,
"w": 750,
"h": 1624,
"ox": 0,
"oy": 0,
"sw": 750,
"sh": 1624,
"ro": false
},
"index_bg2.png": {
"x": 754,
"y": 2,
"w": 687,
"h": 751,
"ox": 0,
"oy": 0,
"sw": 687,
"sh": 751,
"ro": false
},
"index_prizebg.png": {
"x": 754,
"y": 755,
"w": 687,
"h": 154,
"ox": 0,
"oy": 0,
"sw": 687,
"sh": 154,
"ro": false
},
"index_logo2.png": {
"x": 754,
"y": 911,
"w": 405,
"h": 121,
"ox": 0,
"oy": 0,
"sw": 405,
"sh": 121,
"ro": false
},
"index_sharetips.png": {
"x": 1161,
"y": 911,
"w": 383,
"h": 113,
"ox": 0,
"oy": 0,
"sw": 383,
"sh": 113,
"ro": true
},
"index_opentips.png": {
"x": 754,
"y": 1034,
"w": 350,
"h": 29,
"ox": 0,
"oy": 0,
"sw": 350,
"sh": 29,
"ro": false
},
"index_logo1.png": {
"x": 1106,
"y": 1034,
"w": 276,
"h": 39,
"ox": 0,
"oy": 0,
"sw": 276,
"sh": 39,
"ro": true
},
"index_record.png": {
"x": 1276,
"y": 911,
"w": 142,
"h": 35,
"ox": 0,
"oy": 0,
"sw": 142,
"sh": 35,
"ro": false
},
"index_rule.png": {
"x": 1276,
"y": 948,
"w": 140,
"h": 35,
"ox": 0,
"oy": 0,
"sw": 140,
"sh": 35,
"ro": false
}
}
"name": "index"
},
{
"keys": "进度条.png,进度条底.png",
"name": "loading",
"atlas": {
"进度条底.png": {
"x": 2,
"y": 2,
"w": 584,
"h": 24,
"ox": 0,
"oy": 0,
"sw": 584,
"sh": 24,
"ro": false
},
"进度条.png": {
"x": 2,
"y": 28,
"w": 580,
"h": 20,
"ox": 0,
"oy": 0,
"sw": 580,
"sh": 20,
"ro": false
}
}
"name": "loading"
},
{
"keys": "newRule_bg.png,newRule_close.png",
"name": "newRule"
},
{
"keys": "noprize_bg.png,noprize_close.png,noprize_ok.png",
"name": "noprize"
},
{
"keys": "playBg.jpg",
"name": "playScene"
},
{
"keys": "prize_bg.png,prize_bg2.png,prize_close.png,prize_open.png",
"name": "prize"
},
{
"keys": "share_bg.png,share_close.png,share_go.png",
"name": "share",
"atlas": {
"share_bg.png": {
"x": 2,
"y": 2,
"w": 482,
"h": 580,
"ox": 0,
"oy": 0,
"sw": 482,
"sh": 580,
"ro": false
},
"share_go.png": {
"x": 486,
"y": 2,
"w": 220,
"h": 53,
"ox": 0,
"oy": 0,
"sw": 220,
"sh": 53,
"ro": true
},
"share_close.png": {
"x": 541,
"y": 2,
"w": 67,
"h": 66,
"ox": 0,
"oy": 0,
"sw": 67,
"sh": 66,
"ro": true
}
}
"name": "share"
}
],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1628762548/resource/"
"path": "./resource/"
}
\ No newline at end of file
......@@ -363,6 +363,196 @@ export const SkinJson ={
}
}
]
},
{
"name": "cost",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "cost_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "cost_bg.png"
}
},
{
"name": "cost_tips",
"x": 133,
"y": 296,
"type": "text",
"props": {
"text": "消耗10积分拆开1个盲盒",
"size": 24,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "cost_open",
"x": 139,
"y": 455,
"type": "sprite",
"props": {
"source": "cost_open.png"
}
},
{
"name": "cost_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "cost_close.png"
}
}
]
},
{
"name": "prize",
"x": 9,
"y": 447,
"type": "container",
"children": [
{
"name": "prize_bg2",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "prize_bg2.png"
}
},
{
"name": "prize_bg",
"x": 78,
"y": 23,
"type": "sprite",
"props": {
"source": "prize_bg.png"
}
},
{
"name": "prize_tips",
"x": 251,
"y": 565,
"type": "text",
"props": {
"text": "请在中奖后24小时内领取~",
"size": 22,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"name": "prize_close",
"x": 333,
"y": 696,
"type": "sprite",
"props": {
"source": "prize_close.png"
}
},
{
"name": "prize_open",
"x": 256,
"y": 500,
"type": "sprite",
"props": {
"source": "prize_open.png"
}
},
{
"name": "prize_name",
"x": 325,
"y": 454,
"type": "text",
"props": {
"text": "奖品名称",
"size": 24,
"fillColor": "#000000",
"textAlpha": 1
}
}
]
},
{
"name": "noprize",
"x": 126,
"y": 508,
"type": "container",
"children": [
{
"name": "noprize_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "noprize_bg.png"
}
},
{
"name": "noprize_ok",
"x": 139,
"y": 455,
"type": "sprite",
"props": {
"source": "noprize_ok.png"
}
},
{
"name": "noprize_close",
"x": 216,
"y": 635,
"type": "sprite",
"props": {
"source": "noprize_close.png"
}
}
]
},
{
"name": "newRule",
"x": 110,
"y": 463,
"type": "container",
"children": [
{
"name": "newRule_bg",
"x": 0,
"y": 0,
"type": "sprite",
"props": {
"source": "newRule_bg.png"
}
},
{
"id": "ruleTxt",
"name": "newRule_tips",
"x": 51,
"y": 158,
"type": "text",
"props": {
"text": "加载中... ...",
"size": 24,
"fillColor": "#000000",
"textAlpha": 1
}
},
{
"id": "closeBtn",
"name": "newRule_close",
"x": 232,
"y": 772,
"type": "sprite",
"props": {
"source": "newRule_close.png"
}
}
]
}
]
}
\ No newline at end of file
const func = (txt,width,offset)=>{
txt.x = offset || 0;
txt.textWidth = width || 750;
txt.textAlign = 'center';
}
export default (txt, width?,offset?) => {
if (txt instanceof Array) {
txt.forEach(item=>func(item,width,offset))
} else {
func(txt,width,offset)
}
}
\ No newline at end of file
import { RES } from "../../module/RES";
import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField";
import getObject from "../common/getObject";
let section;
export class CostPanel extends Panel {
share_share_go(){
console.log('share_share_go');
}
get groupNames() { return ["cost"] }
get skinName() { return "cost" }
initUi() {
super.initUi();
var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y);
centerTextField(getObject(this,'cost_tips'),496);
}
initEvents() {
super.initEvents();
// getObject(this, 'share_fail_btn').addEventListener(FYGE.MouseEvent.CLICK, this.share_share_go, this);
}
removeEvents() {
super.removeEvents();
// getObject(this, 'share_fail_btn').removeEventListener(FYGE.MouseEvent.CLICK, this.share_share_go, this);
}
protected get closeBtns(): any[] {
return [getObject(this,'cost_close')]
}
}
import { RES } from "../../module/RES";
import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField";
import getObject from "../common/getObject";
let section;
export class NoPrizePanel extends Panel {
share_share_go(){
console.log('share_share_go');
}
get groupNames() { return ["noprize"] }
get skinName() { return "noprize" }
initUi() {
super.initUi();
var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y);
// centerTextField(getObject(this,'prize_name'),731);
}
initEvents() {
super.initEvents();
// getObject(this, 'share_fail_btn').addEventListener(FYGE.MouseEvent.CLICK, this.share_share_go, this);
}
removeEvents() {
super.removeEvents();
// getObject(this, 'share_fail_btn').removeEventListener(FYGE.MouseEvent.CLICK, this.share_share_go, this);
}
protected get closeBtns(): any[] {
return [getObject(this,'noprize_close')]
}
}
import { RES } from "../../module/RES";
import { Panel } from "../../module/views/Panel";
import centerTextField from "../common/centerTextField";
import getObject from "../common/getObject";
let section;
export class PrizePanel extends Panel {
share_share_go(){
console.log('share_share_go');
}
get groupNames() { return ["prize"] }
get skinName() { return "prize" }
initUi() {
super.initUi();
var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y);
centerTextField(getObject(this,'prize_name'),731);
}
initEvents() {
super.initEvents();
// getObject(this, 'share_fail_btn').addEventListener(FYGE.MouseEvent.CLICK, this.share_share_go, this);
}
removeEvents() {
super.removeEvents();
// getObject(this, 'share_fail_btn').removeEventListener(FYGE.MouseEvent.CLICK, this.share_share_go, this);
}
protected get closeBtns(): any[] {
return [getObject(this,'prize_close')]
}
}
......@@ -2,7 +2,11 @@ import { showPanel } from "../../module/ctrls";
import { RES } from "../../module/RES";
import { Scene } from "../../module/views/Scene";
import getObject from "../common/getObject";
import { CostPanel } from "../panels/cost";
import { NoPrizePanel } from "../panels/noprize";
import { PrizePanel } from "../panels/prize";
import { SharePanel } from "../panels/share";
import { RulePanel } from "../template/RulePanel";
import { Box } from "./Box";
import { BoxGroup } from "./BoxGroup";
import { ScrollItem } from "./ScrollItem";
......@@ -21,6 +25,8 @@ export class IndexScene extends Scene {
start() {
super.start();
showPanel(RulePanel);
getObject(this,'index_sharetips').visible=false;
this.initContainer();
this.initmask();
......
import { RES } from "../../module/RES";
import { Panel } from "../../module/views/Panel";
import { Tools } from "../Tools";
import { getWebData, sendWebNet } from "../WebNet";
......@@ -5,15 +6,21 @@ import { WebNetName } from "../WebNetName";
let section;
export class RulePanel extends Panel {
get groupNames() { return ["RulePanel"] }
get skinName() { return "RulePanel" }
initUi() {
super.initUi();
var skin = RES.getSkinDataByName(this.skinName);
this.position.set(skin.x, skin.y);
}
get groupNames() { return ["newRule"] }
get skinName() { return "newRule" }
ruleTxt: FYGE.TextField;
knowBtn: FYGE.Button;
closeBtn: FYGE.Button;
//两个按钮都是关闭作用
get closeBtns() {
return [this.closeBtn, this.knowBtn];
return [this.closeBtn];
}
async start(data) {
......@@ -26,24 +33,7 @@ export class RulePanel extends Panel {
this.removeChild(this.ruleTxt);
this.addChild(this.closeBtn);
console.log(this.closeBtn)
//文案
// var scroll = this.addChild(new FYGE.ScrollPage(610, 816, 100, true, false))
// scroll.position.copy(this.ruleTxt.position)
// //加文案
// var txt = scroll.view.addChild(Tools.getText(
// ruleStr,
// 30,//this.ruleTxt.size,
// this.ruleTxt.fillColor,
// FYGE.TEXT_ALIGN.LEFT,
// 610
// ))
// //多行设置
// txt.lineType = FYGE.TEXT_lINETYPE.MULTI;
// //行间距设置
// txt.lineSpacing = 20;
// //滚动最大长度按文本高度
// scroll.maxDistance = txt.textHeight
if (!section) {//避免文案过长,用这种方式
document.getElementById("cusEngine").style.position = "absolute"
......@@ -51,8 +41,8 @@ export class RulePanel extends Panel {
section.id = "rule";
section.style.overflowX = "hidden";
section.style.overflowY = "auto";
section.style.width = 610 + "px";
section.style.height = 816 + "px";
section.style.width = 432 + "px";
section.style.height = 492 + "px";
section.style.lineHeight = 48 + "px";
section.style.fontSize = this.ruleTxt.size + 'px';
section.style.color = this.ruleTxt.fillColor;
......@@ -64,18 +54,3 @@ export class RulePanel extends Panel {
rule.init(section);
}
}
const ruleTemplate = `啊企鹅去欧文u去外婆偶尔u欺骗我如情人坡i去哦日期【人贫穷人品【去哦微软【哦前往平壤【 去哦【让我气泡【让我去【王培荣亲王【人跑去欧文人【强我弱【\n 去哦人权为荣哦破千万人脾气【微软哦亲哦人气泡【 人游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则
游戏规则游戏规则游戏规则游戏规则游戏规则`
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