danoniplus 27.1.0 → 27.3.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/danoni_main.js CHANGED
@@ -4,12 +4,12 @@
4
4
  *
5
5
  * Source by tickle
6
6
  * Created : 2018/10/08
7
- * Revised : 2022/03/25
7
+ * Revised : 2022/04/10
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 27.1.0`;
12
- const g_revisedDate = `2022/03/25`;
11
+ const g_version = `Ver 27.3.1`;
12
+ const g_revisedDate = `2022/04/10`;
13
13
  const g_alphaVersion = ``;
14
14
 
15
15
  // カスタム用バージョン (danoni_custom.js 等で指定可)
@@ -41,11 +41,11 @@ let g_localVersion2 = ``;
41
41
  */
42
42
  const current = _ => {
43
43
  if (document.currentScript) {
44
- return document.currentScript.src;
44
+ return encodeURI(document.currentScript.src);
45
45
  }
46
46
  const scripts = document.getElementsByTagName(`script`);
47
47
  const targetScript = scripts[scripts.length - 1];
48
- return targetScript.src;
48
+ return encodeURI(targetScript.src);
49
49
  };
50
50
  const g_rootPath = current().match(/(^.*\/)/)[0];
51
51
  const g_remoteFlg = g_rootPath.match(`^https://cwtickle.github.io/danoniplus/`) !== null;
@@ -885,6 +885,18 @@ const getFontSize = (_str, _maxWidth, _font = getBasicFont(), _maxFontsize = 64,
885
885
  return _minFontsize;
886
886
  };
887
887
 
888
+ /**
889
+ * 補足説明部分のラベル作成
890
+ * @param {string} _id
891
+ * @param {string} _str
892
+ * @param {string} _altId
893
+ * @returns
894
+ */
895
+ const createDescDiv = (_id, _str, _altId = _id) =>
896
+ createDivCss2Label(_id, _str, Object.assign(g_lblPosObj[_altId], {
897
+ siz: getFontSize(_str, g_sWidth, getBasicFont(), C_SIZ_MAIN),
898
+ }));
899
+
888
900
  /*-----------------------------------------------------------*/
889
901
  /* ラベル・ボタン・オブジェクトの作成 */
890
902
  /*-----------------------------------------------------------*/
@@ -965,6 +977,26 @@ const createImg = (_id, _imgPath, _x, _y, _width, _height) => {
965
977
  return div;
966
978
  };
967
979
 
980
+ /**
981
+ * ColorPickerの作成
982
+ * @param {string} _parentObj
983
+ * @param {string} _id
984
+ * @param {function} _func
985
+ * @param {object} _obj
986
+ * @returns
987
+ */
988
+ const createColorPicker = (_parentObj, _id, _func, { x = 0, y = 0 } = {}) => {
989
+ const picker = document.createElement(`input`);
990
+ picker.setAttribute(`type`, `color`);
991
+ picker.id = _id;
992
+ picker.style.left = `${x}px`;
993
+ picker.style.top = `${y}px`;
994
+ picker.style.position = `absolute`;
995
+ picker.addEventListener(`change`, _func);
996
+ _parentObj.appendChild(picker);
997
+ return picker;
998
+ };
999
+
968
1000
  /**
969
1001
  * 色付きオブジェクトの作成 (拡張属性対応)
970
1002
  * @param {string} _id
@@ -1225,6 +1257,7 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1225
1257
  // レイヤー情報取得
1226
1258
  const layer0 = document.querySelector(`#layer0`);
1227
1259
  const l0ctx = layer0.getContext(`2d`);
1260
+ layer0.width = g_sWidth;
1228
1261
 
1229
1262
  // 線画、図形をクリア
1230
1263
  l0ctx.clearRect(0, 0, g_sWidth, g_sHeight);
@@ -1232,24 +1265,26 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1232
1265
  if (document.querySelector(`#layer1`) !== null) {
1233
1266
  const layer1 = document.querySelector(`#layer1`);
1234
1267
  const l1ctx = layer1.getContext(`2d`);
1268
+ layer1.width = g_sWidth;
1235
1269
  l1ctx.clearRect(0, 0, g_sWidth, g_sHeight);
1236
1270
 
1237
1271
  // 線画 (title-line)
1238
1272
  l1ctx.beginPath();
1239
1273
  l1ctx.strokeStyle = `#cccccc`;
1240
1274
  l1ctx.moveTo(0, 0);
1241
- l1ctx.lineTo(g_sWidth, 0);
1275
+ l1ctx.lineTo(layer1.width, 0);
1242
1276
  l1ctx.stroke();
1243
1277
 
1244
1278
  l1ctx.beginPath();
1245
1279
  l1ctx.strokeStyle = `#cccccc`;
1246
1280
  l1ctx.moveTo(0, g_sHeight);
1247
- l1ctx.lineTo(g_sWidth, g_sHeight);
1281
+ l1ctx.lineTo(layer1.width, g_sHeight);
1248
1282
  l1ctx.stroke();
1249
1283
  }
1250
1284
  if (document.querySelector(`#layer2`) !== null) {
1251
1285
  const layer2 = document.querySelector(`#layer2`);
1252
1286
  const l2ctx = layer2.getContext(`2d`);
1287
+ layer2.width = g_sWidth;
1253
1288
  l2ctx.clearRect(0, 0, g_sWidth, g_sHeight);
1254
1289
  }
1255
1290
  }
@@ -1845,6 +1880,7 @@ const initialControl = async () => {
1845
1880
  getScoreDetailData(j);
1846
1881
  }
1847
1882
  }
1883
+ g_customJsObj.preTitle.forEach(func => func());
1848
1884
  titleInit();
1849
1885
  };
1850
1886
 
@@ -1938,7 +1974,8 @@ const loadChartFile = async (_scoreId = g_stateObj.scoreId) => {
1938
1974
 
1939
1975
  const dosInput = document.querySelector(`#dos`);
1940
1976
  const divRoot = document.querySelector(`#divRoot`);
1941
- const queryDos = getQueryParamVal(`dos`) !== null ? `dos/${getQueryParamVal('dos')}.txt` : (document.querySelector(`#externalDos`)?.value ?? ``);
1977
+ const queryDos = getQueryParamVal(`dos`) !== null ?
1978
+ `dos/${getQueryParamVal('dos')}.txt` : encodeURI(document.querySelector(`#externalDos`)?.value ?? ``);
1942
1979
 
1943
1980
  if (dosInput === null && queryDos === ``) {
1944
1981
  makeWarningWindow(g_msgInfoObj.E_0023);
@@ -2604,10 +2641,9 @@ const headerConvert = _dosObj => {
2604
2641
  }
2605
2642
 
2606
2643
  // 初期色情報
2644
+ const baseColor = (obj.baseBrightFlg ? `light` : `dark`);
2645
+ Object.assign(g_dfColorObj, g_dfColorBaseObj[baseColor]);
2607
2646
  Object.keys(g_dfColorObj).forEach(key => obj[key] = g_dfColorObj[key].concat());
2608
- if (obj.baseBrightFlg) {
2609
- Object.keys(g_dfColorLightObj).forEach(key => obj[key] = g_dfColorLightObj[key].concat());
2610
- }
2611
2647
  obj.frzColorDefault = [];
2612
2648
 
2613
2649
  // ダミー用初期矢印色
@@ -3630,6 +3666,17 @@ const titleInit = _ => {
3630
3666
  let reloadFlg = false;
3631
3667
  const getLinkSiz = _name => getFontSize(_name, g_sWidth / 2 - 20, getBasicFont(), C_LBL_LNKSIZE, 12);
3632
3668
 
3669
+ /**
3670
+ * クレジット用リンク作成
3671
+ * @param {string} _id
3672
+ * @param {string} _text
3673
+ * @param {string} _url
3674
+ * @returns
3675
+ */
3676
+ const createCreditBtn = (_id, _text, _url) =>
3677
+ createCss2Button(_id, _text, _ => true,
3678
+ Object.assign(g_lblPosObj[_id], { siz: getLinkSiz(_text), resetFunc: _ => openLink(_url) }), g_cssObj.button_Default);
3679
+
3633
3680
  // ボタン描画
3634
3681
  multiAppend(divRoot,
3635
3682
 
@@ -3650,63 +3697,49 @@ const titleInit = _ => {
3650
3697
  localStorage.setItem(g_localStorageUrl, JSON.stringify(g_localStorage));
3651
3698
  reloadFlg = true;
3652
3699
  }
3653
- }, {
3654
- x: 0, y: g_sHeight - 20, w: g_sWidth / 4, h: 16, siz: 12, title: g_msgObj.dataReset,
3700
+ }, Object.assign(g_lblPosObj.btnReset, {
3655
3701
  resetFunc: _ => {
3656
3702
  if (reloadFlg) {
3657
3703
  location.reload();
3658
3704
  }
3659
3705
  },
3660
- }, g_cssObj.button_Reset),
3706
+ }), g_cssObj.button_Reset),
3661
3707
 
3662
3708
  // ロケール切替
3663
- createCss2Button(`btnReload`, g_localeObj.val, _ => true, {
3664
- x: 10, y: 10, w: 30, h: 30, siz: 20, title: g_msgObj.reload,
3665
- resetFunc: _ => {
3666
- g_localeObj.num = (++g_localeObj.num) % g_localeObj.list.length;
3667
- g_langStorage.locale = g_localeObj.list[g_localeObj.num];
3668
- localStorage.setItem(`danoni-locale`, JSON.stringify(g_langStorage));
3669
- location.reload();
3670
- },
3671
- }, g_cssObj.button_Start),
3709
+ createCss2Button(`btnReload`, g_localeObj.val, _ => true,
3710
+ Object.assign(g_lblPosObj.btnReload, {
3711
+ resetFunc: _ => {
3712
+ g_localeObj.num = (++g_localeObj.num) % g_localeObj.list.length;
3713
+ g_langStorage.locale = g_localeObj.list[g_localeObj.num];
3714
+ localStorage.setItem(`danoni-locale`, JSON.stringify(g_langStorage));
3715
+ location.reload();
3716
+ },
3717
+ }), g_cssObj.button_Start),
3672
3718
 
3673
3719
  // ヘルプ
3674
- createCss2Button(`btnHelp`, `?`, _ => true, {
3675
- x: 0, y: g_sHeight - 150, w: 40, h: 40, siz: 30, title: g_msgObj.howto,
3676
- resetFunc: _ => openLink(`https://github.com/cwtickle/danoniplus/wiki/AboutGameSystem`),
3677
- }, g_cssObj.button_Setting),
3720
+ createCss2Button(`btnHelp`, `?`, _ => true,
3721
+ Object.assign(g_lblPosObj.btnHelp, {
3722
+ resetFunc: _ => openLink(`https://github.com/cwtickle/danoniplus/wiki/AboutGameSystem`),
3723
+ }), g_cssObj.button_Setting),
3678
3724
 
3679
3725
  // 製作者表示
3680
- createCss2Button(`lnkMaker`, `${g_lblNameObj.maker}: ${g_headerObj.tuningInit}`, _ => true, {
3681
- x: 0, y: g_sHeight - 50, w: g_sWidth / 2, h: C_LNK_HEIGHT,
3682
- siz: getLinkSiz(`${g_lblNameObj.maker}: ${g_headerObj.tuningInit}`), align: C_ALIGN_LEFT,
3683
- title: g_headerObj.creatorUrl,
3684
- resetFunc: _ => openLink(g_headerObj.creatorUrl),
3685
- }, g_cssObj.button_Default),
3726
+ createCreditBtn(`lnkMaker`, `${g_lblNameObj.maker}: ${g_headerObj.tuningInit}`, g_headerObj.creatorUrl),
3686
3727
 
3687
3728
  // アーティスト表示
3688
- createCss2Button(`lnkArtist`, `${g_lblNameObj.artist}: ${g_headerObj.artistName}`, _ => true, {
3689
- x: g_sWidth / 2, y: g_sHeight - 50, w: g_sWidth / 2, h: C_LNK_HEIGHT,
3690
- siz: getLinkSiz(`${g_lblNameObj.artist}: ${g_headerObj.artistName}`), align: C_ALIGN_LEFT,
3691
- title: g_headerObj.artistUrl,
3692
- resetFunc: _ => openLink(g_headerObj.artistUrl),
3693
- }, g_cssObj.button_Default),
3729
+ createCreditBtn(`lnkArtist`, `${g_lblNameObj.artist}: ${g_headerObj.artistName}`, g_headerObj.artistUrl),
3694
3730
 
3695
3731
  // バージョン描画
3696
- createCss2Button(
3697
- `lnkVersion`, versionName, _ => true, {
3698
- x: g_sWidth / 4, y: g_sHeight - 20, w: g_sWidth * 3 / 4 - 20, h: 16,
3699
- siz: getFontSize(versionName, g_sWidth * 3 / 4 - 20, getBasicFont(), 12),
3700
- align: C_ALIGN_RIGHT, title: g_msgObj.github,
3701
- resetFunc: _ => openLink(`https://github.com/cwtickle/danoniplus`),
3702
- }, g_cssObj.button_Tweet),
3732
+ createCss2Button(`lnkVersion`, versionName, _ => true,
3733
+ Object.assign(g_lblPosObj.lnkVersion, {
3734
+ siz: getFontSize(versionName, g_sWidth * 3 / 4 - 20, getBasicFont(), 12),
3735
+ resetFunc: _ => openLink(`https://github.com/cwtickle/danoniplus`),
3736
+ }), g_cssObj.button_Tweet),
3703
3737
 
3704
3738
  // セキュリティリンク
3705
- createCss2Button(`lnkComparison`, `🛡`, _ => true, {
3706
- x: g_sWidth - 20, y: g_sHeight - 20, w: 20, h: 16, siz: 12,
3707
- title: g_msgObj.security,
3708
- resetFunc: _ => openLink(`https://github.com/cwtickle/danoniplus/security/policy`),
3709
- }, g_cssObj.button_Tweet),
3739
+ createCss2Button(`lnkComparison`, `🛡`, _ => true,
3740
+ Object.assign(g_lblPosObj.lnkComparison, {
3741
+ resetFunc: _ => openLink(`https://github.com/cwtickle/danoniplus/security/policy`),
3742
+ }), g_cssObj.button_Tweet),
3710
3743
  );
3711
3744
 
3712
3745
  // コメントエリア作成
@@ -3726,19 +3759,11 @@ const titleInit = _ => {
3726
3759
  }
3727
3760
  } else {
3728
3761
  multiAppend(divRoot,
3729
-
3730
- createDivCss2Label(`lblComment`, convCommentVal, {
3731
- x: 0, y: 70, w: g_sWidth, h: g_sHeight - 180, siz: C_SIZ_DIFSELECTOR, align: C_ALIGN_LEFT,
3732
- overflow: `auto`, background: `#222222`, color: `#cccccc`, display: C_DIS_NONE,
3733
- }),
3734
-
3762
+ createDivCss2Label(`lblComment`, convCommentVal, g_lblPosObj.lblComment),
3735
3763
  createCss2Button(`btnComment`, g_lblNameObj.comment, _ => {
3736
3764
  const lblCommentDef = lblComment.style.display;
3737
3765
  lblComment.style.display = (lblCommentDef === C_DIS_NONE ? C_DIS_INHERIT : C_DIS_NONE);
3738
- }, {
3739
- x: g_sWidth - 160, y: (g_sHeight / 2) + 150, w: 140, h: 50, siz: 20, border: `solid 1px #999999`,
3740
- }, g_cssObj.button_Default),
3741
-
3766
+ }, g_lblPosObj.btnComment, g_cssObj.button_Default),
3742
3767
  );
3743
3768
  setUserSelect(lblComment.style, `text`);
3744
3769
  }
@@ -3876,31 +3901,31 @@ const commonSettingBtn = _labelName => {
3876
3901
  multiAppend(divRoot,
3877
3902
 
3878
3903
  // タイトル画面へ戻る
3879
- createCss2Button(`btnBack`, g_lblNameObj.b_back, _ => true, {
3880
- animationName: (g_initialFlg ? `` : `smallToNormalY`), resetFunc: _ => titleInit(),
3881
- }, g_cssObj.button_Back),
3904
+ createCss2Button(`btnBack`, g_lblNameObj.b_back, _ => true,
3905
+ Object.assign(g_lblPosObj.btnBack, {
3906
+ animationName: (g_initialFlg ? `` : `smallToNormalY`), resetFunc: _ => titleInit(),
3907
+ }), g_cssObj.button_Back),
3882
3908
 
3883
3909
  // キーコンフィグ画面へ移動
3884
- createCss2Button(`btnKeyConfig`, g_lblNameObj.b_keyConfig, _ => true, {
3885
- x: g_sWidth / 3,
3886
- animationName: (g_initialFlg ? `` : `smallToNormalY`), resetFunc: _ => keyConfigInit(`Main`),
3887
- }, g_cssObj.button_Setting),
3910
+ createCss2Button(`btnKeyConfig`, g_lblNameObj.b_keyConfig, _ => true,
3911
+ Object.assign(g_lblPosObj.btnKeyConfig, {
3912
+ animationName: (g_initialFlg ? `` : `smallToNormalY`), resetFunc: _ => keyConfigInit(`Main`),
3913
+ }), g_cssObj.button_Setting),
3888
3914
 
3889
3915
  // プレイ開始
3890
3916
  makePlayButton(_ => loadMusic()),
3891
3917
 
3892
3918
  // Display設定へ移動
3893
- createCss2Button(`btn${_labelName}`, `>`, _ => true, {
3894
- x: g_sWidth / 2 + 175 - C_LEN_SETMINI_WIDTH / 2, y: 25,
3895
- w: C_LEN_SETMINI_WIDTH, h: 40, title: g_msgObj[`to${_labelName}`],
3896
- resetFunc: _ => g_jumpSettingWindow[g_currentPage](),
3897
- }, g_cssObj.button_Mini),
3919
+ createCss2Button(`btn${_labelName}`, `>`, _ => true,
3920
+ Object.assign(g_lblPosObj.btnSwitchSetting, {
3921
+ title: g_msgObj[`to${_labelName}`], resetFunc: _ => g_jumpSettingWindow[g_currentPage](),
3922
+ }), g_cssObj.button_Mini),
3898
3923
 
3899
3924
  // データセーブフラグの切替
3900
- createCss2Button(`btnSave`, g_lblNameObj.dataSave, evt => switchSave(evt), {
3901
- x: 0, y: 5, w: g_sWidth / 5, h: 16, siz: 12,
3902
- title: g_msgObj.dataSave, borderStyle: `solid`, cxtFunc: evt => switchSave(evt),
3903
- }, g_cssObj.button_Default, (g_stateObj.dataSaveFlg ? g_cssObj.button_ON : g_cssObj.button_OFF)),
3925
+ createCss2Button(`btnSave`, g_lblNameObj.dataSave, evt => switchSave(evt),
3926
+ Object.assign(g_lblPosObj.btnSave, {
3927
+ cxtFunc: evt => switchSave(evt),
3928
+ }), g_cssObj.button_Default, (g_stateObj.dataSaveFlg ? g_cssObj.button_ON : g_cssObj.button_OFF)),
3904
3929
  );
3905
3930
  };
3906
3931
 
@@ -3908,13 +3933,11 @@ const commonSettingBtn = _labelName => {
3908
3933
  * PLAYボタンの作成
3909
3934
  * @param {function} _func
3910
3935
  */
3911
- const makePlayButton = _func => {
3912
- return createCss2Button(`btnPlay`, g_lblNameObj.b_play, _ => true, {
3913
- x: g_sWidth * 2 / 3,
3936
+ const makePlayButton = _func => createCss2Button(`btnPlay`, g_lblNameObj.b_play, _ => true,
3937
+ Object.assign(g_lblPosObj.btnPlay, {
3914
3938
  animationName: (g_initialFlg ? `` : `smallToNormalY`),
3915
3939
  resetFunc: _func,
3916
- }, g_cssObj.button_Next);
3917
- };
3940
+ }), g_cssObj.button_Next);
3918
3941
 
3919
3942
  /**
3920
3943
  * 設定・オプション画面初期化
@@ -4226,13 +4249,12 @@ const createOptionWindow = _sprite => {
4226
4249
  createScoreDetail(`Speed`),
4227
4250
  createScoreDetail(`Density`),
4228
4251
  createScoreDetail(`ToolDif`, false),
4229
- makeSettingLblCssButton(`lnkScoreDetailB`, `- - -`, 0, _ => changeScoreDetail(-1), {
4230
- x: 10, w: 100, visibility: `hidden`,
4231
- }, g_cssObj.button_RevON),
4232
- makeSettingLblCssButton(`lnkScoreDetail`, `${getStgDetailName(g_stateObj.scoreDetail)}`, 0, _ => changeScoreDetail(), {
4233
- x: 10, w: 100, borderStyle: `solid`,
4234
- cxtFunc: _ => changeScoreDetail(-1),
4235
- }, g_cssObj.button_RevON),
4252
+ makeSettingLblCssButton(`lnkScoreDetailB`, `- - -`, 0, _ => changeScoreDetail(-1),
4253
+ g_lblPosObj.lnkScoreDetailB, g_cssObj.button_RevON),
4254
+ makeSettingLblCssButton(`lnkScoreDetail`, `${getStgDetailName(g_stateObj.scoreDetail)}`, 0, _ => changeScoreDetail(),
4255
+ Object.assign(g_lblPosObj.lnkScoreDetail, {
4256
+ cxtFunc: _ => changeScoreDetail(-1),
4257
+ }), g_cssObj.button_RevON),
4236
4258
  );
4237
4259
  viewScText();
4238
4260
  }
@@ -4477,24 +4499,22 @@ const createOptionWindow = _sprite => {
4477
4499
  `${obj.playingTime}\r\n`;
4478
4500
  }
4479
4501
  multiAppend(detailToolDif,
4480
- makeDifInfoLabel(`lblTooldif`, g_lblNameObj.s_level, { y: 5, w: 250, siz: C_SIZ_JDGCNTS }),
4481
- makeDifInfoLabel(`dataTooldif`, ``, { x: 270, y: 3, w: 160, siz: 18 }),
4482
- makeDifInfoLabel(`lblDouji`, g_lblNameObj.s_douji),
4483
- makeDifInfoLabel(`lblTate`, g_lblNameObj.s_tate, { x: 270 }),
4484
- makeDifInfoLabel(`dataDouji`, ``, { x: 200, w: 160 }),
4485
- makeDifInfoLabel(`dataTate`, ``, { x: 345, w: 160 }),
4486
- makeDifInfoLabel(`lblArrowInfo`, g_lblNameObj.s_cnts, { x: 130, y: 45, w: 290, siz: C_SIZ_JDGCNTS }),
4487
- makeDifInfoLabel(`dataArrowInfo`, ``, { x: 270, y: 45, w: 160, siz: C_SIZ_JDGCNTS }),
4488
- makeDifInfoLabel(`lblArrowInfo2`, ``, { x: 130, y: 70, w: 200, h: 90 }),
4489
- makeDifInfoLabel(`dataArrowInfo2`, ``, { x: 140, y: 70, w: 275, h: 150, overflow: `auto` }),
4502
+ makeDifInfoLabel(`lblTooldif`, g_lblNameObj.s_level, g_lblPosObj.lblTooldif),
4503
+ makeDifInfoLabel(`dataTooldif`, ``, g_lblPosObj.dataTooldif),
4504
+ makeDifInfoLabel(`lblDouji`, g_lblNameObj.s_douji, g_lblPosObj.lblDouji),
4505
+ makeDifInfoLabel(`lblTate`, g_lblNameObj.s_tate, g_lblPosObj.lblTate),
4506
+ makeDifInfoLabel(`dataDouji`, ``, g_lblPosObj.dataDouji),
4507
+ makeDifInfoLabel(`dataTate`, ``, g_lblPosObj.dataTate),
4508
+ makeDifInfoLabel(`lblArrowInfo`, g_lblNameObj.s_cnts, g_lblPosObj.lblArrowInfo),
4509
+ makeDifInfoLabel(`dataArrowInfo`, ``, g_lblPosObj.dataArrowInfo),
4510
+ makeDifInfoLabel(`lblArrowInfo2`, ``, g_lblPosObj.lblArrowInfo2),
4511
+ makeDifInfoLabel(`dataArrowInfo2`, ``, g_lblPosObj.dataArrowInfo2),
4490
4512
  makeSettingLblCssButton(`lnkDifInfo`, g_lblNameObj.s_print, 0, _ => {
4491
4513
  copyTextToClipboard(
4492
4514
  `****** ${g_lblNameObj.s_printTitle} [${g_version}] ******\r\n\r\n`
4493
4515
  + `\t${g_lblNameObj.s_printHeader}\r\n\r\n${printData}`, g_msgInfoObj.I_0003
4494
4516
  );
4495
- }, {
4496
- x: 10, y: 30, w: 100, borderStyle: `solid`
4497
- }, g_cssObj.button_RevON),
4517
+ }, g_lblPosObj.lnkDifInfo, g_cssObj.button_RevON),
4498
4518
  );
4499
4519
  createScText(lnkDifInfo, `DifInfo`, { targetLabel: `lnkDifInfo`, x: -10 });
4500
4520
  };
@@ -4544,12 +4564,10 @@ const createOptionWindow = _sprite => {
4544
4564
  ];
4545
4565
 
4546
4566
  spriteList.scroll.appendChild(
4547
- createCss2Button(`btnReverse`, `${g_lblNameObj.Reverse}:${getStgDetailName(g_stateObj.reverse)}`, evt => setReverse(evt.target), {
4548
- x: 160, y: 0,
4549
- w: 90, h: 21, siz: C_SIZ_DIFSELECTOR,
4550
- borderStyle: `solid`,
4551
- cxtFunc: evt => setReverse(evt.target),
4552
- }, g_cssObj.button_Default, g_cssObj[`button_Rev${g_stateObj.reverse}`])
4567
+ createCss2Button(`btnReverse`, `${g_lblNameObj.Reverse}:${getStgDetailName(g_stateObj.reverse)}`, evt => setReverse(evt.target),
4568
+ Object.assign(g_lblPosObj.btnReverse, {
4569
+ cxtFunc: evt => setReverse(evt.target),
4570
+ }), g_cssObj.button_Default, g_cssObj[`button_Rev${g_stateObj.reverse}`])
4553
4571
  );
4554
4572
  spriteList[g_settings.scrolls.length > 1 ? `reverse` : `scroll`].style.display = C_DIS_NONE;
4555
4573
  } else {
@@ -4584,12 +4602,7 @@ const createOptionWindow = _sprite => {
4584
4602
  spriteList.gauge.appendChild(createLblSetting(`Gauge`));
4585
4603
 
4586
4604
  // ゲージ設定詳細 縦位置: ゲージ設定+1
4587
- spriteList.gauge.appendChild(
4588
- createDivCss2Label(`lblGauge2`, ``, {
4589
- x: C_LEN_SETLBL_LEFT - 35, y: C_LEN_SETLBL_HEIGHT,
4590
- w: C_LEN_SETLBL_WIDTH + 60, h: C_LEN_SETLBL_HEIGHT * 2, siz: 11,
4591
- })
4592
- );
4605
+ spriteList.gauge.appendChild(createDivCss2Label(`lblGauge2`, ``, g_lblPosObj.lblGauge2));
4593
4606
 
4594
4607
  /**
4595
4608
  * ゲージ設定メイン
@@ -4775,9 +4788,8 @@ const createOptionWindow = _sprite => {
4775
4788
  // 縦位置: 11 スライダーあり
4776
4789
  spriteList.fadein.appendChild(createLblSetting(`Fadein`));
4777
4790
 
4778
- const lnkFadein = createDivCss2Label(`lnkFadein`, `${g_stateObj.fadein}${g_lblNameObj.percent}`, {
4779
- x: C_LEN_SETLBL_LEFT, y: 0,
4780
- }, g_cssObj.settings_FadeinBar);
4791
+ const lnkFadein = createDivCss2Label(`lnkFadein`, `${g_stateObj.fadein}${g_lblNameObj.percent}`,
4792
+ g_lblPosObj.lnkFadein, g_cssObj.settings_FadeinBar);
4781
4793
  spriteList.fadein.appendChild(lnkFadein);
4782
4794
 
4783
4795
  const setFadein = _sign => {
@@ -4793,9 +4805,8 @@ const createOptionWindow = _sprite => {
4793
4805
  makeMiniCssButton(`lnkFadein`, `L`, 0, _ => setFadein(-1)),
4794
4806
 
4795
4807
  // フェードインのスライダー処理
4796
- createDivCss2Label(`lblFadeinBar`, `<input id="fadeinSlider" type="range" value="${g_stateObj.fadein}" min="0" max="99" step="1">`, {
4797
- x: C_LEN_SETLBL_LEFT, y: 0,
4798
- }),
4808
+ createDivCss2Label(`lblFadeinBar`, `<input id="fadeinSlider" type="range" value="${g_stateObj.fadein}" min="0" max="99" step="1">`,
4809
+ g_lblPosObj.lblFadeinBar),
4799
4810
 
4800
4811
  )
4801
4812
 
@@ -5254,12 +5265,7 @@ const settingsDisplayInit = _ => {
5254
5265
  createSettingsDisplayWindow(divRoot);
5255
5266
 
5256
5267
  // ショートカットキーメッセージ
5257
- divRoot.appendChild(
5258
- createDivCss2Label(`scMsg`, g_lblNameObj.sdShortcutDesc, {
5259
- x: 0, y: g_sHeight - 45, w: g_sWidth, h: 20,
5260
- siz: getFontSize(g_lblNameObj.sdShortcutDesc, g_sWidth, getBasicFont(), C_SIZ_MAIN),
5261
- })
5262
- );
5268
+ divRoot.appendChild(createDescDiv(`scMsg`, g_lblNameObj.sdShortcutDesc));
5263
5269
 
5264
5270
  // ユーザカスタムイベント(初期)
5265
5271
  g_customJsObj.settingsDisplay.forEach(func => func());
@@ -5345,11 +5351,7 @@ const createSettingsDisplayWindow = _sprite => {
5345
5351
  const displaySprite = createEmptySprite(optionsprite, `displaySprite`, g_windowObj.displaySprite);
5346
5352
  const spriteList = setSpriteList(settingList);
5347
5353
 
5348
- _sprite.appendChild(
5349
- createDivCss2Label(`sdDesc`, g_lblNameObj.sdDesc, {
5350
- x: 0, y: 65, w: g_sWidth, h: 20, siz: C_SIZ_MAIN,
5351
- })
5352
- );
5354
+ _sprite.appendChild(createDivCss2Label(`sdDesc`, g_lblNameObj.sdDesc, g_lblPosObj.sdDesc));
5353
5355
  g_displays.forEach((name, j) => makeDisplayButton(name, j % 7, Math.floor(j / 7)));
5354
5356
 
5355
5357
  // ---------------------------------------------------
@@ -5363,16 +5365,13 @@ const createSettingsDisplayWindow = _sprite => {
5363
5365
 
5364
5366
  // Hidden+/Sudden+初期値用スライダー、ロックボタン
5365
5367
  multiAppend(spriteList.appearance,
5366
- createDivCss2Label(`lblAppearancePos`, `${g_hidSudObj.filterPos}${g_lblNameObj.percent}`, {
5367
- x: C_LEN_SETLBL_LEFT, y: 20, siz: 12, align: C_ALIGN_CENTER,
5368
- }),
5369
- createDivCss2Label(`lblAppearanceBar`, `<input id="appearanceSlider" type="range" value="${g_hidSudObj.filterPos}" min="0" max="100" step="1">`, {
5370
- x: C_LEN_SETLBL_LEFT, y: 15,
5371
- }),
5372
- createCss2Button(`lnkLockBtn`, g_lblNameObj.filterLock, evt => setLockView(evt.target), {
5373
- x: C_LEN_SETLBL_LEFT + C_LEN_SETLBL_WIDTH - 40, y: 0, w: 40, h: C_LEN_SETLBL_HEIGHT, siz: 12,
5374
- borderStyle: `solid`, cxtFunc: evt => setLockView(evt.target),
5375
- }, g_cssObj.button_Default, g_cssObj[`button_Rev${g_stateObj.filterLock}`]),
5368
+ createDivCss2Label(`lblAppearancePos`, `${g_hidSudObj.filterPos}${g_lblNameObj.percent}`, g_lblPosObj.lblAppearancePos),
5369
+ createDivCss2Label(`lblAppearanceBar`, `<input id="appearanceSlider" type="range" value="${g_hidSudObj.filterPos}" min="0" max="100" step="1">`,
5370
+ g_lblPosObj.lblAppearanceBar),
5371
+ createCss2Button(`lnkLockBtn`, g_lblNameObj.filterLock, evt => setLockView(evt.target),
5372
+ Object.assign(g_lblPosObj.lnkLockBtn, {
5373
+ cxtFunc: evt => setLockView(evt.target),
5374
+ }), g_cssObj.button_Default, g_cssObj[`button_Rev${g_stateObj.filterLock}`]),
5376
5375
  );
5377
5376
 
5378
5377
  const setLockView = (_btn) => {
@@ -5468,17 +5467,10 @@ const keyConfigInit = (_kcType = g_kcType) => {
5468
5467
  `<div class="settings_Title">${g_lblNameObj.key}</div><div class="settings_Title2">${g_lblNameObj.config}</div>`
5469
5468
  .replace(/[\t\n]/g, ``), 0, 15, g_cssObj.flex_centering),
5470
5469
 
5471
- createDivCss2Label(`kcDesc`, g_lblNameObj.kcDesc.split(`{0}`).join(g_kCd[C_KEY_RETRY])
5472
- .split(`{1}:`).join(g_isMac ? `` : `Delete:`), {
5473
- x: 0, y: 68, w: g_sWidth, h: 20,
5474
- siz: getFontSize(g_lblNameObj.kcDesc, g_sWidth, getBasicFont(), C_SIZ_MAIN),
5475
- }),
5476
-
5477
- createDivCss2Label(`kcShuffleDesc`, g_lblNameObj.kcShuffleDesc, {
5478
- x: 5, y: g_sHeight - 125, w: g_sWidth, h: 20, align: C_ALIGN_LEFT,
5479
- siz: getFontSize(g_lblNameObj.kcShuffleDesc, g_sWidth, getBasicFont(), C_SIZ_MAIN),
5480
- }),
5470
+ createDescDiv(`kcDesc`, g_lblNameObj.kcDesc.split(`{0}`).join(g_kCd[C_KEY_RETRY])
5471
+ .split(`{1}:`).join(g_isMac ? `` : `Delete:`)),
5481
5472
 
5473
+ createDescDiv(`kcShuffleDesc`, g_lblNameObj.kcShuffleDesc),
5482
5474
  );
5483
5475
 
5484
5476
  // キーの一覧を表示
@@ -5769,26 +5761,17 @@ const keyConfigInit = (_kcType = g_kcType) => {
5769
5761
  viewGroup(_type);
5770
5762
  };
5771
5763
 
5772
- const scMsg = g_lblNameObj.kcShortcutDesc.split(`{0}`).join(g_isMac ? `Shift+${g_kCd[g_headerObj.keyRetry]}` : g_kCd[g_headerObj.keyTitleBack])
5773
- .split(`{1}`).join(g_kCd[g_headerObj.keyRetry]);
5774
-
5775
5764
  multiAppend(divRoot,
5776
5765
 
5777
5766
  // ショートカットキーメッセージ
5778
- createDivCss2Label(
5779
- `scMsg`, scMsg,
5780
- {
5781
- x: 0, y: g_sHeight - 45, w: g_sWidth, h: 20,
5782
- siz: getFontSize(scMsg, g_sWidth, getBasicFont(), C_SIZ_MAIN),
5783
- }),
5767
+ createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc.split(`{0}`).join(g_isMac ? `Shift+${g_kCd[g_headerObj.keyRetry]}` : g_kCd[g_headerObj.keyTitleBack])
5768
+ .split(`{1}`).join(g_kCd[g_headerObj.keyRetry]), `scKcMsg`),
5784
5769
 
5785
5770
  // 別キーモード警告メッセージ
5786
5771
  createDivCss2Label(
5787
5772
  `kcMsg`,
5788
5773
  hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ? g_lblNameObj.transKeyDesc : ``,
5789
- {
5790
- x: 0, y: g_sHeight - 25, w: g_sWidth, h: 20, siz: C_SIZ_MAIN,
5791
- }, g_cssObj.keyconfig_warning
5774
+ g_lblPosObj.kcMsg, g_cssObj.keyconfig_warning
5792
5775
  ),
5793
5776
 
5794
5777
  // キーコンフィグタイプ切替ボタン
@@ -5895,11 +5878,26 @@ const keyConfigInit = (_kcType = g_kcType) => {
5895
5878
  lnkKcType.textContent = getStgDetailName(g_kcType);
5896
5879
  };
5897
5880
 
5881
+ /**
5882
+ * ColorPickerの色切替
5883
+ * @param {number} _j
5884
+ * @param {string} _type
5885
+ * @param {string} _color
5886
+ */
5887
+ const changeColorPicker = (_j, _type, _color) => {
5888
+ if (_color !== ``) {
5889
+ document.getElementById(`pick${_type}${_j}`).value = _color.slice(0, 7);
5890
+ document.getElementById(`pick${_type}${_j}`).style.display = C_DIS_INHERIT;
5891
+ } else {
5892
+ document.getElementById(`pick${_type}${_j}`).style.display = C_DIS_NONE;
5893
+ }
5894
+ };
5895
+
5898
5896
  /**
5899
5897
  * ColorTypeの制御
5900
5898
  * @param {number} _scrollNum
5901
5899
  */
5902
- const setColorType = (_scrollNum = 1) => {
5900
+ const setColorType = (_scrollNum = 1, _reloadFlg = true) => {
5903
5901
  const nextNum = getNextNum(_scrollNum, `colorTypes`, g_colorType);
5904
5902
  g_colorType = g_keycons.colorTypes[nextNum];
5905
5903
  if (g_headerObj.colorUse) {
@@ -5908,6 +5906,15 @@ const keyConfigInit = (_kcType = g_kcType) => {
5908
5906
  changeSetColor();
5909
5907
  viewGroupObj.color(`_${g_keycons.colorGroupNum}`);
5910
5908
  lnkColorType.textContent = `${getStgDetailName(g_colorType)}${g_localStorage.colorType === g_colorType ? ' *' : ''}`;
5909
+ if (_reloadFlg) {
5910
+ colorPickSprite.style.display = ([`Default`, `Type0`].includes(g_colorType) ? C_DIS_NONE : C_DIS_INHERIT);
5911
+ for (let j = 0; j < g_headerObj.setColor.length; j++) {
5912
+ changeColorPicker(j, `arrow`, g_headerObj.setColor[j]);
5913
+ changeColorPicker(j, `arrowShadow`, g_headerObj.setShadowColor[j]);
5914
+ changeColorPicker(j, `frz`, g_headerObj.frzColor[j][0]);
5915
+ changeColorPicker(j, `frzBar`, g_headerObj.frzColor[j][1]);
5916
+ }
5917
+ }
5911
5918
  };
5912
5919
 
5913
5920
  const setImgType = (_scrollNum = 1) => {
@@ -5920,6 +5927,50 @@ const keyConfigInit = (_kcType = g_kcType) => {
5920
5927
  keyConfigInit(g_kcType);
5921
5928
  };
5922
5929
 
5930
+ const colorPickSprite = createEmptySprite(divRoot, `colorPickSprite`, g_windowObj.colorPickSprite);
5931
+ if ([`Default`, `Type0`].includes(g_colorType)) {
5932
+ colorPickSprite.style.display = C_DIS_NONE;
5933
+ }
5934
+ multiAppend(colorPickSprite,
5935
+ createDivCss2Label(`lblPickArrow`, g_lblNameObj.s_arrow, Object.assign({ y: 0 }, g_lblPosObj.pickPos)),
5936
+ createDivCss2Label(`lblPickFrz`, g_lblNameObj.s_frz, Object.assign({ y: 140 }, g_lblPosObj.pickPos)),
5937
+ createCss2Button(`lnkColorCopy`, `[↓]`, _ => {
5938
+ if (window.confirm(g_msgObj.colorCopyConfirm)) {
5939
+ for (let j = 0; j < g_headerObj.setColor.length; j++) {
5940
+ g_headerObj[`frzColor${g_colorType}`][j] = [...Array(g_headerObj[`frzColor${g_colorType}`][j].length)].fill(g_headerObj[`setColor${g_colorType}`][j]);
5941
+ [``, `Bar`].forEach((val, k) =>
5942
+ document.getElementById(`pickfrz${val}${j}`).value = g_headerObj[`frzColor${g_colorType}`][j][k]);
5943
+ }
5944
+ }
5945
+ }, g_lblPosObj.lnkColorCopy, g_cssObj.button_Start),
5946
+ );
5947
+
5948
+ /**
5949
+ * ColorPicker部分の作成
5950
+ * @param {number} _j
5951
+ * @param {string} _type
5952
+ * @param {function} _func
5953
+ * @param {object} _obj
5954
+ */
5955
+ const createColorPickWindow = (_j, _type, _func, { x = 0, y = 15 } = {}) =>
5956
+ createColorPicker(colorPickSprite, `pick${_type}${_j}`, _func, { x, y: y + 25 * _j });
5957
+
5958
+ for (let j = 0; j < g_headerObj.setColor.length; j++) {
5959
+ createColorPickWindow(j, `arrow`, _ => {
5960
+ g_headerObj[`setColor${g_colorType}`][j] = document.getElementById(`pickarrow${j}`).value;
5961
+ setColorType(0, false);
5962
+ });
5963
+
5964
+ createColorPickWindow(j, `arrowShadow`, _ => {
5965
+ g_headerObj[`setShadowColor${g_colorType}`][j] = `${document.getElementById(`pickarrowShadow${j}`).value}80`;
5966
+ setColorType(0, false);
5967
+ }, { x: 25 });
5968
+
5969
+ [``, `Bar`].forEach((val, k) =>
5970
+ createColorPickWindow(j, `frz${val}`, _ =>
5971
+ g_headerObj[`frzColor${g_colorType}`][j][k] = document.getElementById(`pickfrz${val}${j}`).value, { x: 25 * k, y: 155 }));
5972
+ }
5973
+
5923
5974
  // ConfigType, ColorTypeの初期設定
5924
5975
  setConfigType(0);
5925
5976
  setColorType(0);
@@ -5952,21 +6003,15 @@ const keyConfigInit = (_kcType = g_kcType) => {
5952
6003
  g_currentj = 0;
5953
6004
  g_currentk = 0;
5954
6005
  g_prevKey = 0;
5955
- }, {
5956
- x: g_sWidth / 3, y: g_sHeight - 75,
5957
- w: g_sWidth / 3, h: C_BTN_HEIGHT / 2, siz: C_LBL_BTNSIZE * 2 / 3,
6006
+ }, Object.assign(g_lblPosObj.btnKcBack, {
5958
6007
  resetFunc: _ => (g_baseDisp === `Settings` ? optionInit() : settingsDisplayInit()),
5959
- }, g_cssObj.button_Back),
6008
+ }), g_cssObj.button_Back),
5960
6009
 
5961
- createDivCss2Label(`lblPattern`, `${g_lblNameObj.KeyPattern}: ${g_keyObj.currentPtn === -1 ? 'Self' : g_keyObj.currentPtn + 1}${lblTransKey}`, {
5962
- x: g_sWidth / 6, y: g_sHeight - 100,
5963
- w: g_sWidth / 3, h: C_BTN_HEIGHT / 2,
5964
- }),
6010
+ createDivCss2Label(`lblPattern`, `${g_lblNameObj.KeyPattern}: ${g_keyObj.currentPtn === -1 ?
6011
+ 'Self' : g_keyObj.currentPtn + 1}${lblTransKey}`, g_lblPosObj.lblPattern),
5965
6012
 
5966
6013
  // パターン変更ボタン描画(右回り)
5967
- createCss2Button(`btnPtnChangeR`, `>>`, _ => true, {
5968
- x: g_sWidth / 2, y: g_sHeight - 100,
5969
- w: g_sWidth / 6, h: C_BTN_HEIGHT / 2, siz: C_LBL_BTNSIZE * 2 / 3,
6014
+ createCss2Button(`btnPtnChangeR`, `>>`, _ => true, Object.assign(g_lblPosObj.btnPtnChangeR, {
5970
6015
  resetFunc: _ => {
5971
6016
  const tempPtn = searchPattern(g_keyObj.currentPtn + 1, 1, g_headerObj.transKeyUse, `transKey`);
5972
6017
  g_keyObj.currentPtn = (g_keyObj[`keyCtrl${g_keyObj.currentKey}_${tempPtn}`] !== undefined ?
@@ -5974,12 +6019,10 @@ const keyConfigInit = (_kcType = g_kcType) => {
5974
6019
 
5975
6020
  keyConfigInit();
5976
6021
  },
5977
- }, g_cssObj.button_Setting),
6022
+ }), g_cssObj.button_Setting),
5978
6023
 
5979
6024
  // パターン変更ボタン描画(左回り)
5980
- createCss2Button(`btnPtnChangeL`, `<<`, _ => true, {
5981
- x: 0, y: g_sHeight - 100,
5982
- w: g_sWidth / 6, h: C_BTN_HEIGHT / 2, siz: C_LBL_BTNSIZE * 2 / 3,
6025
+ createCss2Button(`btnPtnChangeL`, `<<`, _ => true, Object.assign(g_lblPosObj.btnPtnChangeL, {
5983
6026
  resetFunc: _ => {
5984
6027
  const tempPtn = searchPattern(g_keyObj.currentPtn - 1, -1, g_headerObj.transKeyUse, `transKey`);
5985
6028
  g_keyObj.currentPtn = (g_keyObj[`keyCtrl${g_keyObj.currentKey}_${tempPtn}`] !== undefined ?
@@ -5987,7 +6030,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
5987
6030
 
5988
6031
  keyConfigInit();
5989
6032
  },
5990
- }, g_cssObj.button_Setting),
6033
+ }), g_cssObj.button_Setting),
5991
6034
 
5992
6035
  // キーコンフィグリセットボタン描画
5993
6036
  createCss2Button(`btnReset`, g_lblNameObj.b_reset, _ => {
@@ -6002,10 +6045,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6002
6045
  resetCursor(Number(g_kcType === `Replaced`));
6003
6046
  keyconSprite.scrollLeft = - maxLeftX;
6004
6047
  }
6005
- }, {
6006
- x: 0, y: g_sHeight - 75,
6007
- w: g_sWidth / 3, h: C_BTN_HEIGHT / 2, siz: C_LBL_BTNSIZE * 2 / 3,
6008
- }, g_cssObj.button_Reset),
6048
+ }, g_lblPosObj.btnKcReset, g_cssObj.button_Reset),
6009
6049
 
6010
6050
  // プレイ開始
6011
6051
  makePlayButton(_ => loadMusic())
@@ -7905,10 +7945,9 @@ const MainInit = _ => {
7905
7945
  }, g_cssObj.main_stepKeyDown),
7906
7946
 
7907
7947
  // ヒット時モーション
7908
- createColorObject2(`stepHit${j}`, {
7909
- x: -15, y: -15, w: C_ARW_WIDTH + 30, h: C_ARW_WIDTH + 30,
7948
+ createColorObject2(`stepHit${j}`, Object.assign(g_lblPosObj.stepHit, {
7910
7949
  rotate: g_workObj.stepHitRtn[j], styleName: `StepHit`, opacity: 0,
7911
- }, g_cssObj.main_stepDefault),
7950
+ }), g_cssObj.main_stepDefault),
7912
7951
 
7913
7952
  );
7914
7953
  }
@@ -7929,23 +7968,13 @@ const MainInit = _ => {
7929
7968
 
7930
7969
  // Hidden+, Sudden+用のライン、パーセント表示
7931
7970
  const filterCss = g_stateObj.filterLock === C_FLG_OFF ? g_cssObj.life_Failed : g_cssObj.life_Cleared;
7932
- [`filterBar0`, `filterBar1`, `borderBar0`, `borderBar1`].forEach(obj => {
7933
- mainSprite.appendChild(
7934
- createColorObject2(`${obj}`, {
7935
- w: g_headerObj.playingWidth - 50, h: 1, styleName: `lifeBar`,
7936
- opacity: 0.0625,
7937
- }, filterCss)
7938
- );
7939
- });
7971
+ [`filterBar0`, `filterBar1`, `borderBar0`, `borderBar1`].forEach(obj =>
7972
+ mainSprite.appendChild(createColorObject2(obj, g_lblPosObj.filterBar, filterCss)));
7940
7973
  borderBar0.style.top = `${g_posObj.stepDiffY}px`;
7941
7974
  borderBar1.style.top = `${g_posObj.stepDiffY + g_posObj.arrowHeight}px`;
7942
7975
 
7943
7976
  if (g_appearanceRanges.includes(g_stateObj.appearance)) {
7944
- mainSprite.appendChild(
7945
- createDivCss2Label(`filterView`, ``, {
7946
- x: g_headerObj.playingWidth - 70, y: 0, w: 10, h: 10, siz: 10, align: C_ALIGN_RIGHT,
7947
- })
7948
- );
7977
+ mainSprite.appendChild(createDivCss2Label(`filterView`, ``, g_lblPosObj.filterView));
7949
7978
  if (g_stateObj.d_filterline === C_FLG_ON) {
7950
7979
  [`filterBar0`, `filterBar1`, `filterView`].forEach(obj => {
7951
7980
  $id(obj).opacity = g_stateObj.opacity / 100;
@@ -7973,7 +8002,7 @@ const MainInit = _ => {
7973
8002
  if (isNaN(parseFloat(g_workObj.arrowRtn[j]))) {
7974
8003
  multiAppend(frzHit,
7975
8004
  createColorObject2(`frzHitShadow${j}`, {
7976
- rotate: g_workObj.arrowRtn[j], styleName: `Shadow`
8005
+ rotate: g_workObj.arrowRtn[j], styleName: `Shadow`,
7977
8006
  }, g_cssObj.main_objShadow),
7978
8007
  createColorObject2(`frzHitTop${j}`, {
7979
8008
  background: g_workObj.frzHitColors[j], rotate: g_workObj.arrowRtn[j],
@@ -7981,10 +8010,9 @@ const MainInit = _ => {
7981
8010
  );
7982
8011
  } else {
7983
8012
  frzHit.appendChild(
7984
- createColorObject2(`frzHitTop${j}`, {
7985
- x: -8, y: -8, w: C_ARW_WIDTH + 16, h: C_ARW_WIDTH + 16,
8013
+ createColorObject2(`frzHitTop${j}`, Object.assign(g_lblPosObj.frzHitTop, {
7986
8014
  rotate: g_workObj.arrowRtn[j], styleName: `Shadow`,
7987
- }, g_cssObj.main_frzHitTop)
8015
+ }), g_cssObj.main_frzHitTop)
7988
8016
  );
7989
8017
  }
7990
8018
  }
@@ -8111,24 +8139,16 @@ const MainInit = _ => {
8111
8139
  }, g_cssObj.life_Border, g_cssObj.life_BorderColor),
8112
8140
 
8113
8141
  // 曲名・アーティスト名表示
8114
- createDivCss2Label(`lblCredit`, creditName, {
8115
- x: 125, y: g_sHeight - 30, w: g_headerObj.playingWidth - 125, h: 20, siz: checkMusicSiz(creditName, C_SIZ_MUSIC_TITLE), align: C_ALIGN_LEFT,
8116
- }),
8142
+ createDivCss2Label(`lblCredit`, creditName, Object.assign(g_lblPosObj.lblCredit, { siz: checkMusicSiz(creditName, C_SIZ_MUSIC_TITLE) })),
8117
8143
 
8118
8144
  // 譜面名表示
8119
- createDivCss2Label(`lblDifName`, difName, {
8120
- x: 125, y: g_sHeight - 16, w: g_headerObj.playingWidth, h: 20, siz: checkMusicSiz(difName, 12), align: C_ALIGN_LEFT,
8121
- }),
8145
+ createDivCss2Label(`lblDifName`, difName, Object.assign(g_lblPosObj.lblDifName, { siz: checkMusicSiz(difName, 12) })),
8122
8146
 
8123
8147
  // 曲時間表示:現在時間
8124
- createDivCss2Label(`lblTime1`, `-:--`, {
8125
- x: 18, y: g_sHeight - 30, w: 40, h: 20, siz: C_SIZ_MAIN, align: C_ALIGN_RIGHT, display: g_workObj.musicinfoDisp,
8126
- }),
8148
+ createDivCss2Label(`lblTime1`, `-:--`, Object.assign(g_lblPosObj.lblTime1, { display: g_workObj.musicinfoDisp })),
8127
8149
 
8128
8150
  // 曲時間表示:総時間
8129
- createDivCss2Label(`lblTime2`, `/ ${fullTime}`, {
8130
- x: 60, y: g_sHeight - 30, w: 60, h: 20, siz: C_SIZ_MAIN, display: g_workObj.musicinfoDisp,
8131
- }),
8151
+ createDivCss2Label(`lblTime2`, `/ ${fullTime}`, Object.assign(g_lblPosObj.lblTime2, { display: g_workObj.musicinfoDisp })),
8132
8152
  );
8133
8153
 
8134
8154
  // ボーダーライン表示
@@ -8141,11 +8161,7 @@ const MainInit = _ => {
8141
8161
  const wordSprite = createEmptySprite(judgeSprite, `wordSprite`, { w: g_headerObj.playingWidth });
8142
8162
  for (let j = 0; j <= g_scoreObj.wordMaxDepth; j++) {
8143
8163
  const wordY = (j % 2 === 0 ? 10 : (g_headerObj.bottomWordSetFlg ? g_posObj.distY + 10 : g_sHeight - 60));
8144
- wordSprite.appendChild(createDivCss2Label(`lblword${j}`, ``, {
8145
- x: 100, y: wordY, w: g_headerObj.playingWidth - 200, h: 50,
8146
- siz: C_SIZ_MAIN, align: C_ALIGN_LEFT, fontFamily: getBasicFont(),
8147
- display: `block`, margin: `auto`,
8148
- }));
8164
+ wordSprite.appendChild(createDivCss2Label(`lblword${j}`, ``, Object.assign(g_lblPosObj.lblWord, { y: wordY, fontFamily: getBasicFont() })));
8149
8165
  }
8150
8166
 
8151
8167
  const jdgGroups = [`J`, `FJ`];
@@ -8200,17 +8216,11 @@ const MainInit = _ => {
8200
8216
  });
8201
8217
 
8202
8218
  // パーフェクト演出
8203
- judgeSprite.appendChild(
8204
- createDivCss2Label(`finishView`, ``, {
8205
- x: g_headerObj.playingWidth / 2 - 150, y: g_sHeight / 2 - 50, w: 300, h: 20, siz: 50,
8206
- }, g_cssObj.common_kita)
8207
- );
8219
+ judgeSprite.appendChild(createDivCss2Label(`finishView`, ``, g_lblPosObj.finishView, g_cssObj.common_kita));
8208
8220
 
8209
8221
  // 曲情報OFF
8210
8222
  if (g_stateObj.d_musicinfo === C_FLG_OFF) {
8211
- [`lblCredit`, `lblDifName`].forEach(labelName => {
8212
- changeStyle(labelName, { x: 20, animationDuration: `4.0s`, animationName: `leftToRightFade`, animationFillMode: `both` });
8213
- });
8223
+ [`lblCredit`, `lblDifName`].forEach(labelName => changeStyle(labelName, g_lblPosObj.musicInfoOFF));
8214
8224
  }
8215
8225
 
8216
8226
  // ローカル時のみフレーム数を残す
@@ -9581,10 +9591,9 @@ const resultInit = _ => {
9581
9591
  const scoreIdHeader = setScoreIdHeader(g_stateObj.scoreId, g_stateObj.scoreLockFlg);
9582
9592
 
9583
9593
  g_animationData.forEach(sprite => {
9584
- if (g_rootObj[`${sprite}failedS${scoreIdHeader}_data`] !== undefined) {
9585
- [g_headerObj[`${sprite}ResultData`], g_headerObj[`${sprite}ResultMaxDepth`]] = makeSpriteData(g_rootObj[`${sprite}failedS${scoreIdHeader}_data`]);
9586
- } else if (g_rootObj[`${sprite}failedS_data`] !== undefined) {
9587
- [g_headerObj[`${sprite}ResultData`], g_headerObj[`${sprite}ResultMaxDepth`]] = makeSpriteData(g_rootObj[`${sprite}failedS_data`]);
9594
+ const failedData = g_rootObj[`${sprite}failedS${scoreIdHeader}_data`] ?? g_rootObj[`${sprite}failedS_data`];
9595
+ if (failedData !== undefined) {
9596
+ [g_headerObj[`${sprite}ResultData`], g_headerObj[`${sprite}ResultMaxDepth`]] = makeSpriteData(failedData);
9588
9597
  }
9589
9598
  });
9590
9599
  } else if (g_gameOverFlg) {
@@ -9624,8 +9633,7 @@ const resultInit = _ => {
9624
9633
 
9625
9634
  // スコア計算(一括)
9626
9635
  const scoreTmp = Object.keys(g_pointAllocation).reduce(
9627
- (score, name) => score + g_resultObj[name] * g_pointAllocation[name]
9628
- , 0)
9636
+ (score, name) => score + g_resultObj[name] * g_pointAllocation[name], 0);
9629
9637
 
9630
9638
  const allScore = g_fullArrows * 10;
9631
9639
  const resultScore = Math.round(scoreTmp / allScore * g_maxScore) || 0;
@@ -9768,35 +9776,25 @@ const resultInit = _ => {
9768
9776
 
9769
9777
  // ランク描画
9770
9778
  resultWindow.appendChild(
9771
- createDivCss2Label(`lblRank`, rankMark, {
9772
- x: 340, y: 160, w: 70, h: 20, siz: 50, align: C_ALIGN_CENTER,
9779
+ createDivCss2Label(`lblRank`, rankMark, Object.assign(g_lblPosObj.lblRank, {
9773
9780
  color: rankColor, fontFamily: getBasicFont(`"Bookman Old Style"`),
9774
- })
9781
+ }))
9775
9782
  );
9776
9783
 
9777
9784
  // Cleared & Failed表示
9778
9785
  const lblResultPre = createDivCss2Label(
9779
9786
  `lblResultPre`,
9780
9787
  resultViewText(g_gameOverFlg ? `failed` : `cleared`),
9781
- {
9782
- x: g_sWidth / 2 - 150, y: g_sHeight / 2 - 160,
9783
- w: 200, h: 50, siz: 60,
9784
- opacity: 0, animationDuration: (g_gameOverFlg ? `3s` : `2.5s`),
9788
+ Object.assign(g_lblPosObj.lblResultPre, {
9789
+ animationDuration: (g_gameOverFlg ? `3s` : `2.5s`),
9785
9790
  animationName: (g_gameOverFlg ? `upToDownFade` : `leftToRightFade`)
9786
- }, g_cssObj.result_Cleared, g_cssObj.result_Window
9791
+ }), g_cssObj.result_Cleared, g_cssObj.result_Window
9787
9792
  );
9788
9793
  divRoot.appendChild(lblResultPre);
9789
9794
 
9790
- divRoot.appendChild(
9791
- createDivCss2Label(
9792
- `lblResultPre2`,
9793
- resultViewText(g_gameOverFlg ? `failed` :
9794
- (playingArrows === g_fullArrows ? g_resultObj.spState : ``)),
9795
- {
9796
- x: g_sWidth / 2 + 50, y: 40, w: 200, h: 30, siz: 20,
9797
- }, g_cssObj.result_Cleared
9798
- )
9799
- );
9795
+ divRoot.appendChild(createDivCss2Label(`lblResultPre2`,
9796
+ resultViewText(g_gameOverFlg ? `failed` : (playingArrows === g_fullArrows ? g_resultObj.spState : ``)),
9797
+ g_lblPosObj.lblResultPre2, g_cssObj.result_Cleared));
9800
9798
 
9801
9799
  // プレイデータは Cleared & Failed に合わせて表示
9802
9800
  playDataWindow.style.animationDuration = `3s`;
@@ -9928,57 +9926,39 @@ const resultInit = _ => {
9928
9926
  const resultText = `${unEscapeHtml(tweetResultTmp)}`;
9929
9927
  const tweetResult = `https://twitter.com/intent/tweet?text=${encodeURIComponent(resultText)}`;
9930
9928
 
9931
- // ボタン描画
9932
- multiAppend(divRoot,
9933
-
9934
- // タイトル画面へ戻る
9935
- createCss2Button(`btnBack`, g_lblNameObj.b_back, _ => {
9929
+ /** 音源、ループ処理の停止 */
9930
+ const resetCommonBtn = (_id, _name, _posObj, _func, _cssClass) =>
9931
+ createCss2Button(_id, _name, _ => {
9936
9932
  if (g_finishFlg) {
9937
9933
  g_audio.pause();
9938
9934
  }
9939
9935
  clearTimeout(g_timeoutEvtId);
9940
9936
  clearTimeout(g_timeoutEvtResultId);
9941
- }, {
9942
- w: g_sWidth / 4, h: C_BTN_HEIGHT * 5 / 4,
9943
- animationName: `smallToNormalY`, resetFunc: _ => titleInit(),
9944
- }, g_cssObj.button_Back),
9937
+ }, Object.assign(_posObj, { resetFunc: _func }), _cssClass);
9938
+
9939
+ // ボタン描画
9940
+ multiAppend(divRoot,
9941
+
9942
+ // タイトル画面へ戻る
9943
+ resetCommonBtn(`btnBack`, g_lblNameObj.b_back, g_lblPosObj.btnRsBack, titleInit, g_cssObj.button_Back),
9945
9944
 
9946
9945
  // リザルトデータをクリップボードへコピー
9947
9946
  createCss2Button(`btnCopy`, g_lblNameObj.b_copy, _ => {
9948
9947
  copyTextToClipboard(resultText, g_msgInfoObj.I_0001);
9949
- }, {
9950
- x: g_sWidth / 4,
9951
- w: g_sWidth / 2,
9952
- h: C_BTN_HEIGHT * 5 / 8, siz: 24,
9953
- animationName: `smallToNormalY`,
9954
- }, g_cssObj.button_Setting),
9948
+ }, g_lblPosObj.btnRsCopy, g_cssObj.button_Setting),
9955
9949
 
9956
9950
  // リザルトデータをTwitterへ転送
9957
- createCss2Button(`btnTweet`, g_lblNameObj.b_tweet, _ => true, {
9958
- x: g_sWidth / 4, y: g_sHeight - 100 + C_BTN_HEIGHT * 5 / 8,
9959
- w: g_sWidth / 4, h: C_BTN_HEIGHT * 5 / 8, siz: 24,
9960
- animationName: `smallToNormalY`, resetFunc: _ => openLink(tweetResult),
9961
- }, g_cssObj.button_Tweet),
9951
+ createCss2Button(`btnTweet`, g_lblNameObj.b_tweet, _ => true, Object.assign(g_lblPosObj.btnRsTweet, {
9952
+ resetFunc: _ => openLink(tweetResult),
9953
+ }), g_cssObj.button_Tweet),
9962
9954
 
9963
9955
  // Gitterへのリンク
9964
- createCss2Button(`btnGitter`, g_lblNameObj.b_gitter, _ => true, {
9965
- x: g_sWidth / 2, y: g_sHeight - 100 + C_BTN_HEIGHT * 5 / 8,
9966
- w: g_sWidth / 4, h: C_BTN_HEIGHT * 5 / 8, siz: 24,
9967
- animationName: `smallToNormalY`, resetFunc: _ => openLink(`https://gitter.im/danonicw/freeboard`),
9968
- }, g_cssObj.button_Default),
9956
+ createCss2Button(`btnGitter`, g_lblNameObj.b_gitter, _ => true, Object.assign(g_lblPosObj.btnRsGitter, {
9957
+ resetFunc: _ => openLink(`https://gitter.im/danonicw/freeboard`),
9958
+ }), g_cssObj.button_Default),
9969
9959
 
9970
9960
  // リトライ
9971
- createCss2Button(`btnRetry`, g_lblNameObj.b_retry, _ => {
9972
- if (g_finishFlg) {
9973
- g_audio.pause();
9974
- }
9975
- clearTimeout(g_timeoutEvtId);
9976
- clearTimeout(g_timeoutEvtResultId);
9977
- }, {
9978
- x: g_sWidth / 4 * 3,
9979
- w: g_sWidth / 4, h: C_BTN_HEIGHT * 5 / 4,
9980
- animationName: `smallToNormalY`, resetFunc: _ => loadMusic(),
9981
- }, g_cssObj.button_Reset),
9961
+ resetCommonBtn(`btnRetry`, g_lblNameObj.b_retry, g_lblPosObj.btnRsRetry, loadMusic, g_cssObj.button_Reset),
9982
9962
  );
9983
9963
 
9984
9964
  // マスクスプライトを作成