danoniplus 34.1.0 → 34.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/danoni/danoni3.html +2 -2
- package/js/danoni_main.js +142 -148
- package/js/lib/danoni_constants.js +55 -25
- package/package.json +1 -1
package/danoni/danoni3.html
CHANGED
|
@@ -105,8 +105,8 @@ a:hover { color:#FF9900; text-decoration: underline; }
|
|
|
105
105
|
キーコンフィグ(KeyConfig)にてキーの変更が可能です。<br>
|
|
106
106
|
<br>
|
|
107
107
|
推奨ブラウザ:<br>
|
|
108
|
-
Google Chrome, Opera, Vivaldi などWebkit系ブラウザ<br>
|
|
109
|
-
(
|
|
108
|
+
Google Chrome, Opera, Vivaldi, Microsoft Edge, Safari などWebkit系ブラウザ<br>
|
|
109
|
+
(IE及び、Firefoxのローカル起動は動作保証外です。)<br>
|
|
110
110
|
<br>
|
|
111
111
|
GitHub:<br>
|
|
112
112
|
<a href="https://github.com/cwtickle/danoniplus">https://github.com/cwtickle/danoniplus</a><br>
|
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 : 2023/
|
|
7
|
+
* Revised : 2023/10/13
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 34.
|
|
12
|
-
const g_revisedDate = `2023/
|
|
11
|
+
const g_version = `Ver 34.3.0`;
|
|
12
|
+
const g_revisedDate = `2023/10/13`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -300,6 +300,14 @@ const setVal = (_checkStr, _default, _type = C_TYP_STRING) =>
|
|
|
300
300
|
*/
|
|
301
301
|
const boolToSwitch = _condition => _condition ? C_FLG_ON : C_FLG_OFF;
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* 単位付きの値を返却
|
|
305
|
+
* @param {number} _val
|
|
306
|
+
* @param {string} _unitName
|
|
307
|
+
* @returns
|
|
308
|
+
*/
|
|
309
|
+
const wUnit = (_val, _unitName = `px`) => `${_val}${_unitName}`;
|
|
310
|
+
|
|
303
311
|
/**
|
|
304
312
|
* ブール値への変換
|
|
305
313
|
* @param {string} _val
|
|
@@ -500,7 +508,7 @@ const escapeHtmlForArray = _array => _array.map(str => escapeHtml(str));
|
|
|
500
508
|
* @param {number} _num
|
|
501
509
|
* @param {number} _length
|
|
502
510
|
*/
|
|
503
|
-
const nextPos = (_basePos, _num, _length) => (_basePos +
|
|
511
|
+
const nextPos = (_basePos, _num, _length) => (_basePos + _num + _length) % _length;
|
|
504
512
|
|
|
505
513
|
/*-----------------------------------------------------------*/
|
|
506
514
|
/* キーコード関連 */
|
|
@@ -810,14 +818,12 @@ const getFilePath = (_fileName, _directory = ``) => {
|
|
|
810
818
|
const preloadImgFile = (_imgPath, { directory = ``, syncBackPath = true } = {}) => {
|
|
811
819
|
|
|
812
820
|
let imgPath = _imgPath;
|
|
813
|
-
if (g_headerObj.autoPreload) {
|
|
814
|
-
if (
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
imgPath = `${dir}${file}`;
|
|
818
|
-
}
|
|
819
|
-
preloadFile(`image`, imgPath);
|
|
821
|
+
if (g_headerObj.autoPreload && checkImage(_imgPath)) {
|
|
822
|
+
if (syncBackPath) {
|
|
823
|
+
const [file, dir] = getFilePath(_imgPath, directory);
|
|
824
|
+
imgPath = `${dir}${file}`;
|
|
820
825
|
}
|
|
826
|
+
preloadFile(`image`, imgPath);
|
|
821
827
|
}
|
|
822
828
|
return imgPath;
|
|
823
829
|
};
|
|
@@ -999,7 +1005,7 @@ const getBasicFont = (_priorityFont = ``) =>
|
|
|
999
1005
|
*/
|
|
1000
1006
|
const getStrWidth = (_str, _fontsize, _font) => {
|
|
1001
1007
|
const ctx = document.createElement(`canvas`).getContext(`2d`);
|
|
1002
|
-
ctx.font = `${_fontsize}
|
|
1008
|
+
ctx.font = `${wUnit(_fontsize)} ${_font}`;
|
|
1003
1009
|
return ctx.measureText(unEscapeHtml(_str)).width;
|
|
1004
1010
|
};
|
|
1005
1011
|
|
|
@@ -1051,10 +1057,10 @@ const createDiv = (_id, _x, _y, _width, _height, _classes = []) => {
|
|
|
1051
1057
|
|
|
1052
1058
|
div.id = _id;
|
|
1053
1059
|
const style = div.style;
|
|
1054
|
-
style.left =
|
|
1055
|
-
style.top =
|
|
1056
|
-
style.width =
|
|
1057
|
-
style.height =
|
|
1060
|
+
style.left = wUnit(_x);
|
|
1061
|
+
style.top = wUnit(_y);
|
|
1062
|
+
style.width = wUnit(_width);
|
|
1063
|
+
style.height = wUnit(_height);
|
|
1058
1064
|
style.position = `absolute`;
|
|
1059
1065
|
div.classList.add(..._classes);
|
|
1060
1066
|
setUserSelect(style);
|
|
@@ -1085,7 +1091,7 @@ const createDivCss2Label = (_id, _text, { x = 0, y = 0, w = g_limitObj.setLblWid
|
|
|
1085
1091
|
const div = createDiv(_id, x, y, w, h, [g_cssObj.title_base, ..._classes]);
|
|
1086
1092
|
|
|
1087
1093
|
const style = div.style;
|
|
1088
|
-
style.fontSize =
|
|
1094
|
+
style.fontSize = wUnit(siz);
|
|
1089
1095
|
style.fontFamily = getBasicFont();
|
|
1090
1096
|
style.textAlign = `${align}`;
|
|
1091
1097
|
div.innerHTML = _text;
|
|
@@ -1105,7 +1111,7 @@ const createDivCss2Label = (_id, _text, { x = 0, y = 0, w = g_limitObj.setLblWid
|
|
|
1105
1111
|
*/
|
|
1106
1112
|
const createImg = (_id, _imgPath, _x, _y, _width, _height) => {
|
|
1107
1113
|
const div = createDiv(_id, _x, _y, _width, _height);
|
|
1108
|
-
div.innerHTML = `<img id="${_id}img" src="${_imgPath}" style="width:${_width}
|
|
1114
|
+
div.innerHTML = `<img id="${_id}img" src="${_imgPath}" style="width:${wUnit(_width)};height:${wUnit(_height)}"${g_isFile ? `` : ` crossOrigin="anonimous"`}>`;
|
|
1109
1115
|
|
|
1110
1116
|
return div;
|
|
1111
1117
|
};
|
|
@@ -1121,8 +1127,8 @@ const createColorPicker = (_parentObj, _id, _func, { x = 0, y = 0 } = {}) => {
|
|
|
1121
1127
|
const picker = document.createElement(`input`);
|
|
1122
1128
|
picker.setAttribute(`type`, `color`);
|
|
1123
1129
|
picker.id = _id;
|
|
1124
|
-
picker.style.left =
|
|
1125
|
-
picker.style.top =
|
|
1130
|
+
picker.style.left = wUnit(x);
|
|
1131
|
+
picker.style.top = wUnit(y);
|
|
1126
1132
|
picker.style.position = `absolute`;
|
|
1127
1133
|
picker.addEventListener(`change`, _func);
|
|
1128
1134
|
_parentObj.appendChild(picker);
|
|
@@ -1275,7 +1281,7 @@ const createCss2Button = (_id, _text, _func = _ => true, { x = 0, y = g_sHeight
|
|
|
1275
1281
|
|
|
1276
1282
|
const style = div.style;
|
|
1277
1283
|
style.textAlign = align;
|
|
1278
|
-
style.fontSize =
|
|
1284
|
+
style.fontSize = wUnit(siz);
|
|
1279
1285
|
style.fontFamily = getBasicFont();
|
|
1280
1286
|
if (rest.animationName !== undefined) {
|
|
1281
1287
|
style.animationDuration = `1s`;
|
|
@@ -1347,7 +1353,7 @@ const changeStyle = (_id, { x, y, w, h, siz, align, title, ...rest } = {}) => {
|
|
|
1347
1353
|
fontSize: siz,
|
|
1348
1354
|
};
|
|
1349
1355
|
Object.keys(obj).filter(property => setVal(obj[property], ``, C_TYP_FLOAT) !== ``)
|
|
1350
|
-
.forEach(property => style[property] =
|
|
1356
|
+
.forEach(property => style[property] = wUnit(obj[property]));
|
|
1351
1357
|
|
|
1352
1358
|
if (align !== undefined) {
|
|
1353
1359
|
style.textAlign = `${align}`;
|
|
@@ -1380,6 +1386,18 @@ const resetKeyControl = _ => {
|
|
|
1380
1386
|
g_inputKeyBuffer = {};
|
|
1381
1387
|
};
|
|
1382
1388
|
|
|
1389
|
+
/**
|
|
1390
|
+
* Canvasのベース背景を作成
|
|
1391
|
+
* @param {*} _ctx
|
|
1392
|
+
*/
|
|
1393
|
+
const makeBgCanvas = (_ctx, { w = g_sWidth, h = g_sHeight } = {}) => {
|
|
1394
|
+
const grd = _ctx.createLinearGradient(0, 0, 0, h);
|
|
1395
|
+
grd.addColorStop(0, `#000000`);
|
|
1396
|
+
grd.addColorStop(1, `#222222`);
|
|
1397
|
+
_ctx.fillStyle = grd;
|
|
1398
|
+
_ctx.fillRect(0, 0, w, h);
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1383
1401
|
/**
|
|
1384
1402
|
* 画面上の描画・オブジェクトを全てクリアし、背景を再描画
|
|
1385
1403
|
* - divオブジェクト(ボタンなど)はdivRoot配下で管理しているため、子要素のみを全削除している。
|
|
@@ -1430,14 +1448,10 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
|
|
|
1430
1448
|
|
|
1431
1449
|
if (_redrawFlg) {
|
|
1432
1450
|
// 画面背景を指定 (background-color)
|
|
1433
|
-
$id(`canvas-frame`).width =
|
|
1451
|
+
$id(`canvas-frame`).width = wUnit(g_sWidth + diffX);
|
|
1434
1452
|
layer0.width = g_sWidth + diffX;
|
|
1435
|
-
const grd = l0ctx.createLinearGradient(0, 0, 0, g_sHeight);
|
|
1436
1453
|
if (!g_headerObj[`customBack${_customDisplayName}Use`]) {
|
|
1437
|
-
|
|
1438
|
-
grd.addColorStop(1, `#222222`);
|
|
1439
|
-
l0ctx.fillStyle = grd;
|
|
1440
|
-
l0ctx.fillRect(0, 0, g_sWidth + diffX, g_sHeight);
|
|
1454
|
+
makeBgCanvas(l0ctx, { w: g_sWidth + diffX });
|
|
1441
1455
|
}
|
|
1442
1456
|
}
|
|
1443
1457
|
}
|
|
@@ -1452,7 +1466,7 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
|
|
|
1452
1466
|
if (document.querySelector(`#layer0`) === null ||
|
|
1453
1467
|
(!g_headerObj[`customBack${_customDisplayName}Use`] && !g_headerObj.defaultSkinFlg)) {
|
|
1454
1468
|
|
|
1455
|
-
$id(`canvas-frame`).width =
|
|
1469
|
+
$id(`canvas-frame`).width = wUnit(g_sWidth + diffX);
|
|
1456
1470
|
createEmptySprite(divRoot, `divBack`, { w: g_sWidth + diffX });
|
|
1457
1471
|
}
|
|
1458
1472
|
|
|
@@ -1519,12 +1533,12 @@ const getCssCustomProperties = _ => {
|
|
|
1519
1533
|
* @param {object} _obj
|
|
1520
1534
|
*/
|
|
1521
1535
|
const makeSpriteImage = _obj => {
|
|
1522
|
-
let tmpInnerHTML = `<img src=${_obj.path} class="${_obj.class}" style="position:absolute;left:${_obj.left}
|
|
1536
|
+
let tmpInnerHTML = `<img src=${_obj.path} class="${_obj.class}" style="position:absolute;left:${wUnit(_obj.left)};top:${wUnit(_obj.top)}`;
|
|
1523
1537
|
if (_obj.width > 0) {
|
|
1524
|
-
tmpInnerHTML += `;width:${_obj.width}
|
|
1538
|
+
tmpInnerHTML += `;width:${wUnit(_obj.width)}`;
|
|
1525
1539
|
}
|
|
1526
1540
|
if (setIntVal(_obj.height) > 0) {
|
|
1527
|
-
tmpInnerHTML += `;height:${_obj.height}
|
|
1541
|
+
tmpInnerHTML += `;height:${wUnit(_obj.height)}`;
|
|
1528
1542
|
}
|
|
1529
1543
|
tmpInnerHTML += `;animation-name:${_obj.animationName};animation-duration:${_obj.animationDuration}s;opacity:${_obj.opacity}">`;
|
|
1530
1544
|
return tmpInnerHTML;
|
|
@@ -1535,11 +1549,11 @@ const makeSpriteImage = _obj => {
|
|
|
1535
1549
|
* @param {object} _obj
|
|
1536
1550
|
*/
|
|
1537
1551
|
const makeSpriteText = _obj => {
|
|
1538
|
-
let tmpInnerHTML = `<span class="${_obj.class}" style="display:inline-block;position:absolute;left:${_obj.left}
|
|
1552
|
+
let tmpInnerHTML = `<span class="${_obj.class}" style="display:inline-block;position:absolute;left:${wUnit(_obj.left)};top:${wUnit(_obj.top)}`;
|
|
1539
1553
|
|
|
1540
1554
|
// この場合のwidthは font-size と解釈する
|
|
1541
1555
|
if (_obj.width > 0) {
|
|
1542
|
-
tmpInnerHTML += `;font-size:${_obj.width}
|
|
1556
|
+
tmpInnerHTML += `;font-size:${wUnit(_obj.width)}`;
|
|
1543
1557
|
}
|
|
1544
1558
|
|
|
1545
1559
|
// この場合のheightは color と解釈する
|
|
@@ -1973,12 +1987,7 @@ const initialControl = async () => {
|
|
|
1973
1987
|
// 背景の表示
|
|
1974
1988
|
if (document.querySelector(`#layer0`) !== null) {
|
|
1975
1989
|
const layer0 = document.querySelector(`#layer0`);
|
|
1976
|
-
|
|
1977
|
-
const grd = l0ctx.createLinearGradient(0, 0, 0, g_sHeight);
|
|
1978
|
-
grd.addColorStop(0, `#000000`);
|
|
1979
|
-
grd.addColorStop(1, `#222222`);
|
|
1980
|
-
l0ctx.fillStyle = grd;
|
|
1981
|
-
l0ctx.fillRect(0, 0, g_sWidth, g_sHeight);
|
|
1990
|
+
makeBgCanvas(layer0.getContext(`2d`));
|
|
1982
1991
|
} else {
|
|
1983
1992
|
createEmptySprite(divRoot, `divBack`, g_windowObj.divBack);
|
|
1984
1993
|
}
|
|
@@ -2057,8 +2066,8 @@ const initialControl = async () => {
|
|
|
2057
2066
|
g_headerObj.keyLists.forEach(key => widthList.push(g_keyObj[`minWidth${key}`] ?? g_keyObj.minWidthDefault));
|
|
2058
2067
|
|
|
2059
2068
|
g_sWidth = Math.max(...widthList);
|
|
2060
|
-
$id(`canvas-frame`).width =
|
|
2061
|
-
$id(`divRoot`).width =
|
|
2069
|
+
$id(`canvas-frame`).width = wUnit(g_sWidth);
|
|
2070
|
+
$id(`divRoot`).width = wUnit(g_sWidth);
|
|
2062
2071
|
}
|
|
2063
2072
|
if (g_headerObj.playingWidth === `default`) {
|
|
2064
2073
|
g_headerObj.playingWidth = g_sWidth;
|
|
@@ -2174,6 +2183,7 @@ const loadLocalStorage = _ => {
|
|
|
2174
2183
|
g_localeObj.num = g_localeObj.list.findIndex(val => val === g_localeObj.val);
|
|
2175
2184
|
}
|
|
2176
2185
|
Object.assign(g_msgInfoObj, g_lang_msgInfoObj[g_localeObj.val]);
|
|
2186
|
+
Object.assign(g_kCd, g_lang_kCd[g_localeObj.val]);
|
|
2177
2187
|
|
|
2178
2188
|
// 作品別ローカルストレージの読込
|
|
2179
2189
|
const checkStorage = localStorage.getItem(g_localStorageUrl);
|
|
@@ -2313,8 +2323,7 @@ const copySetColor = (_baseObj, _scoreId) => {
|
|
|
2313
2323
|
* @param {number} _scoreId
|
|
2314
2324
|
*/
|
|
2315
2325
|
const getMusicUrl = _scoreId =>
|
|
2316
|
-
g_headerObj.musicUrls
|
|
2317
|
-
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ?? g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2326
|
+
g_headerObj.musicUrls?.[g_headerObj.musicNos[_scoreId]] ?? g_headerObj.musicUrls?.[0] ?? `nosound.mp3`;
|
|
2318
2327
|
|
|
2319
2328
|
/**
|
|
2320
2329
|
* 譜面ファイル読込後処理(譜面詳細情報取得用)
|
|
@@ -2480,7 +2489,7 @@ const calcLevel = _scoreObj => {
|
|
|
2480
2489
|
allScorebook.push(allScorebook.at(-1) + 100);
|
|
2481
2490
|
const allCnt = allScorebook.length;
|
|
2482
2491
|
|
|
2483
|
-
frzEndData.push(allScorebook
|
|
2492
|
+
frzEndData.push(allScorebook.at(-1));
|
|
2484
2493
|
|
|
2485
2494
|
//--------------------------------------------------------------
|
|
2486
2495
|
//<間隔フレーム数の調和平均計算+いろいろ補正>
|
|
@@ -2688,18 +2697,16 @@ const headerConvert = _dosObj => {
|
|
|
2688
2697
|
} else if (g_presetObj.imageSets !== undefined) {
|
|
2689
2698
|
tmpImgTypes = g_presetObj.imageSets.concat();
|
|
2690
2699
|
}
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
});
|
|
2702
|
-
}
|
|
2700
|
+
tmpImgTypes.forEach((tmpImgType, j) => {
|
|
2701
|
+
const imgTypes = tmpImgType.split(`,`);
|
|
2702
|
+
obj.imgType[j] = {
|
|
2703
|
+
name: imgTypes[0],
|
|
2704
|
+
extension: imgTypes[1] || `svg`,
|
|
2705
|
+
rotateEnabled: setBoolVal(imgTypes[2], true),
|
|
2706
|
+
flatStepHeight: setVal(imgTypes[3], C_ARW_WIDTH, C_TYP_FLOAT),
|
|
2707
|
+
};
|
|
2708
|
+
g_keycons.imgTypes[j] = (imgTypes[0] === `` ? `Original` : imgTypes[0]);
|
|
2709
|
+
});
|
|
2703
2710
|
}
|
|
2704
2711
|
|
|
2705
2712
|
// 末尾にデフォルト画像セットが入るよう追加
|
|
@@ -2726,13 +2733,13 @@ const headerConvert = _dosObj => {
|
|
|
2726
2733
|
// 横幅設定
|
|
2727
2734
|
if (hasVal(_dosObj.windowWidth)) {
|
|
2728
2735
|
g_sWidth = Math.max(setIntVal(_dosObj.windowWidth, g_sWidth), g_sWidth);
|
|
2729
|
-
$id(`canvas-frame`).width =
|
|
2736
|
+
$id(`canvas-frame`).width = wUnit(g_sWidth);
|
|
2730
2737
|
}
|
|
2731
2738
|
// 高さ設定
|
|
2732
2739
|
if (hasVal(_dosObj.windowHeight) || hasVal(g_presetObj.autoMinHeight)) {
|
|
2733
2740
|
g_sHeight = Math.max(setIntVal(_dosObj.windowHeight, g_sHeight),
|
|
2734
2741
|
setIntVal(g_presetObj.autoMinHeight, g_sHeight), g_sHeight);
|
|
2735
|
-
$id(`canvas-frame`).height =
|
|
2742
|
+
$id(`canvas-frame`).height = wUnit(g_sHeight);
|
|
2736
2743
|
}
|
|
2737
2744
|
|
|
2738
2745
|
// 曲名
|
|
@@ -3234,8 +3241,8 @@ const headerConvert = _dosObj => {
|
|
|
3234
3241
|
// クレジット表示
|
|
3235
3242
|
if (document.querySelector(`#webMusicTitle`) !== null) {
|
|
3236
3243
|
webMusicTitle.innerHTML =
|
|
3237
|
-
`<span style="font-size
|
|
3238
|
-
<span style="font-size
|
|
3244
|
+
`<span style="font-size:${wUnit(32)}">${obj.musicTitleForView.join(`<br>`)}</span><br>
|
|
3245
|
+
<span style="font-size:${wUnit(16)}">(Artist: <a href="${obj.artistUrl}" target="_blank">${obj.artistName}</a>)</span>`;
|
|
3239
3246
|
}
|
|
3240
3247
|
|
|
3241
3248
|
// コメントの外部化設定
|
|
@@ -4091,9 +4098,9 @@ const titleInit = _ => {
|
|
|
4091
4098
|
${g_headerObj.musicTitleForView[0]}
|
|
4092
4099
|
</div>
|
|
4093
4100
|
<div id="lblmusicTitle2" style="
|
|
4094
|
-
font-size:${titlefontsize2}
|
|
4095
|
-
position:relative;left:${g_headerObj.titlepos[1][0]}
|
|
4096
|
-
top:${g_headerObj.titlepos[1][1] + titlelineheight}
|
|
4101
|
+
font-size:${wUnit(titlefontsize2)};
|
|
4102
|
+
position:relative;left:${wUnit(g_headerObj.titlepos[1][0])};
|
|
4103
|
+
top:${wUnit(g_headerObj.titlepos[1][1] + titlelineheight)};
|
|
4097
4104
|
font-family:${g_headerObj.titlefonts[1]};
|
|
4098
4105
|
background: ${titlegrds[1]};
|
|
4099
4106
|
background-clip: text;
|
|
@@ -4322,7 +4329,7 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
|
|
|
4322
4329
|
|
|
4323
4330
|
// ウィンドウ枠の行を取得するために一時的な枠を作成
|
|
4324
4331
|
const tmplbl = createDivCss2Label(`lblTmpWarning`, _text, {
|
|
4325
|
-
x: 0, y: 70, w: g_sWidth, h: 20, siz: g_limitObj.mainSiz, lineHeight:
|
|
4332
|
+
x: 0, y: 70, w: g_sWidth, h: 20, siz: g_limitObj.mainSiz, lineHeight: wUnit(15), fontFamily: getBasicFont(),
|
|
4326
4333
|
whiteSpace: `normal`,
|
|
4327
4334
|
});
|
|
4328
4335
|
divRoot.appendChild(tmplbl);
|
|
@@ -4334,7 +4341,7 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
|
|
|
4334
4341
|
_text.split(`<br>`).length + _text.split(`<p>`).length - 1) * 21);
|
|
4335
4342
|
const lbl = createDivCss2Label(`lblWarning`, _text, {
|
|
4336
4343
|
x: _x, y: 70 + _y, w: g_sWidth, h: warnHeight, siz: g_limitObj.mainSiz, backgroundColor: _bkColor,
|
|
4337
|
-
opacity: 0.9, lineHeight:
|
|
4344
|
+
opacity: 0.9, lineHeight: wUnit(15), color: _textColor, align: _align, fontFamily: getBasicFont(),
|
|
4338
4345
|
whiteSpace: `normal`,
|
|
4339
4346
|
});
|
|
4340
4347
|
if (warnHeight === 150) {
|
|
@@ -4683,7 +4690,7 @@ const drawSpeedGraph = _scoreId => {
|
|
|
4683
4690
|
context.moveTo(lineX[j], 215);
|
|
4684
4691
|
context.lineTo(lineX[j] + 25, 215);
|
|
4685
4692
|
context.stroke();
|
|
4686
|
-
context.font = `${g_limitObj.difSelectorSiz}
|
|
4693
|
+
context.font = `${wUnit(g_limitObj.difSelectorSiz)} ${getBasicFont()}`;
|
|
4687
4694
|
context.fillText(g_lblNameObj[`s_${speedType}`], lineX[j] + 30, 218);
|
|
4688
4695
|
|
|
4689
4696
|
updateScoreDetailLabel(`Speed`, `${speedType}S`, speedObj[speedType].cnt, j, g_lblNameObj[`s_${speedType}`]);
|
|
@@ -4723,7 +4730,7 @@ const drawDensityGraph = _scoreId => {
|
|
|
4723
4730
|
context.moveTo(lineX, 215);
|
|
4724
4731
|
context.lineTo(lineX + 20, 215);
|
|
4725
4732
|
context.stroke();
|
|
4726
|
-
context.font = `${g_limitObj.difSelectorSiz}
|
|
4733
|
+
context.font = `${wUnit(g_limitObj.difSelectorSiz)} ${getBasicFont()}`;
|
|
4727
4734
|
context.fillText(lineNames[j], lineX + 20, 218);
|
|
4728
4735
|
});
|
|
4729
4736
|
|
|
@@ -4791,7 +4798,7 @@ const drawLine = (_context, _y, _lineType, _fixed = 0) => {
|
|
|
4791
4798
|
const textBaseObj = document.querySelector(`#lnkDifficulty`);
|
|
4792
4799
|
const textColor = window.getComputedStyle(textBaseObj, ``).color;
|
|
4793
4800
|
_context.strokeStyle = textColor;
|
|
4794
|
-
_context.font =
|
|
4801
|
+
_context.font = `${wUnit(12)} ${getBasicFont()}`;
|
|
4795
4802
|
_context.fillStyle = textColor;
|
|
4796
4803
|
_context.fillText(_y.toFixed(_fixed), 0, lineY + 4);
|
|
4797
4804
|
} else {
|
|
@@ -4879,7 +4886,7 @@ const makeDifInfo = _scoreId => {
|
|
|
4879
4886
|
dataTate.textContent = g_detailObj.toolDif[_scoreId].tate;
|
|
4880
4887
|
lblArrowInfo2.innerHTML = g_lblNameObj.s_linecnts.split(`{0}`).join(g_detailObj.toolDif[_scoreId].push3cnt);
|
|
4881
4888
|
dataArrowInfo.innerHTML = `${arrowCnts + frzCnts * (g_headerObj.frzStartjdgUse ? 2 : 1)}
|
|
4882
|
-
<span style="font-size:${g_limitObj.difSelectorSiz}
|
|
4889
|
+
<span style="font-size:${wUnit(g_limitObj.difSelectorSiz)};">(${arrowCnts} + ${frzCnts}${g_headerObj.frzStartjdgUse ? ' <span class="common_bold">x 2</span>' : ''})</span>`;
|
|
4883
4890
|
dataArrowInfo2.innerHTML = `<br>(${g_detailObj.arrowCnt[_scoreId]})<br><br>
|
|
4884
4891
|
(${g_detailObj.frzCnt[_scoreId]})<br><br>
|
|
4885
4892
|
${push3CntStr}`.split(`,`).join(`/`);
|
|
@@ -5017,13 +5024,13 @@ const setDifficulty = (_initFlg) => {
|
|
|
5017
5024
|
// 譜面名設定 (Difficulty)
|
|
5018
5025
|
const difWidth = parseFloat(lnkDifficulty.style.width);
|
|
5019
5026
|
const difNames = [`${getKeyName(g_keyObj.currentKey)} ${getStgDetailName('key')} / ${g_headerObj.difLabels[g_stateObj.scoreId]}`];
|
|
5020
|
-
lnkDifficulty.style.fontSize =
|
|
5027
|
+
lnkDifficulty.style.fontSize = wUnit(getFontSize(difNames[0], difWidth, getBasicFont(), g_limitObj.setLblSiz));
|
|
5021
5028
|
|
|
5022
5029
|
if (g_headerObj.makerView) {
|
|
5023
5030
|
difNames.push(`(${g_headerObj.creatorNames[g_stateObj.scoreId]})`);
|
|
5024
5031
|
difNames.forEach((difName, j) => {
|
|
5025
5032
|
const tmpSize = getFontSize(difName, difWidth, getBasicFont(), 14);
|
|
5026
|
-
difNames[j] = `<span style="font-size:${tmpSize}
|
|
5033
|
+
difNames[j] = `<span style="font-size:${wUnit(tmpSize)}">${difName}</span>`;
|
|
5027
5034
|
});
|
|
5028
5035
|
}
|
|
5029
5036
|
lnkDifficulty.innerHTML = difNames.join(``);
|
|
@@ -5127,11 +5134,11 @@ const createOptionWindow = _sprite => {
|
|
|
5127
5134
|
graphObj.id = `graph${_name}`;
|
|
5128
5135
|
graphObj.width = g_limitObj.graphWidth;
|
|
5129
5136
|
graphObj.height = g_limitObj.graphHeight;
|
|
5130
|
-
graphObj.style.left =
|
|
5131
|
-
graphObj.style.top =
|
|
5137
|
+
graphObj.style.left = wUnit(125);
|
|
5138
|
+
graphObj.style.top = wUnit(0);
|
|
5132
5139
|
graphObj.style.position = `absolute`;
|
|
5133
5140
|
graphObj.style.background = bkColor;
|
|
5134
|
-
graphObj.style.border = `dotted
|
|
5141
|
+
graphObj.style.border = `dotted ${wUnit(2)}`;
|
|
5135
5142
|
|
|
5136
5143
|
detailObj.appendChild(graphObj);
|
|
5137
5144
|
}
|
|
@@ -5185,7 +5192,7 @@ const createOptionWindow = _sprite => {
|
|
|
5185
5192
|
scoreDetail.appendChild(
|
|
5186
5193
|
makeDifLblCssButton(`lnk${sd}G`, getStgDetailName(sd), j, _ => changeScoreDetail(j), { w: g_limitObj.difCoverWidth, btnStyle: (g_stateObj.scoreDetail === sd ? `Setting` : `Default`) })
|
|
5187
5194
|
);
|
|
5188
|
-
createScText(document.getElementById(`lnk${sd}G`), `${sd}G`, { targetLabel: `lnk${sd}G`, x: -
|
|
5195
|
+
createScText(document.getElementById(`lnk${sd}G`), `${sd}G`, { targetLabel: `lnk${sd}G`, x: -5 });
|
|
5189
5196
|
});
|
|
5190
5197
|
}
|
|
5191
5198
|
|
|
@@ -5230,7 +5237,7 @@ const createOptionWindow = _sprite => {
|
|
|
5230
5237
|
if (g_headerObj.scrollUse) {
|
|
5231
5238
|
createGeneralSetting(spriteList.scroll, `scroll`, { scLabel: g_lblNameObj.sc_scroll });
|
|
5232
5239
|
[$id(`lnkScroll`).left, $id(`lnkScroll`).width] = [
|
|
5233
|
-
|
|
5240
|
+
wUnit(parseFloat($id(`lnkScroll`).left) + 90), wUnit(parseFloat($id(`lnkScroll`).width) - 90)
|
|
5234
5241
|
];
|
|
5235
5242
|
|
|
5236
5243
|
spriteList.scroll.appendChild(
|
|
@@ -5556,29 +5563,30 @@ const setGauge = (_scrollNum, _gaugeInitFlg = false) => {
|
|
|
5556
5563
|
};
|
|
5557
5564
|
|
|
5558
5565
|
// ゲージ初期化
|
|
5559
|
-
if (_gaugeInitFlg) {
|
|
5560
|
-
// カスタムゲージの設定取得
|
|
5561
|
-
const defaultCustomGauge = g_gaugeOptionObj.custom0 || g_gaugeOptionObj.customDefault;
|
|
5562
|
-
if (hasVal(defaultCustomGauge)) {
|
|
5563
|
-
g_gaugeOptionObj.custom = (g_gaugeOptionObj[`custom${g_stateObj.scoreId}`] || defaultCustomGauge).concat();
|
|
5564
|
-
g_gaugeOptionObj.varCustom = (g_gaugeOptionObj[`varCustom${g_stateObj.scoreId}`] || g_gaugeOptionObj.varCustom0 || g_gaugeOptionObj.varCustomDefault).concat();
|
|
5565
|
-
}
|
|
5566
|
-
|
|
5567
|
-
// ゲージタイプの設定
|
|
5568
|
-
changeLifeMode(g_headerObj);
|
|
5569
|
-
g_gaugeType = (g_gaugeOptionObj.custom.length > 0 ? C_LFE_CUSTOM : g_stateObj.lifeMode);
|
|
5570
5566
|
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5567
|
+
// カスタムゲージの設定取得
|
|
5568
|
+
const defaultCustomGauge = g_gaugeOptionObj.custom0 || g_gaugeOptionObj.customDefault;
|
|
5569
|
+
if (hasVal(defaultCustomGauge)) {
|
|
5570
|
+
g_gaugeOptionObj.custom = (g_gaugeOptionObj[`custom${g_stateObj.scoreId}`] || defaultCustomGauge).concat();
|
|
5571
|
+
g_gaugeOptionObj.varCustom = (g_gaugeOptionObj[`varCustom${g_stateObj.scoreId}`] || g_gaugeOptionObj.varCustom0 || g_gaugeOptionObj.varCustomDefault).concat();
|
|
5575
5572
|
}
|
|
5573
|
+
|
|
5574
|
+
// ゲージタイプの設定
|
|
5575
|
+
changeLifeMode(g_headerObj);
|
|
5576
|
+
g_gaugeType = (g_gaugeOptionObj.custom.length > 0 ? C_LFE_CUSTOM : g_stateObj.lifeMode);
|
|
5577
|
+
|
|
5578
|
+
// ゲージ配列を入れ替え
|
|
5579
|
+
g_settings.gauges = structuredClone(g_gaugeOptionObj[g_gaugeType.toLowerCase()]);
|
|
5580
|
+
g_settings.gaugeNum = getCurrentNo(g_settings.gauges, g_stateObj.gauge);
|
|
5581
|
+
g_stateObj.gauge = g_settings.gauges[g_settings.gaugeNum];
|
|
5582
|
+
|
|
5576
5583
|
setSetting(_scrollNum, `gauge`);
|
|
5577
5584
|
g_stateObj.lifeVariable = g_gaugeOptionObj[`var${g_gaugeType}`][g_settings.gaugeNum];
|
|
5578
5585
|
|
|
5579
5586
|
// デフォルトゲージの設定を適用(g_gaugeOptionObjから取得)
|
|
5580
|
-
if (
|
|
5581
|
-
g_gaugeOptionObj.
|
|
5587
|
+
if (g_settings.gaugeNum !== 0 &&
|
|
5588
|
+
(g_gaugeOptionObj.custom.length === 0 ||
|
|
5589
|
+
g_gaugeOptionObj.defaultList.includes(g_gaugeOptionObj[`defaultGauge${g_stateObj.scoreId}`]))) {
|
|
5582
5590
|
|
|
5583
5591
|
const gType = (g_gaugeType === C_LFE_CUSTOM ?
|
|
5584
5592
|
toCapitalize(g_gaugeOptionObj[`defaultGauge${g_stateObj.scoreId}`]) : g_gaugeType);
|
|
@@ -6385,8 +6393,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6385
6393
|
const stdPos = posj - ((posj > divideCnt ? posMax : 0) + divideCnt) / 2;
|
|
6386
6394
|
|
|
6387
6395
|
const nextLeft = (kWidth - C_ARW_WIDTH) / 2 + g_keyObj.blank * stdPos - maxLeftX - 10;
|
|
6388
|
-
cursor.style.left =
|
|
6389
|
-
cursor.style.top =
|
|
6396
|
+
cursor.style.left = wUnit(nextLeft);
|
|
6397
|
+
cursor.style.top = wUnit(C_KYC_HEIGHT * Number(posj > divideCnt) + 57 + C_KYC_REPHEIGHT * g_currentk);
|
|
6390
6398
|
g_kcType = (g_currentk === 0 ? `Main` : `Replaced`);
|
|
6391
6399
|
|
|
6392
6400
|
// 次の位置が見えなくなったらkeyconSpriteの位置を調整する
|
|
@@ -6724,7 +6732,10 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6724
6732
|
|
|
6725
6733
|
// 全角切替、BackSpace、Deleteキー、Escキーは割り当て禁止
|
|
6726
6734
|
// また、直前と同じキーを押した場合(BackSpaceを除く)はキー操作を無効にする
|
|
6727
|
-
const disabledKeys = [
|
|
6735
|
+
const disabledKeys = [240, 242, 243, 244, 91, 29, 28, 27, 259, g_prevKey];
|
|
6736
|
+
if (g_localeObj.val === `Ja`) {
|
|
6737
|
+
disabledKeys.unshift(229);
|
|
6738
|
+
}
|
|
6728
6739
|
if (disabledKeys.includes(setKey) || g_kCdN[setKey] === undefined) {
|
|
6729
6740
|
makeInfoWindow(g_msgInfoObj.I_0002, `fadeOut0`);
|
|
6730
6741
|
return;
|
|
@@ -6755,7 +6766,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6755
6766
|
if (g_currentk < g_keyObj[`keyCtrl${keyCtrlPtn}`][g_currentj].length - 1 && g_kcType !== `Main`) {
|
|
6756
6767
|
// 後続に代替キーが存在する場合
|
|
6757
6768
|
g_currentk++;
|
|
6758
|
-
cursor.style.top =
|
|
6769
|
+
cursor.style.top = wUnit(parseInt(cursor.style.top) + C_KYC_REPHEIGHT);
|
|
6759
6770
|
|
|
6760
6771
|
} else {
|
|
6761
6772
|
changeConfigCursor();
|
|
@@ -7844,10 +7855,7 @@ const getFirstArrowFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_
|
|
|
7844
7855
|
* @param {number} _scoreId
|
|
7845
7856
|
*/
|
|
7846
7857
|
const getStartFrame = (_lastFrame, _fadein = 0, _scoreId = g_stateObj.scoreId) => {
|
|
7847
|
-
let frameNum = 0;
|
|
7848
|
-
if (g_headerObj.startFrame !== undefined) {
|
|
7849
|
-
frameNum = parseInt(g_headerObj.startFrame[_scoreId] || g_headerObj.startFrame[0] || 0);
|
|
7850
|
-
}
|
|
7858
|
+
let frameNum = parseInt(g_headerObj.startFrame[_scoreId] ?? g_headerObj.startFrame[0] ?? 0);
|
|
7851
7859
|
if (_lastFrame >= frameNum) {
|
|
7852
7860
|
frameNum = Math.round(_fadein / 100 * (_lastFrame - frameNum)) + frameNum;
|
|
7853
7861
|
}
|
|
@@ -7948,17 +7956,6 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7948
7956
|
/** Motionの適用フレーム数 */
|
|
7949
7957
|
g_workObj.motionFrame = [];
|
|
7950
7958
|
|
|
7951
|
-
const getSpeedPos = _ => {
|
|
7952
|
-
let spdk, spdPrev;
|
|
7953
|
-
if (_dataObj.speedData !== undefined) {
|
|
7954
|
-
spdk = _dataObj.speedData.length - 2;
|
|
7955
|
-
spdPrev = _dataObj.speedData[spdk];
|
|
7956
|
-
} else {
|
|
7957
|
-
spdPrev = 0;
|
|
7958
|
-
}
|
|
7959
|
-
return [spdk, spdPrev];
|
|
7960
|
-
};
|
|
7961
|
-
|
|
7962
7959
|
const setNotes = (_j, _k, _data, _startPoint, _header, _frzFlg = false) => {
|
|
7963
7960
|
if (_startPoint >= 0) {
|
|
7964
7961
|
if (g_workObj[`mk${_header}Arrow`][_startPoint] === undefined) {
|
|
@@ -7984,7 +7981,8 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7984
7981
|
|
|
7985
7982
|
const startPoint = [];
|
|
7986
7983
|
let spdNext = Infinity;
|
|
7987
|
-
let
|
|
7984
|
+
let spdk = (_dataObj.speedData?.length ?? 0) - 2;
|
|
7985
|
+
let spdPrev = _dataObj.speedData?.[spdk] ?? 0;
|
|
7988
7986
|
|
|
7989
7987
|
// 最後尾のデータから計算して格納
|
|
7990
7988
|
const lastk = _data.length - setcnt;
|
|
@@ -8077,7 +8075,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8077
8075
|
for (let k = 0; k < delIdx; k++) {
|
|
8078
8076
|
_data.shift();
|
|
8079
8077
|
}
|
|
8080
|
-
return
|
|
8078
|
+
return _data;
|
|
8081
8079
|
}
|
|
8082
8080
|
return [];
|
|
8083
8081
|
};
|
|
@@ -8789,8 +8787,8 @@ const mainInit = _ => {
|
|
|
8789
8787
|
const filterCss = g_stateObj.filterLock === C_FLG_OFF ? g_cssObj.life_Failed : g_cssObj.life_Cleared;
|
|
8790
8788
|
[`filterBar0`, `filterBar1`, `borderBar0`, `borderBar1`].forEach(obj =>
|
|
8791
8789
|
mainSprite.appendChild(createColorObject2(obj, g_lblPosObj.filterBar, filterCss)));
|
|
8792
|
-
borderBar0.style.top =
|
|
8793
|
-
borderBar1.style.top =
|
|
8790
|
+
borderBar0.style.top = wUnit(g_posObj.stepDiffY);
|
|
8791
|
+
borderBar1.style.top = wUnit(g_posObj.stepDiffY + g_posObj.arrowHeight);
|
|
8794
8792
|
|
|
8795
8793
|
if (g_appearanceRanges.includes(g_stateObj.appearance)) {
|
|
8796
8794
|
mainSprite.appendChild(createDivCss2Label(`filterView`, ``, g_lblPosObj.filterView));
|
|
@@ -9067,7 +9065,7 @@ const mainInit = _ => {
|
|
|
9067
9065
|
readyDelayFrame = g_headerObj.readyDelayFrame + g_stateObj.adjustment;
|
|
9068
9066
|
}
|
|
9069
9067
|
const readyHtml = (g_headerObj.readyHtml !== `` ? g_headerObj.readyHtml :
|
|
9070
|
-
`<span style='color:${readyColor};font-size
|
|
9068
|
+
`<span style='color:${readyColor};font-size:${wUnit(60)};'>R</span>EADY<span style='font-size:${wUnit(50)};'>?</span>`);
|
|
9071
9069
|
|
|
9072
9070
|
divRoot.appendChild(
|
|
9073
9071
|
createDivCss2Label(`lblReady`, readyHtml, {
|
|
@@ -9306,7 +9304,7 @@ const mainInit = _ => {
|
|
|
9306
9304
|
const stepDivHit = document.querySelector(`#stepHit${_j}`);
|
|
9307
9305
|
|
|
9308
9306
|
g_customJsObj.dummyArrow.forEach(func => func());
|
|
9309
|
-
stepDivHit.style.top =
|
|
9307
|
+
stepDivHit.style.top = wUnit(-15);
|
|
9310
9308
|
stepDivHit.style.opacity = 1;
|
|
9311
9309
|
stepDivHit.classList.value = ``;
|
|
9312
9310
|
stepDivHit.classList.add(g_cssObj.main_stepDummy);
|
|
@@ -9524,7 +9522,7 @@ const mainInit = _ => {
|
|
|
9524
9522
|
const boostCnt = currentArrow.boostCnt;
|
|
9525
9523
|
currentArrow.prevY = currentArrow.y;
|
|
9526
9524
|
currentArrow.y -= (g_workObj.currentSpeed * currentArrow.boostSpd + g_workObj.motionOnFrames[boostCnt] * currentArrow.boostDir) * currentArrow.dir;
|
|
9527
|
-
$id(arrowName).top =
|
|
9525
|
+
$id(arrowName).top = wUnit(currentArrow.y);
|
|
9528
9526
|
currentArrow.boostCnt--;
|
|
9529
9527
|
}
|
|
9530
9528
|
judgeMotionFunc[`${_name}${g_stateObj.autoAll}`](_j, arrowName, --currentArrow.cnt);
|
|
@@ -9628,7 +9626,7 @@ const mainInit = _ => {
|
|
|
9628
9626
|
// 移動
|
|
9629
9627
|
if (g_workObj.currentSpeed !== 0) {
|
|
9630
9628
|
currentFrz.y -= movY + g_workObj.motionOnFrames[currentFrz.boostCnt] * currentFrz.dir * currentFrz.boostDir;
|
|
9631
|
-
$id(frzName).top =
|
|
9629
|
+
$id(frzName).top = wUnit(currentFrz.y);
|
|
9632
9630
|
currentFrz.boostCnt--;
|
|
9633
9631
|
}
|
|
9634
9632
|
currentFrz.cnt--;
|
|
@@ -9648,10 +9646,10 @@ const mainInit = _ => {
|
|
|
9648
9646
|
currentFrz.barY -= movY * currentFrz.dividePos;
|
|
9649
9647
|
currentFrz.btmY -= movY;
|
|
9650
9648
|
|
|
9651
|
-
$id(`${_name}Bar${frzNo}`).height =
|
|
9652
|
-
$id(`${_name}Bar${frzNo}`).top =
|
|
9653
|
-
$id(`${_name}Btm${frzNo}`).top =
|
|
9654
|
-
$id(`${_name}BtmShadow${frzNo}`).top =
|
|
9649
|
+
$id(`${_name}Bar${frzNo}`).height = wUnit(currentFrz.frzBarLength);
|
|
9650
|
+
$id(`${_name}Bar${frzNo}`).top = wUnit(currentFrz.barY);
|
|
9651
|
+
$id(`${_name}Btm${frzNo}`).top = wUnit(currentFrz.btmY);
|
|
9652
|
+
$id(`${_name}BtmShadow${frzNo}`).top = wUnit(currentFrz.btmY);
|
|
9655
9653
|
|
|
9656
9654
|
if (!checkKeyUpFunc[`${_name}${g_stateObj.autoAll}`](_j)) {
|
|
9657
9655
|
currentFrz.keyUpFrame++;
|
|
@@ -9668,7 +9666,7 @@ const mainInit = _ => {
|
|
|
9668
9666
|
currentFrz.frzBarLength -= g_workObj.currentSpeed;
|
|
9669
9667
|
if (currentFrz.frzBarLength > 0) {
|
|
9670
9668
|
currentFrz.y -= movY;
|
|
9671
|
-
$id(frzName).top =
|
|
9669
|
+
$id(frzName).top = wUnit(currentFrz.y);
|
|
9672
9670
|
} else {
|
|
9673
9671
|
judgeObjDelete[_name](_j, frzName);
|
|
9674
9672
|
}
|
|
@@ -9845,7 +9843,7 @@ const mainInit = _ => {
|
|
|
9845
9843
|
|
|
9846
9844
|
// フォントサイズ変更
|
|
9847
9845
|
const fontSize = setIntVal(g_wordObj.wordDat.match(/\d+/)[0], g_limitObj.mainSiz);
|
|
9848
|
-
g_wordSprite.style.fontSize =
|
|
9846
|
+
g_wordSprite.style.fontSize = wUnit(fontSize);
|
|
9849
9847
|
|
|
9850
9848
|
} else {
|
|
9851
9849
|
|
|
@@ -9946,8 +9944,8 @@ const changeAppearanceFilter = (_appearance, _num = 10) => {
|
|
|
9946
9944
|
$id(`arrowSprite${topNum}`).clipPath = topShape;
|
|
9947
9945
|
$id(`arrowSprite${bottomNum}`).clipPath = bottomShape;
|
|
9948
9946
|
|
|
9949
|
-
$id(`filterBar0`).top =
|
|
9950
|
-
$id(`filterBar1`).top =
|
|
9947
|
+
$id(`filterBar0`).top = wUnit(g_posObj.arrowHeight * _num / 100);
|
|
9948
|
+
$id(`filterBar1`).top = wUnit(g_posObj.arrowHeight * (100 - _num) / 100);
|
|
9951
9949
|
|
|
9952
9950
|
if (g_appearanceRanges.includes(_appearance)) {
|
|
9953
9951
|
$id(`filterView`).top =
|
|
@@ -10054,8 +10052,8 @@ const changeStepY = (_frameNum) =>
|
|
|
10054
10052
|
g_workObj.mkScrollchStep[_frameNum]?.forEach((targetj, j) => {
|
|
10055
10053
|
const dividePos = (g_workObj.scrollDirDefault[targetj] * g_workObj.mkScrollchStepDir[_frameNum][j] === 1 ? 0 : 1);
|
|
10056
10054
|
const baseY = C_STEP_Y + g_posObj.reverseStepY * dividePos;
|
|
10057
|
-
$id(`stepRoot${targetj}`).top =
|
|
10058
|
-
$id(`frzHit${targetj}`).top =
|
|
10055
|
+
$id(`stepRoot${targetj}`).top = wUnit(baseY);
|
|
10056
|
+
$id(`frzHit${targetj}`).top = wUnit(baseY);
|
|
10059
10057
|
});
|
|
10060
10058
|
|
|
10061
10059
|
/**
|
|
@@ -10096,10 +10094,10 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
|
|
|
10096
10094
|
currentFrz.y += delFrzLength;
|
|
10097
10095
|
currentFrz.isMoving = false;
|
|
10098
10096
|
|
|
10099
|
-
styfrzBar.top =
|
|
10100
|
-
styfrzBar.height =
|
|
10097
|
+
styfrzBar.top = wUnit(currentFrz.barY);
|
|
10098
|
+
styfrzBar.height = wUnit(currentFrz.frzBarLength);
|
|
10101
10099
|
styfrzBar.background = g_workObj[`${_name}HitBarColors`][_j];
|
|
10102
|
-
styfrzBtm.top =
|
|
10100
|
+
styfrzBtm.top = wUnit(currentFrz.btmY);
|
|
10103
10101
|
styfrzBtm.background = g_workObj[`${_name}HitColors`][_j];
|
|
10104
10102
|
styfrzTopShadow.opacity = 0;
|
|
10105
10103
|
styfrzBtmShadow.top = styfrzBtm.top;
|
|
@@ -10135,8 +10133,8 @@ const changeFailedFrz = (_j, _k) => {
|
|
|
10135
10133
|
|
|
10136
10134
|
// 判定位置調整分の補正
|
|
10137
10135
|
const hitPos = g_workObj.hitPosition * g_workObj.scrollDir[_j];
|
|
10138
|
-
$id(`frzTop${frzNo}`).top =
|
|
10139
|
-
$id(`frzTopShadow${frzNo}`).top =
|
|
10136
|
+
$id(`frzTop${frzNo}`).top = wUnit(- hitPos);
|
|
10137
|
+
$id(`frzTopShadow${frzNo}`).top = wUnit(- hitPos);
|
|
10140
10138
|
|
|
10141
10139
|
const colorPos = g_keyObj[`color${g_keyObj.currentKey}_${g_keyObj.currentPtn}`][_j];
|
|
10142
10140
|
if (g_headerObj.frzShadowColor[colorPos][0] !== ``) {
|
|
@@ -10171,7 +10169,7 @@ const judgeArrow = _j => {
|
|
|
10171
10169
|
const _difCnt = Math.abs(_difFrame);
|
|
10172
10170
|
const stepHitTargetArrow = _resultJdg => {
|
|
10173
10171
|
const stepDivHit = document.querySelector(`#stepHit${_j}`);
|
|
10174
|
-
stepDivHit.style.top =
|
|
10172
|
+
stepDivHit.style.top = wUnit(currentArrow.prevY - parseFloat($id(`stepRoot${_j}`).top) - 15 + g_workObj.hitPosition * g_workObj.scrollDir[_j]);
|
|
10175
10173
|
stepDivHit.style.opacity = 0.75;
|
|
10176
10174
|
stepDivHit.classList.value = ``;
|
|
10177
10175
|
stepDivHit.classList.add(g_cssObj[`main_step${_resultJdg}`]);
|
|
@@ -10279,8 +10277,8 @@ const changeLifeColor = (_state = ``) => {
|
|
|
10279
10277
|
|
|
10280
10278
|
const intLifeVal = Math.floor(g_workObj.lifeVal);
|
|
10281
10279
|
lblLife.textContent = intLifeVal;
|
|
10282
|
-
lifeBar.style.top =
|
|
10283
|
-
lifeBar.style.height =
|
|
10280
|
+
lifeBar.style.top = wUnit(50 + (g_headerObj.playingHeight - 100) * (g_headerObj.maxLifeVal - intLifeVal) / g_headerObj.maxLifeVal);
|
|
10281
|
+
lifeBar.style.height = wUnit((g_headerObj.playingHeight - 100) * intLifeVal / g_headerObj.maxLifeVal);
|
|
10284
10282
|
};
|
|
10285
10283
|
|
|
10286
10284
|
const lifeRecovery = _ => {
|
|
@@ -10751,7 +10749,7 @@ const resultInit = _ => {
|
|
|
10751
10749
|
} else {
|
|
10752
10750
|
resultWindow.appendChild(makeCssResultSymbol(`lblAutoView`, 215, g_cssObj.result_noRecord, 4, `(No Record)`));
|
|
10753
10751
|
const lblAutoView = document.querySelector(`#lblAutoView`);
|
|
10754
|
-
lblAutoView.style.fontSize =
|
|
10752
|
+
lblAutoView.style.fontSize = wUnit(20);
|
|
10755
10753
|
}
|
|
10756
10754
|
|
|
10757
10755
|
// ユーザカスタムイベント(初期)
|
|
@@ -10844,22 +10842,18 @@ const resultInit = _ => {
|
|
|
10844
10842
|
canvas.id = `resultImage`;
|
|
10845
10843
|
canvas.width = 400;
|
|
10846
10844
|
canvas.height = g_sHeight - 90;
|
|
10847
|
-
canvas.style.left =
|
|
10848
|
-
canvas.style.top =
|
|
10845
|
+
canvas.style.left = wUnit((g_sWidth - canvas.width) / 2);
|
|
10846
|
+
canvas.style.top = wUnit(20);
|
|
10849
10847
|
canvas.style.position = `absolute`;
|
|
10850
10848
|
|
|
10851
10849
|
const context = canvas.getContext(`2d`);
|
|
10852
10850
|
const drawText = (_text, { x = 30, dy = 0, hy, siz = 15, color = `#cccccc`, align = C_ALIGN_LEFT, font } = {}) => {
|
|
10853
|
-
context.font = `${siz}
|
|
10851
|
+
context.font = `${wUnit(siz)} ${getBasicFont(font)}`;
|
|
10854
10852
|
context.fillStyle = color;
|
|
10855
10853
|
context.textAlign = align;
|
|
10856
10854
|
context.fillText(_text, x, 35 + hy * 18 + dy);
|
|
10857
10855
|
};
|
|
10858
|
-
|
|
10859
|
-
grd.addColorStop(0, `#000000`);
|
|
10860
|
-
grd.addColorStop(1, `#222222`);
|
|
10861
|
-
context.fillStyle = grd;
|
|
10862
|
-
context.fillRect(0, 0, g_sWidth, g_sHeight);
|
|
10856
|
+
makeBgCanvas(context, { h: canvas.height });
|
|
10863
10857
|
|
|
10864
10858
|
drawText(`R`, { dy: -5, hy: 0, siz: 40, color: `#9999ff` });
|
|
10865
10859
|
drawText(`ESULT`, { x: 57, dy: -5, hy: 0, siz: 25 });
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2023/
|
|
8
|
+
* Revised : 2023/10/01 (v34.2.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -1081,13 +1081,66 @@ let g_currentk = 0;
|
|
|
1081
1081
|
let g_prevKey = -1;
|
|
1082
1082
|
|
|
1083
1083
|
// キーコード
|
|
1084
|
-
const g_kCd =
|
|
1084
|
+
const g_kCd = {};
|
|
1085
1085
|
const g_kCdN = [];
|
|
1086
1086
|
for (let j = 0; j < 260; j++) {
|
|
1087
1087
|
g_kCd[j] = ``;
|
|
1088
1088
|
g_kCdN[j] = ``;
|
|
1089
1089
|
}
|
|
1090
1090
|
|
|
1091
|
+
const g_lang_kCd = {
|
|
1092
|
+
Ja: {
|
|
1093
|
+
48: `0`,
|
|
1094
|
+
49: `1`,
|
|
1095
|
+
50: `2`,
|
|
1096
|
+
51: `3`,
|
|
1097
|
+
52: `4`,
|
|
1098
|
+
53: `5`,
|
|
1099
|
+
54: `6`,
|
|
1100
|
+
55: `7`,
|
|
1101
|
+
56: `8`,
|
|
1102
|
+
57: `9`,
|
|
1103
|
+
186: `: *`,
|
|
1104
|
+
187: `; +`,
|
|
1105
|
+
188: `, <`,
|
|
1106
|
+
189: `- =`,
|
|
1107
|
+
190: `. >`,
|
|
1108
|
+
191: `/ ?`,
|
|
1109
|
+
192: "@ `",
|
|
1110
|
+
219: `[ {`,
|
|
1111
|
+
220: `\\ |`,
|
|
1112
|
+
221: `] }`,
|
|
1113
|
+
222: `^ ~`,
|
|
1114
|
+
226: `\\ _`,
|
|
1115
|
+
229: `IME`,
|
|
1116
|
+
},
|
|
1117
|
+
En: {
|
|
1118
|
+
48: `0 )`,
|
|
1119
|
+
49: `1 !`,
|
|
1120
|
+
50: `2 @`,
|
|
1121
|
+
51: `3 #`,
|
|
1122
|
+
52: `4 $`,
|
|
1123
|
+
53: `5 %`,
|
|
1124
|
+
54: `6 ^`,
|
|
1125
|
+
55: `7 &`,
|
|
1126
|
+
56: `8 *`,
|
|
1127
|
+
57: `9 (`,
|
|
1128
|
+
186: `' "`,
|
|
1129
|
+
187: `; :`,
|
|
1130
|
+
188: `, <`,
|
|
1131
|
+
189: `- _`,
|
|
1132
|
+
190: `. >`,
|
|
1133
|
+
191: `/ ?`,
|
|
1134
|
+
192: `[ {`,
|
|
1135
|
+
219: `] }`,
|
|
1136
|
+
220: `IntlYen`,
|
|
1137
|
+
221: `\\ |`,
|
|
1138
|
+
222: `= +`,
|
|
1139
|
+
226: `IntlRo`,
|
|
1140
|
+
229: "` ~",
|
|
1141
|
+
},
|
|
1142
|
+
};
|
|
1143
|
+
|
|
1091
1144
|
// キー表示用
|
|
1092
1145
|
g_kCd[0] = `- - -`;
|
|
1093
1146
|
g_kCd[1] = `Unknown`;
|
|
@@ -1115,16 +1168,6 @@ g_kCd[44] = `PS`;
|
|
|
1115
1168
|
g_kCd[45] = `Insert`;
|
|
1116
1169
|
g_kCd[46] = `Delete`;
|
|
1117
1170
|
g_kCd[47] = `Help`;
|
|
1118
|
-
g_kCd[48] = `0`;
|
|
1119
|
-
g_kCd[49] = `1`;
|
|
1120
|
-
g_kCd[50] = `2`;
|
|
1121
|
-
g_kCd[51] = `3`;
|
|
1122
|
-
g_kCd[52] = `4`;
|
|
1123
|
-
g_kCd[53] = `5`;
|
|
1124
|
-
g_kCd[54] = `6`;
|
|
1125
|
-
g_kCd[55] = `7`;
|
|
1126
|
-
g_kCd[56] = `8`;
|
|
1127
|
-
g_kCd[57] = `9`;
|
|
1128
1171
|
g_kCd[65] = `A`;
|
|
1129
1172
|
g_kCd[66] = `B`;
|
|
1130
1173
|
g_kCd[67] = `C`;
|
|
@@ -1187,19 +1230,6 @@ g_kCd[126] = `F15`;
|
|
|
1187
1230
|
g_kCd[134] = `FN`;
|
|
1188
1231
|
g_kCd[144] = `NumLk`;
|
|
1189
1232
|
g_kCd[145] = `SL`;
|
|
1190
|
-
g_kCd[186] = `: *`;
|
|
1191
|
-
g_kCd[187] = `; +`;
|
|
1192
|
-
g_kCd[188] = `, <`;
|
|
1193
|
-
g_kCd[189] = `- =`;
|
|
1194
|
-
g_kCd[190] = `. >`;
|
|
1195
|
-
g_kCd[191] = `/ ?`;
|
|
1196
|
-
g_kCd[192] = "@ `";
|
|
1197
|
-
g_kCd[219] = `[ {`;
|
|
1198
|
-
g_kCd[220] = `\\ |`;
|
|
1199
|
-
g_kCd[221] = `] }`;
|
|
1200
|
-
g_kCd[222] = `^ ~`;
|
|
1201
|
-
g_kCd[226] = `\\ _`;
|
|
1202
|
-
g_kCd[229] = `IME`;
|
|
1203
1233
|
g_kCd[240] = `CapsLk`;
|
|
1204
1234
|
g_kCd[256] = `R)Shift`;
|
|
1205
1235
|
g_kCd[257] = `R)Ctrl`;
|