Compare commits

..

No commits in common. "master" and "v0.0.58" have entirely different histories.

5 changed files with 10 additions and 14 deletions

View File

@ -487,17 +487,17 @@ export class SlotBar extends Component {
onClickRules() { onClickRules() {
AudioManager.instance.playSFX("Click_Menu_menu"); AudioManager.instance.playSFX("Click_Menu_menu");
UIManager.instance.showPopup("rules", "history/prefabs/rules", "Game", null); UIManager.instance.showPopup("WebView", "history/prefabs/rules", "Game", null);
} }
onClickPaytable() { onClickPaytable() {
AudioManager.instance.playSFX("Click_Menu_menu"); AudioManager.instance.playSFX("Click_Menu_menu");
UIManager.instance.showPopup("paytable", "history/prefabs/paytable", "Game", null); UIManager.instance.showPopup("WebView", "history/prefabs/paytable", "Game", null);
} }
onClickHistory() { onClickHistory() {
AudioManager.instance.playSFX("Click_Menu_menu"); AudioManager.instance.playSFX("Click_Menu_menu");
UIManager.instance.showPopup("history", "history/prefabs/history", "Game", null); UIManager.instance.showPopup("WebView", "history/prefabs/history", "Game", null);
} }
isON = true; isON = true;

View File

@ -1,7 +1,6 @@
import { _decorator, Component, EventMouse, JsonAsset, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc'; import { _decorator, Component, EventMouse, JsonAsset, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc';
import { hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools'; import { hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools';
import { getLanguage } from 'db://assets/Main/Scripts/main/comm'; import { getLanguage } from 'db://assets/Main/Scripts/main/comm';
import { NodePoolManager } from 'db://assets/Main/Scripts/managers/NodePoolManager';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ -46,7 +45,7 @@ export class Paytable extends Component {
} }
clickClosePaytable() { clickClosePaytable() {
hideToBottom(this.node, () => { NodePoolManager.instance.putNodeToPool('paytable', this.node) }) hideToBottom(this.node, () => { this.node.destroy() })
} }
// onScrollEnded(scrollView: ScrollView) { // onScrollEnded(scrollView: ScrollView) {

View File

@ -1,7 +1,6 @@
import { _decorator, Component, EventMouse, JsonAsset, Label, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc'; import { _decorator, Component, EventMouse, JsonAsset, Label, Layout, math, Node, ScrollView, UITransform, Widget } from 'cc';
import { getAllRichTexts, hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools'; import { getAllRichTexts, hideToBottom, isBrahmic, updateLang, wrapTextBySpace } from './Tools';
import { getCsymbol, getLanguage } from 'db://assets/Main/Scripts/main/comm'; import { getCsymbol, getLanguage } from 'db://assets/Main/Scripts/main/comm';
import { NodePoolManager } from 'db://assets/Main/Scripts/managers/NodePoolManager';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('Rules') @ccclass('Rules')
@ -52,7 +51,7 @@ export class Rules extends Component {
} }
clickCloseRules() { clickCloseRules() {
hideToBottom(this.node, () => { NodePoolManager.instance.putNodeToPool('rules', this.node) }) hideToBottom(this.node, () => { this.node.destroy() })
} }
onScrolling(scrollView: ScrollView) { onScrolling(scrollView: ScrollView) {

View File

@ -425,7 +425,7 @@ export function showFromBottom(node: Node) {
height = 1920; height = 1920;
} }
node.position = new Vec3(0, -height) node.position = new Vec3(0, -height / 2)
tween(node).to(0.15, { position: new Vec3() }).start() tween(node).to(0.15, { position: new Vec3() }).start()
} }

View File

@ -2,13 +2,12 @@ import { _decorator, director, find, Node, Tween, tween, v3, Vec3 } from 'cc';
import { NodePoolManager } from './NodePoolManager'; import { NodePoolManager } from './NodePoolManager';
import { TipMessagePanel } from '../main/TipMessagePanel'; import { TipMessagePanel } from '../main/TipMessagePanel';
import { I18nManager } from './I18nManager'; import { I18nManager } from './I18nManager';
import { showFromBottom } from 'db://assets/Game/history/scripts/Tools';
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@ccclass('UIManager') @ccclass('UIManager')
export class UIManager { export class UIManager {
private static _instance: UIManager = null; private static _instance: UIManager = null;
static get instance() { static get instance() {
if (this._instance) { if (this._instance) {
return this._instance; return this._instance;
@ -36,7 +35,6 @@ export class UIManager {
} }
this.uiLayer.addChild(prefab); this.uiLayer.addChild(prefab);
showFromBottom(prefab)
let main = prefab.getChildByName('main'); let main = prefab.getChildByName('main');
if (!main) { if (!main) {
@ -160,8 +158,8 @@ export class UIManager {
return controller; return controller;
} }
showTipMessagePanel(title: string, msg: string, isCenter: boolean, confirmCb: () => void, closeCb: () => void, confirmStr: string = I18nManager.instance.t("AID_QUIT_LEFT_BUTTON"), showTipMessagePanel(title: string, msg: string, isCenter: boolean, confirmCb: () => void, closeCb: () => void, confirmStr: string= I18nManager.instance.t("AID_QUIT_LEFT_BUTTON"),
cancelStr: string = I18nManager.instance.t("AID_MAIN_OPERATE_CLOSE"),) { cancelStr: string= I18nManager.instance.t("AID_MAIN_OPERATE_CLOSE"),) {
let scene = director.getScene(); let scene = director.getScene();
if (!scene?.isValid) return; if (!scene?.isValid) return;
@ -173,7 +171,7 @@ export class UIManager {
tipMessagePanelComp.setIsCenter(isCenter); tipMessagePanelComp.setIsCenter(isCenter);
tipMessagePanelComp.setConfirmCallBack(confirmCb); tipMessagePanelComp.setConfirmCallBack(confirmCb);
tipMessagePanelComp.setCloseCallBack(closeCb); tipMessagePanelComp.setCloseCallBack(closeCb);
tipMessagePanelComp.setBtnLabel(isCenter, confirmStr, cancelStr) tipMessagePanelComp.setBtnLabel(isCenter,confirmStr,cancelStr)
tipMessagePanelComp.show(); tipMessagePanelComp.show();
} }