danoniplus 27.7.0 → 27.8.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 : 2022/07/01
7
+ * Revised : 2022/07/31
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 27.7.0`;
12
- const g_revisedDate = `2022/07/01`;
11
+ const g_version = `Ver 27.8.0`;
12
+ const g_revisedDate = `2022/07/31`;
13
13
  const g_alphaVersion = ``;
14
14
 
15
15
  // カスタム用バージョン (danoni_custom.js 等で指定可)
@@ -4259,45 +4259,55 @@ const createOptionWindow = _sprite => {
4259
4259
  if (g_headerObj.scoreDetailUse) {
4260
4260
  spriteList.speed.appendChild(
4261
4261
  createCss2Button(`btnGraph`, `i`, _ => true, {
4262
- x: 415, y: 0, w: 23, h: 23, siz: C_SIZ_JDGCNTS, title: g_msgObj.graph,
4262
+ x: -25, y: -60, w: 30, h: 30, siz: C_SIZ_JDGCHARA, title: g_msgObj.graph,
4263
4263
  resetFunc: _ => setScoreDetail(), cxtFunc: _ => setScoreDetail(),
4264
4264
  }, g_cssObj.button_Mini)
4265
4265
  );
4266
4266
  g_stateObj.scoreDetailViewFlg = false;
4267
4267
  const scoreDetail = createEmptySprite(optionsprite, `scoreDetail`, g_windowObj.scoreDetail, g_cssObj.settings_DifSelector);
4268
- const viewScText = _ => createScText(lnkScoreDetail, `ScoreDetail`, { targetLabel: `lnkScoreDetail`, x: -10 });
4269
4268
 
4270
4269
  /**
4271
4270
  * 譜面明細表示の切替
4272
4271
  * @param {number} _val
4273
4272
  */
4274
- const changeScoreDetail = (_val = 1) => {
4273
+ const changeScoreDetail = (_val = 0) => {
4274
+ if (g_currentPage === `difSelector`) {
4275
+ resetDifWindow();
4276
+ }
4275
4277
  g_stateObj.scoreDetailViewFlg = true;
4276
4278
  scoreDetail.style.visibility = `visible`;
4279
+
4280
+ // 表示内容を非表示化、ボタン色をデフォルトに戻す
4277
4281
  $id(`detail${g_stateObj.scoreDetail}`).visibility = `hidden`;
4278
- setSetting(_val, `scoreDetail`);
4279
- viewScText();
4282
+ document.getElementById(`lnk${g_stateObj.scoreDetail}G`).classList.replace(g_cssObj.button_Setting, g_cssObj.button_Default);
4283
+
4284
+ // 選択先を表示、ボタン色を選択中に変更
4285
+ g_stateObj.scoreDetail = g_settings.scoreDetails[_val];
4280
4286
  $id(`detail${g_stateObj.scoreDetail}`).visibility = `visible`;
4287
+ document.getElementById(`lnk${g_stateObj.scoreDetail}G`).classList.replace(g_cssObj.button_Default, g_cssObj.button_Setting);
4281
4288
  };
4282
4289
 
4283
4290
  multiAppend(scoreDetail,
4284
4291
  createScoreDetail(`Speed`),
4285
4292
  createScoreDetail(`Density`),
4286
4293
  createScoreDetail(`ToolDif`, false),
4287
- makeSettingLblCssButton(`lnkScoreDetailB`, `- - -`, 0, _ => changeScoreDetail(-1),
4288
- g_lblPosObj.lnkScoreDetailB, g_cssObj.button_RevON),
4289
- makeSettingLblCssButton(`lnkScoreDetail`, `${getStgDetailName(g_stateObj.scoreDetail)}`, 0, _ => changeScoreDetail(),
4290
- Object.assign(g_lblPosObj.lnkScoreDetail, {
4291
- cxtFunc: _ => changeScoreDetail(-1),
4292
- }), g_cssObj.button_RevON),
4293
4294
  );
4294
- viewScText();
4295
+ g_settings.scoreDetails.forEach((sd, j) => {
4296
+ scoreDetail.appendChild(
4297
+ makeDifLblCssButton(`lnk${sd}G`, getStgDetailName(sd), j, _ => changeScoreDetail(j), { w: C_LEN_DIFCOVER_WIDTH, btnStyle: (g_stateObj.scoreDetail === sd ? `Setting` : `Default`) })
4298
+ );
4299
+ createScText(document.getElementById(`lnk${sd}G`), sd, { targetLabel: `lnk${sd}G`, x: -10 });
4300
+ });
4295
4301
  }
4296
4302
 
4297
4303
  /**
4298
4304
  * 譜面明細表示/非表示ボタンの処理
4299
4305
  */
4300
4306
  const setScoreDetail = _ => {
4307
+ if (g_currentPage === `difSelector`) {
4308
+ resetDifWindow();
4309
+ g_stateObj.scoreDetailViewFlg = false;
4310
+ }
4301
4311
  const scoreDetail = document.querySelector(`#scoreDetail`);
4302
4312
  const detailObj = document.querySelector(`#detail${g_stateObj.scoreDetail}`);
4303
4313
  const visibles = [`hidden`, `visible`];
@@ -4439,7 +4449,7 @@ const createOptionWindow = _sprite => {
4439
4449
  const baseLabel = (_bLabel, _bLabelname, _bAlign) =>
4440
4450
  document.querySelector(`#detail${_name}`).appendChild(
4441
4451
  createDivCss2Label(`${_bLabel}`, `${_bLabelname}`, {
4442
- x: 10, y: 65 + _pos * 20, w: 100, h: 20, siz: C_SIZ_DIFSELECTOR, align: _bAlign,
4452
+ x: 10, y: 105 + _pos * 20, w: 100, h: 20, siz: C_SIZ_DIFSELECTOR, align: _bAlign,
4443
4453
  })
4444
4454
  );
4445
4455
  if (document.querySelector(`#data${_label}`) === null) {
@@ -4544,7 +4554,7 @@ const createOptionWindow = _sprite => {
4544
4554
  makeDifInfoLabel(`dataArrowInfo`, ``, g_lblPosObj.dataArrowInfo),
4545
4555
  makeDifInfoLabel(`lblArrowInfo2`, ``, g_lblPosObj.lblArrowInfo2),
4546
4556
  makeDifInfoLabel(`dataArrowInfo2`, ``, g_lblPosObj.dataArrowInfo2),
4547
- makeSettingLblCssButton(`lnkDifInfo`, g_lblNameObj.s_print, 0, _ => {
4557
+ makeDifLblCssButton(`lnkDifInfo`, g_lblNameObj.s_print, 8, _ => {
4548
4558
  copyTextToClipboard(
4549
4559
  `****** ${g_lblNameObj.s_printTitle} [${g_version}] ******\r\n\r\n`
4550
4560
  + `\t${g_lblNameObj.s_printHeader}\r\n\r\n${printData}`, g_msgInfoObj.I_0003
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2022/07/01 (v27.7.0)
8
+ * Revised : 2022/07/31 (v27.8.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -207,7 +207,7 @@ const updateWindowSiz = _ => {
207
207
  x: 140, y: 70, w: 275, h: 150, overflow: `auto`,
208
208
  },
209
209
  lnkDifInfo: {
210
- x: 10, y: 30, w: 100, borderStyle: `solid`,
210
+ w: C_LEN_DIFCOVER_WIDTH, borderStyle: `solid`,
211
211
  },
212
212
 
213
213
  /** ディスプレイ画面 */
@@ -1192,8 +1192,12 @@ const g_shortcutObj = {
1192
1192
  KeyV: { id: `lnkVolumeR` },
1193
1193
 
1194
1194
  KeyI: { id: `btnGraph` },
1195
- ShiftLeft_KeyQ: { id: `lnkScoreDetailB` },
1196
- KeyQ: { id: `lnkScoreDetail` },
1195
+ Digit1: { id: `lnkSpeedG` },
1196
+ Digit2: { id: `lnkDensityG` },
1197
+ Digit3: { id: `lnkToolDifG` },
1198
+ Numpad1: { id: `lnkSpeedG` },
1199
+ Numpad2: { id: `lnkDensityG` },
1200
+ Numpad3: { id: `lnkToolDifG` },
1197
1201
  KeyP: { id: `lnkDifInfo` },
1198
1202
  KeyZ: { id: `btnSave` },
1199
1203
 
@@ -1212,6 +1216,15 @@ const g_shortcutObj = {
1212
1216
  ArrowDown: { id: `btnDifD` },
1213
1217
  ArrowUp: { id: `btnDifU` },
1214
1218
 
1219
+ KeyI: { id: `btnGraph` },
1220
+ Digit1: { id: `lnkSpeedG` },
1221
+ Digit2: { id: `lnkDensityG` },
1222
+ Digit3: { id: `lnkToolDifG` },
1223
+ Numpad1: { id: `lnkSpeedG` },
1224
+ Numpad2: { id: `lnkDensityG` },
1225
+ Numpad3: { id: `lnkToolDifG` },
1226
+ KeyP: { id: `lnkDifInfo` },
1227
+
1215
1228
  Escape: { id: `btnBack` },
1216
1229
  Space: { id: `btnKeyConfig` },
1217
1230
  Enter: { id: `lnkDifficulty` },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "27.7.0",
3
+ "version": "27.8.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {