danoniplus 50.5.3 → 51.0.1

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/js/lib/title.js CHANGED
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2026/09/13
8
- * Revised :
8
+ * Revised : 2026/09/23 (v51.0.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -307,7 +307,8 @@ const titleInit = (_initFlg = false) => {
307
307
  g_headerObj.musicSelectUse ? creatorUrl : g_headerObj.creatorUrl),
308
308
 
309
309
  // アーティスト表示
310
- createCreditBtn(`lnkArtist`, `${g_lblNameObj.artist}: ${g_headerObj.artistNames[g_settings.musicIdxNum]}`, g_headerObj.artistUrls[g_settings.musicIdxNum]),
310
+ createCreditBtn(`lnkArtist`, `${g_lblNameObj.artist}: ${g_headerObj.artistNames[g_settings.musicIdxNum]}`,
311
+ g_headerObj.artistUrls[g_settings.musicIdxNum]),
311
312
  );
312
313
  }
313
314
 
@@ -415,8 +416,9 @@ const titleInit = (_initFlg = false) => {
415
416
  const externalWebTitle = () => {
416
417
  if (document.getElementById(`webMusicTitle`) !== null) {
417
418
  webMusicTitle.innerHTML =
418
- `<span style="font-size:${wUnit(32)}">${g_headerObj.musicTitlesForView[g_settings.musicIdxNum].join(`<br>`)}</span><br>
419
- <span style="font-size:${wUnit(16)}">(Artist: <a href="${g_headerObj.artistUrls[g_settings.musicIdxNum]}" target="_blank">${g_headerObj.artistNames[g_settings.musicIdxNum]}</a>)</span>`;
419
+ `<span style="font-size:${wUnit(32)}">${g_headerObj.musicTitlesForView[g_settings.musicIdxNum].join(`<br>`)}</span><br>` +
420
+ `<span style="font-size:${wUnit(16)}">(Artist: <a href="${g_headerObj.artistUrls[g_settings.musicIdxNum]}" target="_blank">` +
421
+ `${g_headerObj.artistNames[g_settings.musicIdxNum]}</a>)</span>`;
420
422
  }
421
423
  };
422
424
 
@@ -445,8 +447,9 @@ const drawTitle = (_titleName = g_headerObj.musicTitleForView, _scoreId = ``) =>
445
447
 
446
448
  // グラデーションの指定がない場合、
447
449
  // 矢印色の1番目と3番目を使ってタイトルをグラデーション
448
- const titlegrd1 = g_headerObj.titlegrds[0] || (g_headerObj[`setColor${_scoreId}Org`] ?
449
- `${g_headerObj[`setColor${_scoreId}Org`][0]}:${g_headerObj[`setColor${_scoreId}Org`][2]}` : `${g_headerObj.setColorOrg[0]}:${g_headerObj.setColorOrg[2]}`);
450
+ const titlegrd1 = g_headerObj.titlegrds[0] || (g_headerObj[`setColor${_scoreId}Org`]
451
+ ? `${g_headerObj[`setColor${_scoreId}Org`][0]}:${g_headerObj[`setColor${_scoreId}Org`][2]}`
452
+ : `${g_headerObj.setColorOrg[0]}:${g_headerObj.setColorOrg[2]}`);
450
453
  const titlegrd2 = g_headerObj.titlegrds[1] || titlegrd1;
451
454
 
452
455
  const titlegrds = [];
@@ -821,7 +824,9 @@ const changeMSelect = (_num, _initFlg = false) => {
821
824
 
822
825
  // 選択方向に合わせて楽曲リスト情報を再取得
823
826
  for (let j = -g_settings.mSelectableTerms; j <= g_settings.mSelectableTerms; j++) {
824
- const idx = g_headerObj.musicIdxList[(j + _num + g_settings.musicIdxNum + g_headerObj.musicIdxList.length * 10) % g_headerObj.musicIdxList.length];
827
+ const idx = g_headerObj.musicIdxList[
828
+ (j + _num + g_settings.musicIdxNum + g_headerObj.musicIdxList.length * 10) % g_headerObj.musicIdxList.length
829
+ ];
825
830
  if (j === 0) {
826
831
  } else {
827
832
  document.getElementById(`btnMusicSelect${j}`).style.fontSize =
@@ -841,7 +846,9 @@ const changeMSelect = (_num, _initFlg = false) => {
841
846
  // 選択した楽曲に対応する譜面番号、製作者情報、曲長を取得
842
847
  g_headerObj.viewLists = [];
843
848
  const keyList = [], creatorList = [], playingFrameList = [], bpmList = [], difNameList = [], diffiList = [], notesList = [];
844
- const targetIdx = g_headerObj.musicIdxList[(g_settings.musicIdxNum + g_headerObj.musicIdxList.length * 20) % g_headerObj.musicIdxList.length];
849
+ const targetIdx = g_headerObj.musicIdxList[
850
+ (g_settings.musicIdxNum + g_headerObj.musicIdxList.length * 20) % g_headerObj.musicIdxList.length
851
+ ];
845
852
  g_headerObj.musicNos.forEach((val, j) => {
846
853
  if ((g_headerObj.musicGroups?.[val] ?? val) === targetIdx) {
847
854
  g_headerObj.viewLists.push(j);
@@ -863,7 +870,7 @@ const changeMSelect = (_num, _initFlg = false) => {
863
870
  // 選択した楽曲の情報表示
864
871
  const idx = g_headerObj.musicIdxList[g_settings.musicIdxNum];
865
872
  document.getElementById(`lblMusicSelect`).innerHTML =
866
- `<span style="font-size:${getFontSize2(g_headerObj.musicTitlesForView[idx].join(`<br>`), g_btnWidth(1 / 2), { maxSiz: 18 })}px;` +
873
+ `<span style="font-size:${wUnit(getFontSize2(g_headerObj.musicTitlesForView[idx].join(`<br>`), g_btnWidth(1 / 2), { maxSiz: 18 }))};` +
867
874
  `font-weight:bold">${g_headerObj.musicTitlesForView[idx].join(`<br>`)}</span>`;
868
875
  document.getElementById(`lblMusicSelectDetail`).innerHTML =
869
876
  `Maker: ${creatorLink} / Artist: <a href="${g_headerObj.artistUrls[idx]}" target="_blank">` +
@@ -1207,37 +1214,50 @@ const preconditionInit = () => {
1207
1214
  // 1ページあたりに表示するオブジェクト数
1208
1215
  const numOfPrecs = Math.round((g_btnWidth(1) / 500) / 2 * 10) * 2;
1209
1216
 
1210
- // ボタン名切り替え
1211
- const switchPreconditions = () => {
1212
- g_settings.preconditionNum = nextPos(g_settings.preconditionNum, 1, Math.round(g_settings.preconditions.length / numOfPrecs) + 1);
1213
- for (let j = 0; j < Math.min(g_settings.preconditions.length, numOfPrecs); j++) {
1214
- if (g_settings.preconditionNum * numOfPrecs + j < g_settings.preconditions.length) {
1215
- document.getElementById(`btnPrecond${j}`).innerHTML =
1216
- g_settings.preconditions[g_settings.preconditionNum * numOfPrecs + j];
1217
- document.getElementById(`btnPrecond${j}`).style.visibility = `visible`;
1218
- } else {
1219
- document.getElementById(`btnPrecond${j}`).style.visibility = `hidden`;
1220
- }
1217
+ // 現在のページのオブジェクト表示ボタンを描画
1218
+ const renderPreconditions = () => {
1219
+ const start = g_settings.preconditionNum * numOfPrecs;
1220
+ const targets = g_settings.preconditions.slice(start, start + numOfPrecs);
1221
+ const w = g_btnWidth(1 / (numOfPrecs / 2 + 1));
1222
+
1223
+ for (let j = 0; j < numOfPrecs; j++) {
1224
+ document.getElementById(`btnPrecond${j}`)?.remove();
1221
1225
  }
1222
- btnPrecond0.click();
1226
+
1227
+ targets.forEach((target, j) => {
1228
+ const siz = getFontSize2(target, w, { maxSiz: 12 });
1229
+ divRoot.appendChild(createCss2Button(`btnPrecond${j}`, target, evt => {
1230
+ for (let k = 0; k < targets.length; k++) {
1231
+ document.getElementById(`btnPrecond${k}`).classList.replace(
1232
+ g_cssObj.button_Reset, g_cssObj.button_Default,
1233
+ );
1234
+ }
1235
+ lblPrecondView.innerHTML = viewKeyStorage(target);
1236
+ lblPrecondView.scrollTop = 0;
1237
+ g_settings.preconditionNumSub = j;
1238
+ evt.target.classList.replace(
1239
+ g_cssObj.button_Default, g_cssObj.button_Reset,
1240
+ );
1241
+ }, {
1242
+ x: g_btnX() + g_btnWidth((j % (numOfPrecs / 2)) / (numOfPrecs / 2 + 1)),
1243
+ y: 70 + Number(j >= numOfPrecs / 2) * 20, w, h: 20, siz,
1244
+ }, g_cssObj.button_Default));
1245
+ });
1246
+
1247
+ if (targets.length > 0) {
1248
+ btnPrecond0.click();
1249
+ }
1250
+ };
1251
+
1252
+ // 次のページへ移動
1253
+ const switchPreconditions = () => {
1254
+ const numOfPages = Math.max(1, Math.ceil(g_settings.preconditions.length / numOfPrecs));
1255
+ g_settings.preconditionNum = nextPos(g_settings.preconditionNum, 1, numOfPages);
1256
+ renderPreconditions();
1223
1257
  };
1224
1258
 
1225
1259
  // オブジェクト表示ボタンの作成
1226
- for (let j = 0; j < Math.min(g_settings.preconditions.length, numOfPrecs); j++) {
1227
- divRoot.appendChild(createCss2Button(`btnPrecond${j}`, g_settings.preconditions[j], evt => {
1228
- for (let k = 0; k < Math.min(g_settings.preconditions.length, numOfPrecs); k++) {
1229
- document.getElementById(`btnPrecond${k}`).classList.replace(g_cssObj.button_Reset, g_cssObj.button_Default);
1230
- }
1231
- lblPrecondView.innerHTML = viewKeyStorage(g_settings.preconditions[g_settings.preconditionNum * numOfPrecs + j]);
1232
- lblPrecondView.scrollTop = 0;
1233
- g_settings.preconditionNumSub = j;
1234
- evt.target.classList.replace(g_cssObj.button_Default, g_cssObj.button_Reset);
1235
- }, {
1236
- x: g_btnX() + g_btnWidth((j % (numOfPrecs / 2)) / (numOfPrecs / 2 + 1)),
1237
- y: 70 + Number(j >= numOfPrecs / 2) * 20, w: g_btnWidth(1 / (numOfPrecs / 2 + 1)), h: 20, siz: 12,
1238
- }, g_cssObj.button_Default));
1239
- }
1240
- btnPrecond0.classList.replace(g_cssObj.button_Default, g_cssObj.button_Reset);
1260
+ renderPreconditions();
1241
1261
 
1242
1262
  // 次のオブジェクト表示群の表示
1243
1263
  divRoot.appendChild(createCss2Button(`btnPrecondNext`, `>`, () => switchPreconditions(), {
@@ -73,10 +73,10 @@ g_customJsObj.option.push(() => {
73
73
 
74
74
  /**
75
75
  * 譜面選択(Difficultyボタン)時カスタム処理
76
- * @param {boolean} _initFlg 譜面変更フラグ (true:譜面変更選択時 / false:画面遷移による移動時)
76
+ * @param {boolean} _chartChangeFlg 譜面変更フラグ (true:譜面変更選択時 / false:画面遷移による移動時)
77
77
  * @param {boolean} _canLoadDifInfoFlg 譜面初期化フラグ (true:譜面設定を再読込 / false:譜面設定を引き継ぐ)
78
78
  */
79
- g_customJsObj.difficulty.push((_initFlg, _canLoadDifInfoFlg) => {
79
+ g_customJsObj.difficulty.push((_chartChangeFlg, _canLoadDifInfoFlg) => {
80
80
 
81
81
  });
82
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "50.5.3",
3
+ "version": "51.0.1",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "jsdelivr": "./js/danoni_main.js",