This commit is contained in:
2025-07-21 22:14:06 +08:00
parent 2f7eb16f22
commit a90dce06f3
16 changed files with 1229 additions and 174 deletions
+23
View File
@@ -0,0 +1,23 @@
import { _decorator, Component, Label, Node, Size, UITransform } from "cc";
const { ccclass, property } = _decorator;
@ccclass("DialogBubble")
export class DialogBubble extends Component {
@property(UITransform)
bg: UITransform = null;
@property(Label)
content: Label = null;
@property(UITransform)
contentT: UITransform = null;
updateBubbleContent(str: string) {
this.content.string = str;
this.content.updateRenderData();
this.bg.setContentSize(
new Size(this.contentT.contentSize.x + 5, this.contentT.contentSize.y + 5)
);
return this.bg.contentSize.y / 2;
}
}