修改部分按钮的展现形式
This commit is contained in:
parent
3e36fc3944
commit
e0e0c0a152
@ -18,33 +18,36 @@
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_level": 1,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 6
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
},
|
||||
{
|
||||
"__id__": 8
|
||||
},
|
||||
{
|
||||
"__id__": 9
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
},
|
||||
{
|
||||
"__id__": 11
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 10
|
||||
"__id__": 13
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
@ -83,6 +86,107 @@
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "bg-active",
|
||||
"_objFlags": 0,
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": false,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 20,
|
||||
"height": 21
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": -1,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_rotationX": 0,
|
||||
"_rotationY": 0,
|
||||
"_quat": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_skewX": 0,
|
||||
"_skewY": 0,
|
||||
"groupIndex": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "ef910b74-7518-4046-b523-593f1eb10a6d"
|
||||
},
|
||||
"_type": 1,
|
||||
"_sizeMode": 1,
|
||||
"_fillType": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_state": 0,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__uuid__": "0c374587-de82-47c2-89ba-6219ee24d576"
|
||||
},
|
||||
"fileId": "1dvJ2xcM9Hf4YBdneHr8aK",
|
||||
"sync": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "titleLabel",
|
||||
@ -95,11 +199,11 @@
|
||||
"_level": 4,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
"__id__": 6
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 4
|
||||
"__id__": 7
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_color": {
|
||||
@ -150,7 +254,7 @@
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"node": {
|
||||
"__id__": 2
|
||||
"__id__": 5
|
||||
},
|
||||
"_enabled": true,
|
||||
"_useOriginalSize": false,
|
||||
@ -218,11 +322,15 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"titleLabel": {
|
||||
"__id__": 3
|
||||
"__id__": 6
|
||||
},
|
||||
"border": {
|
||||
"__id__": 1
|
||||
"btnSprite": {
|
||||
"__id__": 8
|
||||
},
|
||||
"selectSpriteFrame": {
|
||||
"__uuid__": "ef910b74-7518-4046-b523-593f1eb10a6d"
|
||||
},
|
||||
"normalSpriteFrame": null,
|
||||
"title": "KCC",
|
||||
"selected": false,
|
||||
"colors": [
|
||||
@ -235,9 +343,9 @@
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Color",
|
||||
"r": 0,
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 0,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
}
|
||||
],
|
||||
@ -288,7 +396,7 @@
|
||||
"zoomScale": 1.2,
|
||||
"clickEvents": [
|
||||
{
|
||||
"__id__": 9
|
||||
"__id__": 12
|
||||
}
|
||||
],
|
||||
"_N$interactable": true,
|
||||
|
@ -94,7 +94,7 @@
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
@ -195,7 +195,7 @@
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_active": false,
|
||||
"_level": 2,
|
||||
"_components": [
|
||||
{
|
||||
@ -393,7 +393,7 @@
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": false,
|
||||
"_enabled": true,
|
||||
"_srcBlendFactor": 770,
|
||||
"_dstBlendFactor": 771,
|
||||
"_spriteFrame": {
|
||||
@ -425,11 +425,14 @@
|
||||
"titleLabel": {
|
||||
"__id__": 9
|
||||
},
|
||||
"normalLayer": {
|
||||
"__id__": 5
|
||||
"btnSprite": {
|
||||
"__id__": 11
|
||||
},
|
||||
"selectLayer": {
|
||||
"__id__": 2
|
||||
"selectSpriteFrame": {
|
||||
"__uuid__": "89db0d56-124d-4f2b-99a8-a9c433657a84"
|
||||
},
|
||||
"normalSpriteFrame": {
|
||||
"__uuid__": "47eb8576-31c6-4604-89dd-5e8c98a25ac5"
|
||||
},
|
||||
"title": "",
|
||||
"selected": false,
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 1.5 KiB |
@ -17,14 +17,14 @@
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 111,
|
||||
"width": 20,
|
||||
"height": 21,
|
||||
"rawWidth": 111,
|
||||
"rawWidth": 20,
|
||||
"rawHeight": 21,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"borderLeft": 5,
|
||||
"borderRight": 7,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 3.2 KiB |
@ -10,17 +10,17 @@
|
||||
"ver": "1.0.4",
|
||||
"uuid": "47eb8576-31c6-4604-89dd-5e8c98a25ac5",
|
||||
"rawTextureUuid": "7bbc11a0-158b-43ff-987a-1b707b7ee709",
|
||||
"trimType": "auto",
|
||||
"trimType": "custom",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 105,
|
||||
"height": 27,
|
||||
"rawWidth": 105,
|
||||
"rawHeight": 27,
|
||||
"width": 116,
|
||||
"height": 36,
|
||||
"rawWidth": 116,
|
||||
"rawHeight": 36,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
@ -48,7 +48,8 @@ export default class JCWallet {
|
||||
public data: IAccount[] = []
|
||||
|
||||
constructor() {
|
||||
this.web3 = new Web3('https://rpc-mainnet.kcc.network')
|
||||
// this.web3 = new Web3('https://rpc-mainnet.kcc.network')
|
||||
this.web3 = new Web3('https://rpc-testnet.kcc.network')
|
||||
this.erc20Standard = new ERC20Standard(this.web3);
|
||||
this.erc721Standard = new ERC721Standard(this.web3);
|
||||
this.wallet = this.web3.eth.accounts.wallet.load(this.password)
|
||||
@ -61,6 +62,7 @@ export default class JCWallet {
|
||||
this.data = this.dataManage.loadData()
|
||||
}
|
||||
|
||||
|
||||
public init({chains}: {chains: number[]}) {
|
||||
for (let chain of chains) {
|
||||
this.chainSet.add(chain)
|
||||
|
@ -11,10 +11,13 @@ export default class TextBtn extends WalletBase {
|
||||
@property(cc.Label)
|
||||
titleLabel: cc.Label = null;
|
||||
|
||||
@property(cc.Node)
|
||||
normalLayer: cc.Node = null;
|
||||
@property(cc.Node)
|
||||
selectLayer: cc.Node = null;
|
||||
@property(cc.Sprite)
|
||||
btnSprite: cc.Sprite = null
|
||||
|
||||
@property(cc.SpriteFrame)
|
||||
selectSpriteFrame: cc.SpriteFrame = null
|
||||
@property(cc.SpriteFrame)
|
||||
normalSpriteFrame: cc.SpriteFrame = null
|
||||
|
||||
@Watch()
|
||||
@property
|
||||
@ -45,8 +48,11 @@ export default class TextBtn extends WalletBase {
|
||||
this.titleLabel.string = this.title
|
||||
let color = this.selected ? this.colors[1] : this.colors[0];
|
||||
this.titleLabel.node.color = color
|
||||
this.selectLayer && (this.selectLayer.active = this.selected)
|
||||
this.normalLayer && (this.normalLayer.active = !this.selected)
|
||||
if (this.selected) {
|
||||
this.btnSprite.spriteFrame = this.selectSpriteFrame? this.selectSpriteFrame : null
|
||||
} else {
|
||||
this.btnSprite.spriteFrame = this.normalSpriteFrame? this.normalSpriteFrame : null
|
||||
}
|
||||
}
|
||||
|
||||
onClick() {
|
||||
|
@ -4919,8 +4919,8 @@
|
||||
},
|
||||
"_position": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -248,
|
||||
"y": 167,
|
||||
"x": -242,
|
||||
"y": 169,
|
||||
"z": 0
|
||||
},
|
||||
"_scale": {
|
||||
@ -5147,8 +5147,9 @@
|
||||
},
|
||||
"_enabled": true,
|
||||
"titleLabel": null,
|
||||
"normalLayer": null,
|
||||
"selectLayer": null,
|
||||
"btnSprite": null,
|
||||
"selectSpriteFrame": null,
|
||||
"normalSpriteFrame": null,
|
||||
"title": "",
|
||||
"selected": false,
|
||||
"colors": [
|
||||
|
@ -21,8 +21,8 @@ export default class WalletController extends cc.Component {
|
||||
@property(cc.Node)
|
||||
private walletNode: cc.Node = null
|
||||
|
||||
private apiBase = 'https://market.cebg.games'
|
||||
//private apiBase = 'https://game2006api-test.kingsome.cn'
|
||||
// private apiBase = 'https://market.cebg.games'
|
||||
private apiBase = 'https://game2006api-test.kingsome.cn'
|
||||
|
||||
// LIFE-CYCLE CALLBACKS:
|
||||
|
||||
@ -31,8 +31,8 @@ export default class WalletController extends cc.Component {
|
||||
start () {
|
||||
this.walletNode.active = false;
|
||||
this.wallet = new JCWallet();
|
||||
//let chains = CC_DEBUG ? [322, 97] : [321, 56]
|
||||
let chains = [321]
|
||||
let chains = CC_DEBUG ? [322, 97] : [321, 56]
|
||||
// let chains = [321]
|
||||
this.wallet.init({
|
||||
chains
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user