Commit 2c3d355a authored by rockyl's avatar rockyl

增加弹窗模态层透明度参数

parent fca8e3db
...@@ -291,10 +291,14 @@ export class GameStage extends Node { ...@@ -291,10 +291,14 @@ export class GameStage extends Node {
let pParent = blackLayer.parent; let pParent = blackLayer.parent;
if (hasView) { if (hasView) {
target.addChildAt(blackLayer, target.childNum - 1 - (view ? 0 : 1)); target.addChildAt(blackLayer, target.childNum - 1 - (view ? 0 : 1));
let modalAlpha = 0.7;
if(options && options.hasOwnProperty('modalAlpha')){
modalAlpha = options.modalAlpha;
}
if (!pParent || blackLayer['tween_count'] > 0) { if (!pParent || blackLayer['tween_count'] > 0) {
blackLayer.alpha = 0; blackLayer.alpha = 0;
Tween.get(blackLayer, null, null, true) Tween.get(blackLayer, null, null, true)
.to({alpha: 0.7}, 300); .to({alpha: modalAlpha}, 300);
} }
} else if (pParent) { } else if (pParent) {
Tween.get(blackLayer, null, null, true) Tween.get(blackLayer, null, null, true)
......
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