fix: 按 B 报错

This commit is contained in:
unanmed 2025-05-27 15:51:08 +08:00
parent 5fdeee045d
commit 7d94f6026c
4 changed files with 5 additions and 2 deletions

View File

@ -431,7 +431,7 @@ export interface WaitBoxExpose<T> {
} }
const waitBoxProps = { const waitBoxProps = {
props: ['promise', 'loc', 'winskin', 'color', 'border'], props: ['promise', 'loc', 'winskin', 'color', 'border', 'width'],
emits: ['resolve'] emits: ['resolve']
} satisfies SetupComponentOptions< } satisfies SetupComponentOptions<
WaitBoxProps<unknown>, WaitBoxProps<unknown>,

View File

@ -956,6 +956,8 @@ export class TextContentParser {
* @param breakIndex * @param breakIndex
*/ */
private checkLineWidth(width: number, guess: number, pointer: number) { private checkLineWidth(width: number, guess: number, pointer: number) {
console.log(guess);
const breakIndex = this.wordBreak.length - 1; const breakIndex = this.wordBreak.length - 1;
if (breakIndex === -1) return true; if (breakIndex === -1) return true;
const rest = width - this.lineWidth; const rest = width - this.lineWidth;

View File

@ -180,6 +180,7 @@ export class Winskin extends RenderItem<EWinskinEvent> {
private generatePattern() { private generatePattern() {
const pattern = this.requireCanvas(); const pattern = this.requireCanvas();
pattern.setScale(1);
const img = this.image; const img = this.image;
pattern.size(32, 16); pattern.size(32, 16);
pattern.setHD(false); pattern.setHD(false);

View File

@ -185,7 +185,7 @@ export async function openStatistics(controller: IUIMountable) {
}); });
const data = await waitbox( const data = await waitbox(
controller, controller,
[240 + 180, void 0, void 0, 240, 0.5, 0.5], [240 + 180, 240, void 0, void 0, 0.5, 0.5],
240, 240,
cal, cal,
{ {