danoniplus 38.2.2 → 38.3.0

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/danoni_main.js CHANGED
@@ -4,12 +4,12 @@
4
4
  *
5
5
  * Source by tickle
6
6
  * Created : 2018/10/08
7
- * Revised : 2024/12/19
7
+ * Revised : 2025/01/08
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 38.2.2`;
12
- const g_revisedDate = `2024/12/19`;
11
+ const g_version = `Ver 38.3.0`;
12
+ const g_revisedDate = `2025/01/08`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -1107,6 +1107,7 @@ const getFontSize = (_str, _maxWidth, _font = getBasicFont(), _maxFontsize = 64,
1107
1107
  const createDescDiv = (_id, _str, { altId = _id, siz = g_limitObj.mainSiz } = {}) =>
1108
1108
  createDivCss2Label(_id, _str, Object.assign(g_lblPosObj[altId], {
1109
1109
  siz: getFontSize(_str, g_lblPosObj[altId]?.w || g_sWidth, getBasicFont(), siz),
1110
+ pointerEvents: C_DIS_NONE,
1110
1111
  }));
1111
1112
 
1112
1113
  /*-----------------------------------------------------------*/
@@ -2988,8 +2989,10 @@ const headerConvert = _dosObj => {
2988
2989
  // プレイ中のショートカットキー
2989
2990
  obj.keyRetry = setIntVal(getKeyCtrlVal(_dosObj.keyRetry), C_KEY_RETRY);
2990
2991
  obj.keyRetryDef = obj.keyRetry;
2992
+ obj.keyRetryDef2 = obj.keyRetry;
2991
2993
  obj.keyTitleBack = setIntVal(getKeyCtrlVal(_dosObj.keyTitleBack), C_KEY_TITLEBACK);
2992
2994
  obj.keyTitleBackDef = obj.keyTitleBack;
2995
+ obj.keyTitleBackDef2 = obj.keyTitleBack;
2993
2996
 
2994
2997
  // フリーズアローの許容フレーム数設定
2995
2998
  obj.frzAttempt = setIntVal(_dosObj.frzAttempt, C_FRM_FRZATTEMPT);
@@ -6680,6 +6683,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6680
6683
  const divRoot = document.getElementById(`divRoot`);
6681
6684
  g_kcType = _kcType;
6682
6685
  g_currentPage = `keyConfig`;
6686
+ let selectedKc = `Default`;
6683
6687
 
6684
6688
  // 譜面初期情報ロード許可フラグ
6685
6689
  g_canLoadDifInfoFlg = false;
@@ -6845,6 +6849,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6845
6849
  g_currentj = j;
6846
6850
  g_currentk = k;
6847
6851
  g_prevKey = -1;
6852
+ selectedKc = `Default`;
6848
6853
  g_keycons.cursorNum = g_keycons.cursorNumList.findIndex(val => val === g_currentj);
6849
6854
  setKeyConfigCursor();
6850
6855
  }, {
@@ -7000,12 +7005,32 @@ const keyConfigInit = (_kcType = g_kcType) => {
7000
7005
  viewGroup(_type);
7001
7006
  };
7002
7007
 
7008
+ const kcSubX = parseFloat(keyconSprite.style.width) * ((1 - g_keyObj.scale) / 4);
7009
+ const kcSubY = parseFloat(keyconSprite.style.height) / ((1 + g_keyObj.scale) / 2) - parseFloat(keyconSprite.style.height);
7003
7010
  multiAppend(divRoot,
7004
7011
 
7005
7012
  // ショートカットキーメッセージ
7006
- createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc.split(`{0}`)
7007
- .join(g_isMac ? `Shift+${g_kCd[g_headerObj.keyRetry]}` : g_kCd[g_headerObj.keyTitleBack])
7008
- .split(`{1}`).join(g_kCd[g_headerObj.keyRetry]), { altId: `scKcMsg` }),
7013
+ createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc, { altId: `scKcMsg` }),
7014
+
7015
+ // タイトルバックのショートカットキー変更
7016
+ createCss2Button(`scTitleBack`, getScMsg.TitleBack(), () => {
7017
+ if (!g_isMac) {
7018
+ cursor.style.left = wUnit(g_btnX(1 / 4) - kcSubX);
7019
+ cursor.style.top = wUnit(g_sHeight - 160 + kcSubY);
7020
+ selectedKc = `TitleBack`;
7021
+ }
7022
+ }, g_lblPosObj.scTitleBack, g_cssObj.button_Default_NoColor,
7023
+ g_headerObj.keyTitleBack === g_headerObj.keyTitleBackDef2 ?
7024
+ g_cssObj.title_base : g_cssObj.keyconfig_Changekey),
7025
+
7026
+ // リトライのショートカットキー変更
7027
+ createCss2Button(`scRetry`, getScMsg.Retry(), () => {
7028
+ cursor.style.left = wUnit(g_btnX(5 / 8) + kcSubX);
7029
+ cursor.style.top = wUnit(g_sHeight - 160 + kcSubY);
7030
+ selectedKc = `Retry`;
7031
+ }, g_lblPosObj.scRetry, g_cssObj.button_Default_NoColor,
7032
+ g_headerObj.keyRetry === g_headerObj.keyRetryDef2 ?
7033
+ g_cssObj.title_base : g_cssObj.keyconfig_Changekey),
7009
7034
 
7010
7035
  // 別キーモード警告メッセージ
7011
7036
  createDivCss2Label(
@@ -7452,6 +7477,27 @@ const keyConfigInit = (_kcType = g_kcType) => {
7452
7477
  // 全角切替、BackSpace、Deleteキー、Escキーは割り当て禁止
7453
7478
  // また、直前と同じキーを押した場合(BackSpaceを除く)はキー操作を無効にする
7454
7479
  const disabledKeys = [240, 242, 243, 244, 91, 29, 28, 27, 259, g_prevKey];
7480
+
7481
+ if (selectedKc === `TitleBack` || selectedKc === `Retry`) {
7482
+ // プレイ中ショートカットキー変更
7483
+ if (disabledKeys.includes(setKey) || g_kCdN[setKey] === undefined) {
7484
+ makeInfoWindow(g_msgInfoObj.I_0002, `fadeOut0`);
7485
+ return;
7486
+ }
7487
+ g_headerObj[`key${selectedKc}`] = setKey;
7488
+ g_headerObj[`key${selectedKc}Def`] = setKey;
7489
+ document.getElementById(`sc${selectedKc}`).textContent = getScMsg[selectedKc]();
7490
+ document.getElementById(`sc${selectedKc}`).style.fontSize = `${getFontSize(getScMsg[selectedKc](), g_btnWidth(5 / 12) - 40, getBasicFont(), 13)}px`;
7491
+ if (g_isMac) {
7492
+ scTitleBack.textContent = getScMsg.TitleBack();
7493
+ scTitleBack.style.fontSize = `${getFontSize(getScMsg.TitleBack(), g_btnWidth(5 / 12) - 40, getBasicFont(), 13)}px`;
7494
+ }
7495
+ changeConfigColor(document.getElementById(`sc${selectedKc}`),
7496
+ g_headerObj[`key${selectedKc}`] === g_headerObj[`key${selectedKc}Def2`] ?
7497
+ g_cssObj.title_base : g_cssObj.keyconfig_Changekey);
7498
+ return;
7499
+ }
7500
+
7455
7501
  if (g_localeObj.val === `Ja`) {
7456
7502
  disabledKeys.unshift(229);
7457
7503
  }
@@ -9531,6 +9577,10 @@ const getArrowSettings = () => {
9531
9577
  g_gameOverFlg = false;
9532
9578
  g_finishFlg = true;
9533
9579
  g_workObj.nonDefaultSc = g_headerObj.keyRetry !== C_KEY_RETRY || g_headerObj.keyTitleBack !== C_KEY_TITLEBACK;
9580
+ if (g_headerObj.scAreaWidth === 0 && (g_headerObj.keyRetry !== g_headerObj.keyRetryDef2 || g_headerObj.keyTitleBack !== g_headerObj.keyTitleBackDef2)) {
9581
+ g_workObj.nonDefaultSc = false;
9582
+ }
9583
+
9534
9584
  g_workObj.backX = (g_workObj.nonDefaultSc && g_headerObj.playingLayout ? g_headerObj.scAreaWidth : 0);
9535
9585
  g_workObj.playingX = g_headerObj.playingX + g_workObj.backX;
9536
9586
 
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2024/12/02 (v38.1.0)
8
+ * Revised : 2025/01/08 (v38.3.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -159,6 +159,10 @@ const g_windowObj = {
159
159
  };
160
160
 
161
161
  const g_lblPosObj = {};
162
+ const getScMsg = {
163
+ TitleBack: () => g_lblNameObj.kcShortcutDesc1.split(`{0}`).join(g_isMac ? `Shift+${g_kCd[g_headerObj.keyRetry]}` : g_kCd[g_headerObj.keyTitleBack]),
164
+ Retry: () => g_lblNameObj.kcShortcutDesc2.split(`{1}`).join(g_kCd[g_headerObj.keyRetry]),
165
+ };
162
166
 
163
167
  /**
164
168
  * 可変部分のウィンドウサイズを更新
@@ -321,7 +325,7 @@ const updateWindowSiz = () => {
321
325
 
322
326
  /** キーコンフィグ画面 */
323
327
  scKcMsg: {
324
- x: g_btnX(), y: g_sHeight - 50, w: g_btnWidth(), h: 20,
328
+ x: g_btnX(), y: g_sHeight - 50, w: g_btnWidth(1 / 4), h: 20,
325
329
  },
326
330
  kcMsg: {
327
331
  x: g_btnX(), y: g_sHeight - 33, w: g_btnWidth(), h: 20, siz: g_limitObj.mainSiz,
@@ -380,6 +384,14 @@ const updateWindowSiz = () => {
380
384
  w: g_btnWidth(1 / 3), h: g_limitObj.btnHeight / 2, siz: g_limitObj.btnSiz * 2 / 3,
381
385
  title: g_msgObj.kcReset,
382
386
  },
387
+ scTitleBack: {
388
+ x: g_btnX(1 / 4) + 20, y: g_sHeight - 50, align: C_ALIGN_LEFT,
389
+ w: g_btnWidth(5 / 12) - 40, h: C_KYC_REPHEIGHT, siz: getFontSize(getScMsg.TitleBack(), g_btnWidth(5 / 12) - 40, getBasicFont(), 13),
390
+ },
391
+ scRetry: {
392
+ x: g_btnX(5 / 8) + 20, y: g_sHeight - 50, align: C_ALIGN_LEFT,
393
+ w: g_btnWidth(5 / 12) - 40, h: C_KYC_REPHEIGHT, siz: getFontSize(getScMsg.Retry(), g_btnWidth(5 / 12) - 40, getBasicFont(), 13),
394
+ },
383
395
 
384
396
  /** メイン画面 */
385
397
  stepHit: {
@@ -3158,7 +3170,9 @@ const g_lang_lblNameObj = {
3158
3170
  kcShuffleDesc: `番号をクリックでシャッフルグループ、矢印をクリックでカラーグループを変更`,
3159
3171
  kcNoShuffleDesc: `矢印をクリックでカラーグループを変更`,
3160
3172
  sdDesc: `[クリックでON/OFFを切替、灰色でOFF]`,
3161
- kcShortcutDesc: `プレイ中ショートカット:「{0}」タイトルバック / 「{1}」リトライ`,
3173
+ kcShortcutDesc: `プレイ中ショートカット:`,
3174
+ kcShortcutDesc1: `タイトルバック: {0}`,
3175
+ kcShortcutDesc2: `リトライ: {1}`,
3162
3176
  transKeyDesc: `別キーモードではキーコンフィグ、ColorType等は保存されません`,
3163
3177
  sdShortcutDesc: `Hid+/Sud+時ショートカット:「pageUp」カバーを上へ / 「pageDown」下へ`,
3164
3178
  resultImageDesc: `画像を右クリックしてコピーできます`,
@@ -3197,7 +3211,9 @@ const g_lang_lblNameObj = {
3197
3211
  kcShuffleDesc: `Click the number to change the shuffle group, and click the arrow to change the color.`,
3198
3212
  kcNoShuffleDesc: `Click the arrow to change the color group.`,
3199
3213
  sdDesc: `[Click to switch, gray to OFF]`,
3200
- kcShortcutDesc: `Shortcut during play: "{0}" Return to title / "{1}" Retry the game`,
3214
+ kcShortcutDesc: `Shortcut during play:`,
3215
+ kcShortcutDesc1: `Return to title: {0}`,
3216
+ kcShortcutDesc2: `Retry the game: {1}`,
3201
3217
  transKeyDesc: `Key config, Color type, etc. are not saved in another key mode`,
3202
3218
  sdShortcutDesc: `When "Hidden+" or "Sudden+" select, "pageUp" cover up / "pageDown" cover down`,
3203
3219
  resultImageDesc: `You can copy the image by right-clicking on it.`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "38.2.2",
3
+ "version": "38.3.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {