Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4344ea1698 |
@ -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("WebView", "history/prefabs/rules", "Game", null);
|
UIManager.instance.showPopup("rules", "history/prefabs/rules", "Game", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickPaytable() {
|
onClickPaytable() {
|
||||||
AudioManager.instance.playSFX("Click_Menu_menu");
|
AudioManager.instance.playSFX("Click_Menu_menu");
|
||||||
UIManager.instance.showPopup("WebView", "history/prefabs/paytable", "Game", null);
|
UIManager.instance.showPopup("paytable", "history/prefabs/paytable", "Game", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickHistory() {
|
onClickHistory() {
|
||||||
AudioManager.instance.playSFX("Click_Menu_menu");
|
AudioManager.instance.playSFX("Click_Menu_menu");
|
||||||
UIManager.instance.showPopup("WebView", "history/prefabs/history", "Game", null);
|
UIManager.instance.showPopup("history", "history/prefabs/history", "Game", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
isON = true;
|
isON = true;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
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;
|
||||||
|
|
||||||
@ -45,7 +46,7 @@ export class Paytable extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clickClosePaytable() {
|
clickClosePaytable() {
|
||||||
hideToBottom(this.node, () => { this.node.destroy() })
|
hideToBottom(this.node, () => { NodePoolManager.instance.putNodeToPool('paytable', this.node) })
|
||||||
}
|
}
|
||||||
|
|
||||||
// onScrollEnded(scrollView: ScrollView) {
|
// onScrollEnded(scrollView: ScrollView) {
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
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')
|
||||||
@ -51,7 +52,7 @@ export class Rules extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clickCloseRules() {
|
clickCloseRules() {
|
||||||
hideToBottom(this.node, () => { this.node.destroy() })
|
hideToBottom(this.node, () => { NodePoolManager.instance.putNodeToPool('rules', this.node) })
|
||||||
}
|
}
|
||||||
|
|
||||||
onScrolling(scrollView: ScrollView) {
|
onScrolling(scrollView: ScrollView) {
|
||||||
|
|||||||
@ -425,7 +425,7 @@ export function showFromBottom(node: Node) {
|
|||||||
height = 1920;
|
height = 1920;
|
||||||
}
|
}
|
||||||
|
|
||||||
node.position = new Vec3(0, -height / 2)
|
node.position = new Vec3(0, -height)
|
||||||
tween(node).to(0.15, { position: new Vec3() }).start()
|
tween(node).to(0.15, { position: new Vec3() }).start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ 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')
|
||||||
@ -35,6 +36,7 @@ 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) {
|
||||||
@ -158,8 +160,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;
|
||||||
|
|
||||||
@ -171,7 +173,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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user