koishi-plugin-vsinger-gacha 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/handbook.js CHANGED
@@ -41,8 +41,8 @@ const LABEL_H = 62;
41
41
  const GAP = 12;
42
42
  const PAD = 24;
43
43
  const HEAD = 128;
44
- const POOL_TITLE_H = 34;
45
- const SERIES_H = 44;
44
+ const POOL_TITLE_H = 46;
45
+ const SERIES_H = 50;
46
46
  const COLS_PER_COL = 8;
47
47
  const COLW = COLS_PER_COL * TW + (COLS_PER_COL - 1) * GAP;
48
48
  const ROWH = TH + LABEL_H;
@@ -236,24 +236,32 @@ async function render({ game, store, uid, displayName, outDir, tagsDir, thumbsDi
236
236
  let prevAct = null;
237
237
  for (const blk of grp) {
238
238
  if (blk.act !== prevAct) {
239
- kit.panel(g, x0, y, COLW, SERIES_H - 8, { radius: 14, fill: 'rgba(255,255,255,0.88)' });
239
+ const sh = SERIES_H - 8;
240
+ kit.panel(g, x0, y + 2, COLW, sh, { radius: 14, fill: 'rgba(255,255,255,0.88)' });
240
241
  g.fillStyle = COLOR.accent;
241
- kit.roundRect(g, x0 + 12, y + 12, 5, SERIES_H - 32, 3);
242
+ kit.roundRect(g, x0 + 12, y + 2 + (sh - 20) / 2, 5, 20, 3);
242
243
  g.fill();
243
244
  g.fillStyle = COLOR.text;
244
- g.font = 'bold 21px VSingerSans, sans-serif';
245
- g.fillText(blk.act, x0 + 26, y + 22);
245
+ g.font = 'bold 20px VSingerSans, sans-serif';
246
+ g.textBaseline = 'middle';
247
+ g.fillText(blk.act, x0 + 26, y + 2 + sh / 2);
248
+ g.textBaseline = 'top';
246
249
  y += SERIES_H;
247
250
  prevAct = blk.act;
248
251
  }
249
252
  // 池标题(玻璃条)
250
- kit.panel(g, x0, y, COLW, POOL_TITLE_H - 10, { radius: 12, fill: 'rgba(255,255,255,0.78)' });
253
+ const ph = POOL_TITLE_H - 10;
254
+ kit.panel(g, x0, y + 1, COLW, ph, { radius: 12, fill: 'rgba(255,255,255,0.78)' });
255
+ g.textBaseline = 'middle';
251
256
  g.fillStyle = COLOR.accent;
252
- g.font = 'bold 21px VSingerSans, sans-serif';
253
- g.fillText(`${blk.pool}`, x0 + 12, y + 12);
257
+ g.font = 'bold 18px VSingerSans, sans-serif';
258
+ g.fillText(kit.fit(g, blk.pool, 'bold 18px VSingerSans, sans-serif', COLW - 100), x0 + 12, y + 1 + ph / 2);
254
259
  g.fillStyle = COLOR.textSub;
255
- g.font = '18px VSingerSans, sans-serif';
256
- g.fillText(`${blk.got}/${blk.arr.length}`, x0 + COLW - 82, y + 14);
260
+ g.font = '16px VSingerSans, sans-serif';
261
+ g.textAlign = 'right';
262
+ g.fillText(`${blk.got}/${blk.arr.length}`, x0 + COLW - 12, y + 1 + ph / 2);
263
+ g.textAlign = 'left';
264
+ g.textBaseline = 'top';
257
265
 
258
266
  for (let i = 0; i < blk.arr.length; i++) {
259
267
  const c = blk.arr[i];
package/lib/render/kit.js CHANGED
@@ -197,12 +197,12 @@ async function card(g, Canvas, o) {
197
197
 
198
198
  g.fillStyle = o.owned === false ? COLOR.textDim : COLOR.text;
199
199
  g.font = `bold ${o.nameSize || FONT_SIZE.h3}px ${FONT}`;
200
- g.fillText(fit(g, o.name, `bold ${o.nameSize || FONT_SIZE.h3}px ${FONT}`, w), o.x, o.y + h + 8);
200
+ g.fillText(fit(g, o.name, `bold ${o.nameSize || FONT_SIZE.h3}px ${FONT}`, w), o.x, o.y + h + 6);
201
201
  if (o.rate != null || o.tierName) {
202
202
  g.fillStyle = tc;
203
203
  g.font = `${o.metaSize || FONT_SIZE.meta}px ${FONT}`;
204
204
  const meta = `${o.tierName || (TIER[tier] || TIER[10]).name}${o.rate != null ? ' ' + o.rate + '%' : ''}`;
205
- g.fillText(fit(g, meta, `${o.metaSize || FONT_SIZE.meta}px ${FONT}`, w), o.x, o.y + h + 32);
205
+ g.fillText(fit(g, meta, `${o.metaSize || FONT_SIZE.meta}px ${FONT}`, w), o.x, o.y + h + 30);
206
206
  }
207
207
  }
208
208
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-vsinger-gacha",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "VSinger 收藏集抽卡 / 签到积分 / 图鉴(Koishi 插件,一次性安装)",
5
5
  "main": "lib/index.js",
6
6
  "files": [