add theme switch

This commit is contained in:
Vick Scarlet
2021-12-02 14:35:33 +08:00
parent 488a6054ab
commit acf9b92134
21 changed files with 485 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":83,
"selecteID":89,
"props":{"y":1218,"x":562,"width":1125,"sceneColor":"#000000","sceneBg":"laya/views/view/CyberTheme/CyberMain.png","runtime":"Laya.runtime.ViewBase","height":2436,"anchorY":0.5,"anchorX":0.5},
"nodeParent":-1,
"label":"View",
@@ -18,14 +18,13 @@
"props":{"var":"imgBg","skin":"images/background/background_1@3x.png","name":"imgBg","centerY":0,"centerX":0},
"nodeParent":1,
"label":"Image(imgBg)",
"isOpen":true,
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":67,
"child":[
{
"x":30,
"type":"Animation",
"props":{"y":0,"x":0,"width":1125,"source":"view/CyberTheme/animation/jumpBackground.ani","interval":80,"height":2436,"blendMode":"lighter","autoPlay":true,"alpha":0.3},
"nodeParent":67,
@@ -474,14 +473,13 @@
"props":{"y":0,"x":1100,"width":1,"top":0,"right":0,"height":1},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":84,
"child":[
{
"x":30,
"type":"Box",
"props":{"y":200,"x":-200,"width":225,"var":"btnAchievement","runtime":"Laya.runtime.ScaleButton","name":"btnAchievement","height":90,"anchorY":0.5,"anchorX":0.5},
"nodeParent":84,
@@ -606,6 +604,57 @@
]
}]
}]
},
{
"x":15,
"type":"Box",
"props":{"right":0,"bottom":0},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":88,
"child":[
{
"x":30,
"type":"Box",
"props":{"y":-175,"x":-100,"width":110,"runtime":"Laya.runtime.ScaleButton","height":110,"anchorY":0.5,"anchorX":0.5},
"nodeParent":88,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":89,
"child":[
{
"x":45,
"type":"Box",
"props":{"width":110,"var":"btnThemes","runtime":"Laya.runtime.ColorfulBox","name":"btnThemes","height":110,"centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":89,
"label":"Box(btnThemes)",
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":86,
"child":[
{
"type":"Image",
"props":{"width":90,"skin":"images/icons/icon_themes.png","height":90,"centerY":0,"centerX":0},
"nodeParent":86,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":87,
"child":[
]
}]
}]
}]
}],
"animations":[
{

View File

@@ -2,7 +2,7 @@
"x":0,
"type":"View",
"selectedBox":1,
"selecteID":83,
"selecteID":11,
"props":{"y":1218,"x":562,"width":1125,"sceneColor":"#000000","runtime":"Laya.runtime.ViewBase","height":2436,"anchorY":0.5,"anchorX":0.5},
"nodeParent":-1,
"label":"View",
@@ -15,9 +15,9 @@
{
"x":15,
"type":"Label",
"props":{"var":"labTitle","text":"UI_Title_Remake","name":"labTitle","fontSize":130,"font":"SimHei","color":"#ffffff","centerY":-260,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5},
"props":{"text":"UI_Title_Remake","name":"title","fontSize":130,"font":"SimHei","color":"#ffffff","centerY":-260,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Label(labTitle)",
"label":"Label(title)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
@@ -28,7 +28,7 @@
{
"x":15,
"type":"Label",
"props":{"wordWrap":true,"var":"labSubTitle","text":"UI_Title_Subsequent","right":0,"name":"labSubTitle","left":0,"fontSize":70,"font":"SimHei","color":"#999999","centerY":-120,"anchorY":0.5,"anchorX":0.5,"align":"center"},
"props":{"wordWrap":true,"var":"labSubTitle","text":"UI_Title_Subsequent","right":0,"name":"title","left":0,"fontSize":70,"font":"SimHei","color":"#999999","centerY":-120,"anchorY":0.5,"anchorX":0.5,"align":"center"},
"nodeParent":1,
"label":"Label(labSubTitle)",
"isDirectory":false,
@@ -195,14 +195,13 @@
"props":{"width":160,"left":50,"height":160,"bottom":50},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isOpen":false,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":92,
"child":[
{
"x":30,
"type":"Box",
"props":{"width":160,"var":"btnDiscord","runtime":"Laya.runtime.ScaleButton","name":"btnDiscord","height":160,"centerY":0,"centerX":0,"anchorY":0.5,"anchorX":0.5},
"nodeParent":92,
@@ -226,6 +225,32 @@
]
}]
}]
},
{
"x":15,
"type":"Box",
"props":{"width":110,"var":"btnThemes","runtime":"Laya.runtime.ColorfulBox","right":50,"name":"btnThemes","height":110,"bottom":50,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnThemes)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":96,
"child":[
{
"x":30,
"type":"Image",
"props":{"width":90,"skin":"images/icons/icon_themes.png","height":90,"centerY":0,"centerX":0},
"nodeParent":96,
"label":"Image",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":98,
"child":[
]
}]
}],
"animations":[
{

View File

@@ -0,0 +1,6 @@
{
"type":"View",
"props":{"width":800,"sceneColor":"#000000","height":400},
"child":[
]
}

141
laya/pages/view/Themes.ui Normal file
View File

@@ -0,0 +1,141 @@
{
"x":0,
"type":"Dialog",
"selectedBox":1,
"selecteID":13,
"props":{"width":350,"sceneColor":"#000000","height":550},
"nodeParent":-1,
"label":"Dialog",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":1,
"child":[
{
"x":15,
"type":"Box",
"props":{"top":20,"right":20,"left":20,"bottom":130},
"nodeParent":1,
"label":"Box",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":6,
"child":[
{
"x":30,
"type":"RadioGroup",
"props":{"var":"radioTheme","name":"radioTheme","height":380,"centerY":0,"centerX":0},
"nodeParent":6,
"label":"RadioGroup(radioTheme)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":13,
"child":[
{
"x":45,
"type":"Radio",
"props":{"width":300,"top":0,"skin":"images/radio/radio_cyber.png","name":"item0","height":100},
"nodeParent":13,
"label":"Radio(item0)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":10,
"child":[
]
},
{
"x":45,
"type":"Radio",
"props":{"width":300,"skin":"images/radio/radio_dark.png","name":"item1","height":100,"centerY":0},
"nodeParent":13,
"label":"Radio(item1)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":11,
"child":[
]
},
{
"x":45,
"type":"Radio",
"props":{"width":300,"skin":"images/radio/radio_light.png","name":"item2","height":100,"bottom":0},
"nodeParent":13,
"label":"Radio(item2)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":12,
"child":[
]
}]
}]
},
{
"x":15,
"type":"Box",
"props":{"width":90,"var":"btnOK","runtime":"Laya.runtime.ColorfulBox","name":"btnSmall","left":20,"height":90,"bottom":20,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnOK)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":2,
"child":[
{
"x":30,
"type":"Label",
"props":{"text":"√","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5},
"nodeParent":2,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":3,
"child":[
]
}]
},
{
"x":15,
"type":"Box",
"props":{"width":90,"var":"btnClose","runtime":"Laya.runtime.ColorfulBox","right":20,"name":"btnSmall","height":90,"bottom":20,"anchorY":0.5,"anchorX":0.5},
"nodeParent":1,
"label":"Box(btnClose)",
"isOpen":true,
"isDirectory":true,
"isAniNode":true,
"hasChild":true,
"compId":14,
"child":[
{
"x":30,
"type":"Label",
"props":{"text":"×","name":"label","fontSize":50,"font":"SimHei","color":"#ffffff","centerY":0,"centerX":0,"bold":true,"anchorY":0.5,"anchorX":0.5},
"nodeParent":14,
"label":"Label(label)",
"isDirectory":false,
"isAniNode":true,
"hasChild":false,
"compId":15,
"child":[
]
}]
}],
"animations":[
{
"nodes":[
],
"name":"ani1",
"id":1,
"frameRate":24,
"action":0
}]
}