mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-02-04 14:53:12 +08:00
fix uiManager bug
This commit is contained in:
@@ -153,14 +153,14 @@ export default class UIManager {
|
|||||||
|
|
||||||
async showDialog(dialogName, args, actions) {
|
async showDialog(dialogName, args, actions) {
|
||||||
const className = this.#pages[dialogName];
|
const className = this.#pages[dialogName];
|
||||||
const dialog = await this.getView(className, args, actions?.load, viewName, 'pages');
|
const dialog = await this.getView(className, args, actions?.load, dialogName, 'pages');
|
||||||
|
dialog.centerX = dialog.centerY = 0;
|
||||||
dialog.init(args);
|
dialog.init?.(args);
|
||||||
this.#dialogLayer.addChild(dialog);
|
this.#dialogLayer.addChild(dialog);
|
||||||
|
|
||||||
const open = actions?.open || (async () => {
|
const open = actions?.open || (async () => {
|
||||||
this.#dialogLayer.scaleX = 0;
|
dialog.scaleX = 0;
|
||||||
this.#dialogLayer.scaleY = 0;
|
dialog.scaleY = 0;
|
||||||
await Laya.promises.Tween.to(dialog, { scaleX: 1, scaleY: 1 }, 300, Laya.Ease.backOut);
|
await Laya.promises.Tween.to(dialog, { scaleX: 1, scaleY: 1 }, 300, Laya.Ease.backOut);
|
||||||
});
|
});
|
||||||
await open(dialog);
|
await open(dialog);
|
||||||
|
|||||||
Reference in New Issue
Block a user