danoniplus 31.2.0 → 31.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 +129 -130
- package/js/lib/danoni_constants.js +154 -75
- package/package.json +1 -1
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/04/
|
|
7
|
+
* Revised : 2023/04/05
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 31.
|
|
12
|
-
const g_revisedDate = `2023/04/
|
|
11
|
+
const g_version = `Ver 31.3.1`;
|
|
12
|
+
const g_revisedDate = `2023/04/05`;
|
|
13
13
|
const g_alphaVersion = ``;
|
|
14
14
|
|
|
15
15
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -373,7 +373,7 @@ const splitLF2 = (_str, _delim = `$`) => splitLF(_str).filter(val => val !== ``)
|
|
|
373
373
|
* @returns
|
|
374
374
|
*/
|
|
375
375
|
const makeDedupliArray = (_array1, ..._arrays) =>
|
|
376
|
-
Array.from((new Set([..._array1, ..._arrays.flat()])).values());
|
|
376
|
+
Array.from((new Set([..._array1, ..._arrays.flat()])).values()).filter(val => val !== undefined);
|
|
377
377
|
|
|
378
378
|
/**
|
|
379
379
|
* 二次元配列のコピー
|
|
@@ -396,10 +396,21 @@ const sumData = _array => _array.reduce((p, x) => p + x);
|
|
|
396
396
|
* @param {number} _defaultVal
|
|
397
397
|
* @returns
|
|
398
398
|
*/
|
|
399
|
-
const makeBaseArray = (_array, _minLength, _defaultVal) =>
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
399
|
+
const makeBaseArray = (_array = [], _minLength, _defaultVal) => padArray(_array, [...Array(_minLength)].fill(_defaultVal));
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* ベースとする配列に対して別の配列で上書き
|
|
403
|
+
* @param {array} _array
|
|
404
|
+
* @param {array} _baseArray ベースとする配列
|
|
405
|
+
* @returns
|
|
406
|
+
*/
|
|
407
|
+
const padArray = (_array, _baseArray) => {
|
|
408
|
+
_array?.forEach((val, j) => {
|
|
409
|
+
if (hasVal(val)) {
|
|
410
|
+
_baseArray[j] = val;
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
return _baseArray;
|
|
403
414
|
};
|
|
404
415
|
|
|
405
416
|
/**
|
|
@@ -979,7 +990,7 @@ const getFontSize = (_str, _maxWidth, _font = getBasicFont(), _maxFontsize = 64,
|
|
|
979
990
|
*/
|
|
980
991
|
const createDescDiv = (_id, _str, _altId = _id) =>
|
|
981
992
|
createDivCss2Label(_id, _str, Object.assign(g_lblPosObj[_altId], {
|
|
982
|
-
siz: getFontSize(_str, g_sWidth, getBasicFont(),
|
|
993
|
+
siz: getFontSize(_str, g_sWidth, getBasicFont(), g_limitObj.mainSiz),
|
|
983
994
|
}));
|
|
984
995
|
|
|
985
996
|
/*-----------------------------------------------------------*/
|
|
@@ -1031,8 +1042,8 @@ const setUserSelect = (_style, _value = C_DIS_NONE) => {
|
|
|
1031
1042
|
* @param {object} _obj (x, y, w, h, siz, align, ...rest)
|
|
1032
1043
|
* @param {...any} _classes
|
|
1033
1044
|
*/
|
|
1034
|
-
const createDivCss2Label = (_id, _text, { x = 0, y = 0, w =
|
|
1035
|
-
siz =
|
|
1045
|
+
const createDivCss2Label = (_id, _text, { x = 0, y = 0, w = g_limitObj.setLblWidth, h = g_limitObj.setLblHeight,
|
|
1046
|
+
siz = g_limitObj.setLblSiz, align = C_ALIGN_CENTER, ...rest } = {}, ..._classes) => {
|
|
1036
1047
|
const div = createDiv(_id, x, y, w, h, [g_cssObj.title_base, ..._classes]);
|
|
1037
1048
|
|
|
1038
1049
|
const style = div.style;
|
|
@@ -1218,8 +1229,8 @@ const deleteDiv = (_parentId, _idName) => {
|
|
|
1218
1229
|
* @param {object} _obj (x, y, w, h, siz, align, title, groupName, initDisabledFlg, ...rest)
|
|
1219
1230
|
* @param {...any} _classes
|
|
1220
1231
|
*/
|
|
1221
|
-
const createCss2Button = (_id, _text, _func = _ => true, { x = 0, y = g_sHeight - 100, w = g_sWidth / 3, h =
|
|
1222
|
-
siz =
|
|
1232
|
+
const createCss2Button = (_id, _text, _func = _ => true, { x = 0, y = g_sHeight - 100, w = g_sWidth / 3, h = g_limitObj.btnHeight,
|
|
1233
|
+
siz = g_limitObj.btnSiz, align = C_ALIGN_CENTER, title = ``, groupName = g_currentPage, initDisabledFlg = true,
|
|
1223
1234
|
resetFunc = _ => true, cxtFunc = _ => true, ...rest } = {}, ..._classes) => {
|
|
1224
1235
|
|
|
1225
1236
|
const div = createDiv(_id, x, y, w, h, [`button_common`, ..._classes]);
|
|
@@ -1315,7 +1326,7 @@ const changeStyle = (_id, { x, y, w, h, siz, align, title, ...rest } = {}) => {
|
|
|
1315
1326
|
* @param {number} _y
|
|
1316
1327
|
*/
|
|
1317
1328
|
const getTitleDivLabel = (_id, _titlename, _x, _y, ..._classes) =>
|
|
1318
|
-
createDivCss2Label(_id, _titlename, { x: _x, y: _y, w: g_sWidth, h: 50, siz:
|
|
1329
|
+
createDivCss2Label(_id, _titlename, { x: _x, y: _y, w: g_sWidth, h: 50, siz: g_limitObj.btnSiz }, ..._classes);
|
|
1319
1330
|
|
|
1320
1331
|
/**
|
|
1321
1332
|
* キーコントロールの初期化
|
|
@@ -1803,8 +1814,8 @@ const getQueryParamVal = _name => {
|
|
|
1803
1814
|
* ローディング文字用ラベルの作成
|
|
1804
1815
|
*/
|
|
1805
1816
|
const getLoadingLabel = _ => createDivCss2Label(`lblLoading`, g_lblNameObj.nowLoading, {
|
|
1806
|
-
x: 0, y: g_sHeight - 40, w: g_sWidth, h:
|
|
1807
|
-
siz:
|
|
1817
|
+
x: 0, y: g_sHeight - 40, w: g_sWidth, h: g_limitObj.setLblHeight,
|
|
1818
|
+
siz: g_limitObj.setLblSiz, align: C_ALIGN_RIGHT,
|
|
1808
1819
|
});
|
|
1809
1820
|
|
|
1810
1821
|
/**
|
|
@@ -1910,15 +1921,14 @@ const initialControl = async () => {
|
|
|
1910
1921
|
Object.assign(g_headerObj, headerConvert(g_rootObj));
|
|
1911
1922
|
const importKeysData = _data => {
|
|
1912
1923
|
keysConvert(dosConvert(_data));
|
|
1913
|
-
g_headerObj.undefinedKeyLists = g_headerObj.undefinedKeyLists.filter(key => g_keyObj[
|
|
1924
|
+
g_headerObj.undefinedKeyLists = g_headerObj.undefinedKeyLists.filter(key => g_keyObj[`${g_keyObj.defaultProp}${key}_0`] === undefined);
|
|
1914
1925
|
};
|
|
1915
1926
|
g_presetObj.keysDataLib.forEach(list => importKeysData(list));
|
|
1916
1927
|
if (g_presetObj.keysData !== undefined) {
|
|
1917
1928
|
importKeysData(g_presetObj.keysData);
|
|
1918
1929
|
}
|
|
1919
1930
|
g_headerObj.keyExtraList = keysConvert(g_rootObj, {
|
|
1920
|
-
keyExtraList: (g_rootObj.keyExtraList
|
|
1921
|
-
makeDedupliArray(g_rootObj.keyExtraList.split(`,`), g_headerObj.undefinedKeyLists) : g_headerObj.undefinedKeyLists),
|
|
1931
|
+
keyExtraList: makeDedupliArray(g_headerObj.undefinedKeyLists, g_rootObj.keyExtraList?.split(`,`)),
|
|
1922
1932
|
});
|
|
1923
1933
|
|
|
1924
1934
|
// デフォルトのカラー・シャッフルグループ設定を退避
|
|
@@ -2089,7 +2099,7 @@ const loadLocalStorage = _ => {
|
|
|
2089
2099
|
* 譜面データを分割して値を取得
|
|
2090
2100
|
* @param {string} _dos 譜面データ
|
|
2091
2101
|
*/
|
|
2092
|
-
const dosConvert = _dos => {
|
|
2102
|
+
const dosConvert = (_dos = ``) => {
|
|
2093
2103
|
|
|
2094
2104
|
const obj = {};
|
|
2095
2105
|
const paramsTmp = g_enableAmpersandSplit ? _dos.split(`&`).join(`|`) : _dos;
|
|
@@ -2228,7 +2238,7 @@ const storeBaseData = (_scoreId, _scoreObj, _keyCtrlPtn) => {
|
|
|
2228
2238
|
const startFrame = getStartFrame(lastFrame, 0, _scoreId);
|
|
2229
2239
|
const firstArrowFrame = getFirstArrowFrame(_scoreObj, _keyCtrlPtn);
|
|
2230
2240
|
const playingFrame = lastFrame - firstArrowFrame;
|
|
2231
|
-
const keyNum = g_keyObj[
|
|
2241
|
+
const keyNum = g_keyObj[`${g_keyObj.defaultProp}${_keyCtrlPtn}`].length;
|
|
2232
2242
|
|
|
2233
2243
|
// 譜面密度グラフ用のデータ作成
|
|
2234
2244
|
const noteCnt = { arrow: [], frz: [] };
|
|
@@ -2735,7 +2745,7 @@ const headerConvert = _dosObj => {
|
|
|
2735
2745
|
}
|
|
2736
2746
|
const keyLists = makeDedupliArray(obj.keyLabels);
|
|
2737
2747
|
obj.keyLists = keyLists.sort((a, b) => parseInt(a) - parseInt(b));
|
|
2738
|
-
obj.undefinedKeyLists = obj.keyLists.filter(key => g_keyObj[
|
|
2748
|
+
obj.undefinedKeyLists = obj.keyLists.filter(key => g_keyObj[`${g_keyObj.defaultProp}${key}_0`] === undefined);
|
|
2739
2749
|
|
|
2740
2750
|
// 譜面変更セレクターの利用有無
|
|
2741
2751
|
obj.difSelectorUse = (setBoolVal(_dosObj.difSelectorUse, obj.keyLabels.length > 5));
|
|
@@ -3493,17 +3503,22 @@ const getKeyName = _key => hasVal(g_keyObj[`keyName${_key}`]) ? g_keyObj[`keyNam
|
|
|
3493
3503
|
* 一時的な追加キーの設定
|
|
3494
3504
|
* @param {object} _dosObj
|
|
3495
3505
|
*/
|
|
3496
|
-
const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList
|
|
3506
|
+
const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`) } = {}) => {
|
|
3497
3507
|
|
|
3498
3508
|
if (keyExtraList === undefined) {
|
|
3499
|
-
|
|
3509
|
+
keyExtraList = [];
|
|
3510
|
+
Object.keys(_dosObj).filter(val => val.startsWith(g_keyObj.defaultProp))
|
|
3511
|
+
.forEach(keyName => keyExtraList.push(keyName.slice(g_keyObj.defaultProp.length)));
|
|
3512
|
+
|
|
3513
|
+
if (keyExtraList.length === 0) {
|
|
3514
|
+
return [];
|
|
3515
|
+
}
|
|
3500
3516
|
}
|
|
3501
3517
|
|
|
3502
3518
|
const existParam = (_data, _paramName) => !hasVal(_data) && g_keyObj[_paramName] !== undefined;
|
|
3503
3519
|
const toString = _str => _str;
|
|
3504
3520
|
const toNumber = _num => parseInt(_num, 10);
|
|
3505
3521
|
const toFloat = _num => parseFloat(_num);
|
|
3506
|
-
const toStringOrNumber = _str => isNaN(Number(_str)) ? _str : toNumber(_str);
|
|
3507
3522
|
const toKeyCtrlArray = _str => makeBaseArray(_str.split(`/`).map(n => toNumber(n)), g_keyObj.minKeyCtrlNum, 0);
|
|
3508
3523
|
const toSplitArrayStr = _str => _str.split(`/`).map(n => n);
|
|
3509
3524
|
|
|
@@ -3580,7 +3595,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3580
3595
|
const keyPtn = getKeyPtnName(list);
|
|
3581
3596
|
if (list === ``) {
|
|
3582
3597
|
// 空指定の場合は一律同じグループへ割り当て
|
|
3583
|
-
g_keyObj[`${keyheader}_${k + dfPtn}_${ptnCnt}`] = [...Array(g_keyObj[
|
|
3598
|
+
g_keyObj[`${keyheader}_${k + dfPtn}_${ptnCnt}`] = [...Array(g_keyObj[`${g_keyObj.defaultProp}${_key}_${k + dfPtn}`].length)].fill(0);
|
|
3584
3599
|
|
|
3585
3600
|
} else if (g_keyObj[`${_name}${keyPtn}_0`] !== undefined) {
|
|
3586
3601
|
// 他のキーパターン (例: |shuffle8i=8_0| ) を指定した場合、該当があれば既存パターンからコピー
|
|
@@ -3592,7 +3607,9 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3592
3607
|
}
|
|
3593
3608
|
} else {
|
|
3594
3609
|
// 通常の指定方法 (例: |shuffle8i=1,1,1,2,0,0,0,0/1,1,1,1,0,0,0,0| )の場合の取り込み
|
|
3595
|
-
g_keyObj[`${keyheader}_${k + dfPtn}_${ptnCnt}`] =
|
|
3610
|
+
g_keyObj[`${keyheader}_${k + dfPtn}_${ptnCnt}`] =
|
|
3611
|
+
makeBaseArray(list.split(`,`).map(n => isNaN(parseInt(n)) ? n : parseInt(n, 10)),
|
|
3612
|
+
g_keyObj[`${g_keyObj.defaultProp}${_key}_${k + dfPtn}`].length, 0);
|
|
3596
3613
|
ptnCnt++;
|
|
3597
3614
|
}
|
|
3598
3615
|
});
|
|
@@ -3600,10 +3617,10 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3600
3617
|
}
|
|
3601
3618
|
|
|
3602
3619
|
} else if (g_keyObj[`${keyheader}_${dfPtn}_0`] === undefined) {
|
|
3603
|
-
// 特に指定が無い場合は
|
|
3620
|
+
// 特に指定が無い場合はkeyCtrlX_Yの配列長で決定
|
|
3604
3621
|
for (let k = 0; k < g_keyObj.minPatterns; k++) {
|
|
3605
3622
|
const ptnName = `${_key}_${k + dfPtn}`;
|
|
3606
|
-
g_keyObj[`${_name}${ptnName}_0`] = [...Array(g_keyObj[
|
|
3623
|
+
g_keyObj[`${_name}${ptnName}_0`] = [...Array(g_keyObj[`${g_keyObj.defaultProp}${ptnName}`].length)].fill(0);
|
|
3607
3624
|
g_keyObj[`${_name}${ptnName}`] = structuredClone(g_keyObj[`${_name}${ptnName}_0`]);
|
|
3608
3625
|
}
|
|
3609
3626
|
}
|
|
@@ -3649,7 +3666,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3649
3666
|
|
|
3650
3667
|
// デフォルト項目がある場合は先に定義
|
|
3651
3668
|
if (_defaultName !== ``) {
|
|
3652
|
-
g_keyObj[pairName][_defaultName] = [...Array(g_keyObj[
|
|
3669
|
+
g_keyObj[pairName][_defaultName] = [...Array(g_keyObj[`${g_keyObj.defaultProp}${_key}_${k + dfPtn}`].length)].fill(_defaultVal);
|
|
3653
3670
|
}
|
|
3654
3671
|
tmpParams[k].split(`/`).forEach(pairs => {
|
|
3655
3672
|
const keyPtn = getKeyPtnName(pairs);
|
|
@@ -3660,7 +3677,9 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3660
3677
|
} else {
|
|
3661
3678
|
// 通常の指定方法(例:|scroll8i=Cross::1,1,1,-1,-1,-1,1,1/Split::1,1,1,1,-1,-1,-1,-1|)から取り込み
|
|
3662
3679
|
const tmpParamPair = pairs.split(`::`);
|
|
3663
|
-
g_keyObj[pairName][tmpParamPair[0]] =
|
|
3680
|
+
g_keyObj[pairName][tmpParamPair[0]] =
|
|
3681
|
+
makeBaseArray(tmpParamPair[1].split(`,`).map(n => parseInt(n, 10)),
|
|
3682
|
+
g_keyObj[`${g_keyObj.defaultProp}${_key}_${k + dfPtn}`].length, _defaultVal);
|
|
3664
3683
|
}
|
|
3665
3684
|
});
|
|
3666
3685
|
}
|
|
@@ -3675,7 +3694,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3675
3694
|
// キーパターンの追記 (appendX)
|
|
3676
3695
|
if (setBoolVal(_dosObj[`append${newKey}`])) {
|
|
3677
3696
|
for (let j = 0; ; j++) {
|
|
3678
|
-
if (g_keyObj[
|
|
3697
|
+
if (g_keyObj[`${g_keyObj.defaultProp}${newKey}_${j}`] === undefined) {
|
|
3679
3698
|
break;
|
|
3680
3699
|
}
|
|
3681
3700
|
g_keyObj.dfPtnNum++;
|
|
@@ -3689,8 +3708,11 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3689
3708
|
// キーの最小横幅 (minWidthX)
|
|
3690
3709
|
g_keyObj[`minWidth${newKey}`] = _dosObj[`minWidth${newKey}`] ?? g_keyObj[`minWidth${newKey}`] ?? g_keyObj.minWidthDefault;
|
|
3691
3710
|
|
|
3711
|
+
// キーコンフィグ (keyCtrlX_Y)
|
|
3712
|
+
g_keyObj.minPatterns = newKeyMultiParam(newKey, `keyCtrl`, toKeyCtrlArray, { errCd: `E_0104`, baseCopyFlg: true });
|
|
3713
|
+
|
|
3692
3714
|
// 読込変数の接頭辞 (charaX_Y)
|
|
3693
|
-
|
|
3715
|
+
newKeyMultiParam(newKey, `chara`, toString);
|
|
3694
3716
|
|
|
3695
3717
|
// 矢印色パターン (colorX_Y)
|
|
3696
3718
|
newKeyTripleParam(newKey, `color`);
|
|
@@ -3698,9 +3720,6 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3698
3720
|
// 矢印の回転量指定、キャラクタパターン (stepRtnX_Y)
|
|
3699
3721
|
newKeyTripleParam(newKey, `stepRtn`);
|
|
3700
3722
|
|
|
3701
|
-
// キーコンフィグ (keyCtrlX_Y)
|
|
3702
|
-
newKeyMultiParam(newKey, `keyCtrl`, toKeyCtrlArray, { errCd: `E_0104`, baseCopyFlg: true });
|
|
3703
|
-
|
|
3704
3723
|
// ステップゾーン位置 (posX_Y)
|
|
3705
3724
|
newKeyMultiParam(newKey, `pos`, toFloat);
|
|
3706
3725
|
|
|
@@ -3725,7 +3744,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3725
3744
|
}
|
|
3726
3745
|
}
|
|
3727
3746
|
}
|
|
3728
|
-
// posX_Y, divX_Y, divMaxX_Yが未指定の場合は
|
|
3747
|
+
// charaX_Y, posX_Y, keyGroupX_Y, divX_Y, divMaxX_Yが未指定の場合はkeyCtrlX_Yを元に適用
|
|
3729
3748
|
for (let k = 0; k < g_keyObj.minPatterns; k++) {
|
|
3730
3749
|
setKeyDfVal(`${newKey}_${k + dfPtnNum}`);
|
|
3731
3750
|
}
|
|
@@ -3768,9 +3787,11 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList.split(`,`) }
|
|
|
3768
3787
|
* @param {string} _ptnName
|
|
3769
3788
|
*/
|
|
3770
3789
|
const setKeyDfVal = _ptnName => {
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
}
|
|
3790
|
+
const baseLength = g_keyObj[`${g_keyObj.defaultProp}${_ptnName}`].length;
|
|
3791
|
+
g_keyObj[`chara${_ptnName}`] = padArray(g_keyObj[`chara${_ptnName}`], [...Array(baseLength).keys()].map(i => `${i + 1}a`));
|
|
3792
|
+
g_keyObj[`pos${_ptnName}`] = padArray(g_keyObj[`pos${_ptnName}`], [...Array(baseLength).keys()].map(i => i));
|
|
3793
|
+
g_keyObj[`keyGroup${_ptnName}`] = padArray(g_keyObj[`keyGroup${_ptnName}`], [...Array(baseLength)].fill([`0`]));
|
|
3794
|
+
|
|
3774
3795
|
if (g_keyObj[`div${_ptnName}`] === undefined) {
|
|
3775
3796
|
g_keyObj[`div${_ptnName}`] = Math.max(...g_keyObj[`pos${_ptnName}`]) + 1;
|
|
3776
3797
|
}
|
|
@@ -3930,7 +3951,7 @@ const titleInit = _ => {
|
|
|
3930
3951
|
const versionName = `© 2018-${g_revisedDate.slice(0, 4)} ティックル, CW ${g_version}${g_alphaVersion}${customVersion}${releaseDate}`;
|
|
3931
3952
|
|
|
3932
3953
|
let reloadFlg = false;
|
|
3933
|
-
const getLinkSiz = _name => getFontSize(_name, g_sWidth / 2 - 20, getBasicFont(),
|
|
3954
|
+
const getLinkSiz = _name => getFontSize(_name, g_sWidth / 2 - 20, getBasicFont(), g_limitObj.lnkSiz, 12);
|
|
3934
3955
|
|
|
3935
3956
|
/**
|
|
3936
3957
|
* クレジット用リンク作成
|
|
@@ -3948,7 +3969,7 @@ const titleInit = _ => {
|
|
|
3948
3969
|
|
|
3949
3970
|
// Click Here
|
|
3950
3971
|
createCss2Button(`btnStart`, g_lblNameObj.clickHere, _ => clearTimeout(g_timeoutEvtTitleId), {
|
|
3951
|
-
w: g_sWidth, siz:
|
|
3972
|
+
w: g_sWidth, siz: g_limitObj.titleSiz, resetFunc: _ => optionInit(),
|
|
3952
3973
|
}, g_cssObj.button_Start),
|
|
3953
3974
|
|
|
3954
3975
|
// Reset
|
|
@@ -4122,7 +4143,7 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT) => {
|
|
|
4122
4143
|
|
|
4123
4144
|
// ウィンドウ枠の行を取得するために一時的な枠を作成
|
|
4124
4145
|
const tmplbl = createDivCss2Label(`lblTmpWarning`, _text, {
|
|
4125
|
-
x: 0, y: 70, w: g_sWidth, h: 20, siz:
|
|
4146
|
+
x: 0, y: 70, w: g_sWidth, h: 20, siz: g_limitObj.mainSiz, lineHeight: `15px`, fontFamily: getBasicFont(),
|
|
4126
4147
|
whiteSpace: `normal`,
|
|
4127
4148
|
});
|
|
4128
4149
|
divRoot.appendChild(tmplbl);
|
|
@@ -4133,7 +4154,7 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT) => {
|
|
|
4133
4154
|
const warnHeight = Math.min(150, Math.max(range.getClientRects().length,
|
|
4134
4155
|
_text.split(`<br>`).length + _text.split(`<p>`).length - 1) * 21);
|
|
4135
4156
|
const lbl = createDivCss2Label(`lblWarning`, _text, {
|
|
4136
|
-
x: 0, y: 70, w: g_sWidth, h: warnHeight, siz:
|
|
4157
|
+
x: 0, y: 70, w: g_sWidth, h: warnHeight, siz: g_limitObj.mainSiz, backgroundColor: _bkColor,
|
|
4137
4158
|
opacity: 0.9, lineHeight: `15px`, color: _textColor, align: _align, fontFamily: getBasicFont(),
|
|
4138
4159
|
whiteSpace: `normal`,
|
|
4139
4160
|
});
|
|
@@ -4239,10 +4260,10 @@ const optionInit = _ => {
|
|
|
4239
4260
|
const setSpriteList = _settingList => {
|
|
4240
4261
|
const optionWidth = (g_sWidth - 450) / 2;
|
|
4241
4262
|
const spriteList = [];
|
|
4242
|
-
_settingList.forEach(setting =>
|
|
4243
|
-
spriteList[setting
|
|
4244
|
-
x: 25, y: setting
|
|
4245
|
-
w: optionWidth + setting
|
|
4263
|
+
Object.keys(_settingList).forEach(setting =>
|
|
4264
|
+
spriteList[setting] = createEmptySprite(optionsprite, `${setting}Sprite`, {
|
|
4265
|
+
x: 25, y: _settingList[setting].heightPos * g_limitObj.setLblHeight + _settingList[setting].y + 20,
|
|
4266
|
+
w: optionWidth + _settingList[setting].dw, h: g_limitObj.setLblHeight + _settingList[setting].dh,
|
|
4246
4267
|
}));
|
|
4247
4268
|
return spriteList;
|
|
4248
4269
|
};
|
|
@@ -4275,23 +4296,8 @@ const createOptionWindow = _sprite => {
|
|
|
4275
4296
|
// 各ボタン用のスプライトを作成
|
|
4276
4297
|
const optionsprite = createOptionSprite(_sprite);
|
|
4277
4298
|
|
|
4278
|
-
// 設定名、縦位置、縦位置差分、幅差分、高さ差分
|
|
4279
|
-
const settingList = [
|
|
4280
|
-
[`difficulty`, 0, -5, 0, 10],
|
|
4281
|
-
[`speed`, 2, 0, 0, 0],
|
|
4282
|
-
[`motion`, 3, 0, 0, 0],
|
|
4283
|
-
[`reverse`, 4, 0, 0, 0],
|
|
4284
|
-
[`scroll`, 4, 0, 0, 0],
|
|
4285
|
-
[`shuffle`, 5.5, 0, 0, 0],
|
|
4286
|
-
[`autoPlay`, 6.5, 0, 0, 0],
|
|
4287
|
-
[`gauge`, 7.5, 0, 0, 0],
|
|
4288
|
-
[`adjustment`, 10.5, 0, 0, 0],
|
|
4289
|
-
[`fadein`, 11.5, 0, 0, 0],
|
|
4290
|
-
[`volume`, 12.5, 0, 0, 0],
|
|
4291
|
-
];
|
|
4292
|
-
|
|
4293
4299
|
// 設定毎に個別のスプライトを作成し、その中にラベル・ボタン類を配置
|
|
4294
|
-
const spriteList = setSpriteList(
|
|
4300
|
+
const spriteList = setSpriteList(g_settingPos.option);
|
|
4295
4301
|
|
|
4296
4302
|
// ---------------------------------------------------
|
|
4297
4303
|
// 難易度 (Difficulty)
|
|
@@ -4344,7 +4350,7 @@ const createOptionWindow = _sprite => {
|
|
|
4344
4350
|
k++;
|
|
4345
4351
|
}
|
|
4346
4352
|
});
|
|
4347
|
-
const overlength = pos *
|
|
4353
|
+
const overlength = pos * g_limitObj.setLblHeight - parseInt(difList.style.height);
|
|
4348
4354
|
difList.scrollTop = (overlength > 0 ? overlength : 0);
|
|
4349
4355
|
};
|
|
4350
4356
|
|
|
@@ -4366,7 +4372,7 @@ const createOptionWindow = _sprite => {
|
|
|
4366
4372
|
g_keyObj.prevKey = g_keyObj.currentKey;
|
|
4367
4373
|
}
|
|
4368
4374
|
}, {
|
|
4369
|
-
x: 430 + _scrollNum * 10, y: 40, w: 20, h: 20, siz:
|
|
4375
|
+
x: 430 + _scrollNum * 10, y: 40, w: 20, h: 20, siz: g_limitObj.jdgCntsSiz,
|
|
4370
4376
|
}, g_cssObj.button_Mini);
|
|
4371
4377
|
};
|
|
4372
4378
|
|
|
@@ -4387,7 +4393,7 @@ const createOptionWindow = _sprite => {
|
|
|
4387
4393
|
difCover.appendChild(
|
|
4388
4394
|
makeDifLblCssButton(`difRandom`, `RANDOM`, 0, _ => {
|
|
4389
4395
|
nextDifficulty(Math.floor(Math.random() * g_headerObj.keyLabels.length));
|
|
4390
|
-
}, { w:
|
|
4396
|
+
}, { w: g_limitObj.difCoverWidth })
|
|
4391
4397
|
);
|
|
4392
4398
|
|
|
4393
4399
|
// 全リスト
|
|
@@ -4396,7 +4402,7 @@ const createOptionWindow = _sprite => {
|
|
|
4396
4402
|
resetDifWindow();
|
|
4397
4403
|
g_stateObj.filterKeys = ``;
|
|
4398
4404
|
createDifWindow();
|
|
4399
|
-
}, { w:
|
|
4405
|
+
}, { w: g_limitObj.difCoverWidth, btnStyle: (g_stateObj.filterKeys === `` ? `Setting` : `Default`) })
|
|
4400
4406
|
);
|
|
4401
4407
|
|
|
4402
4408
|
// キー別フィルタボタン作成
|
|
@@ -4407,13 +4413,13 @@ const createOptionWindow = _sprite => {
|
|
|
4407
4413
|
resetDifWindow();
|
|
4408
4414
|
g_stateObj.filterKeys = targetKey;
|
|
4409
4415
|
createDifWindow(targetKey);
|
|
4410
|
-
}, { w:
|
|
4416
|
+
}, { w: g_limitObj.difCoverWidth, btnStyle: (g_stateObj.filterKeys === targetKey ? `Setting` : `Default`) })
|
|
4411
4417
|
);
|
|
4412
4418
|
if (g_stateObj.filterKeys === targetKey) {
|
|
4413
4419
|
pos = m + 9;
|
|
4414
4420
|
}
|
|
4415
4421
|
});
|
|
4416
|
-
const overlength = pos *
|
|
4422
|
+
const overlength = pos * g_limitObj.setLblHeight - parseInt(difCover.style.height);
|
|
4417
4423
|
difCover.scrollTop = (overlength > 0 ? overlength : 0);
|
|
4418
4424
|
|
|
4419
4425
|
multiAppend(optionsprite, makeDifBtn(-1), makeDifBtn());
|
|
@@ -4432,7 +4438,7 @@ const createOptionWindow = _sprite => {
|
|
|
4432
4438
|
}
|
|
4433
4439
|
};
|
|
4434
4440
|
const lnkDifficulty = makeSettingLblCssButton(`lnkDifficulty`, ``, 0, _ => changeDifficulty(), {
|
|
4435
|
-
y: -10, h:
|
|
4441
|
+
y: -10, h: g_limitObj.setLblHeight + 10, cxtFunc: _ => changeDifficulty(-1),
|
|
4436
4442
|
});
|
|
4437
4443
|
|
|
4438
4444
|
// 譜面選択ボタン(メイン、右回し、左回し)
|
|
@@ -4472,8 +4478,8 @@ const createOptionWindow = _sprite => {
|
|
|
4472
4478
|
const bkColor = window.getComputedStyle(textBaseObj, ``).backgroundColor;
|
|
4473
4479
|
|
|
4474
4480
|
graphObj.id = `graph${_name}`;
|
|
4475
|
-
graphObj.width =
|
|
4476
|
-
graphObj.height =
|
|
4481
|
+
graphObj.width = g_limitObj.graphWidth;
|
|
4482
|
+
graphObj.height = g_limitObj.graphHeight;
|
|
4477
4483
|
graphObj.style.left = `125px`;
|
|
4478
4484
|
graphObj.style.top = `0px`;
|
|
4479
4485
|
graphObj.style.position = `absolute`;
|
|
@@ -4489,7 +4495,7 @@ const createOptionWindow = _sprite => {
|
|
|
4489
4495
|
if (g_headerObj.scoreDetailUse) {
|
|
4490
4496
|
spriteList.speed.appendChild(
|
|
4491
4497
|
createCss2Button(`btnGraph`, `i`, _ => true, {
|
|
4492
|
-
x: -25, y: -60, w: 30, h: 30, siz:
|
|
4498
|
+
x: -25, y: -60, w: 30, h: 30, siz: g_limitObj.jdgCharaSiz, title: g_msgObj.graph,
|
|
4493
4499
|
resetFunc: _ => setScoreDetail(), cxtFunc: _ => setScoreDetail(),
|
|
4494
4500
|
}, g_cssObj.button_Mini)
|
|
4495
4501
|
);
|
|
@@ -4527,7 +4533,7 @@ const createOptionWindow = _sprite => {
|
|
|
4527
4533
|
);
|
|
4528
4534
|
g_settings.scoreDetails.forEach((sd, j) => {
|
|
4529
4535
|
scoreDetail.appendChild(
|
|
4530
|
-
makeDifLblCssButton(`lnk${sd}G`, getStgDetailName(sd), j, _ => changeScoreDetail(j), { w:
|
|
4536
|
+
makeDifLblCssButton(`lnk${sd}G`, getStgDetailName(sd), j, _ => changeScoreDetail(j), { w: g_limitObj.difCoverWidth, btnStyle: (g_stateObj.scoreDetail === sd ? `Setting` : `Default`) })
|
|
4531
4537
|
);
|
|
4532
4538
|
createScText(document.getElementById(`lnk${sd}G`), `${sd}G`, { targetLabel: `lnk${sd}G`, x: -10 });
|
|
4533
4539
|
});
|
|
@@ -4577,8 +4583,8 @@ const createOptionWindow = _sprite => {
|
|
|
4577
4583
|
const startFrame = g_detailObj.startFrame[_scoreId];
|
|
4578
4584
|
const playingFrame = g_detailObj.playingFrameWithBlank[_scoreId];
|
|
4579
4585
|
const speedObj = {
|
|
4580
|
-
speed: { frame: [0], speed: [1], cnt: 0, strokeColor:
|
|
4581
|
-
boost: { frame: [0], speed: [1], cnt: 0, strokeColor:
|
|
4586
|
+
speed: { frame: [0], speed: [1], cnt: 0, strokeColor: g_graphColorObj.speed },
|
|
4587
|
+
boost: { frame: [0], speed: [1], cnt: 0, strokeColor: g_graphColorObj.boost }
|
|
4582
4588
|
};
|
|
4583
4589
|
|
|
4584
4590
|
Object.keys(speedObj).forEach(speedType => {
|
|
@@ -4608,7 +4614,7 @@ const createOptionWindow = _sprite => {
|
|
|
4608
4614
|
let preY;
|
|
4609
4615
|
|
|
4610
4616
|
for (let i = 0; i < speedObj[speedType].frame.length; i++) {
|
|
4611
|
-
const x = speedObj[speedType].frame[i] * (
|
|
4617
|
+
const x = speedObj[speedType].frame[i] * (g_limitObj.graphWidth - 30) / playingFrame + 30;
|
|
4612
4618
|
const y = (speedObj[speedType].speed[i] - 1) * -90 + 105;
|
|
4613
4619
|
|
|
4614
4620
|
context.lineTo(x, preY);
|
|
@@ -4625,7 +4631,7 @@ const createOptionWindow = _sprite => {
|
|
|
4625
4631
|
context.moveTo(lineX, 215);
|
|
4626
4632
|
context.lineTo(lineX + 30, 215);
|
|
4627
4633
|
context.stroke();
|
|
4628
|
-
context.font = `${
|
|
4634
|
+
context.font = `${g_limitObj.difSelectorSiz}px ${getBasicFont()}`;
|
|
4629
4635
|
context.fillText(speedType, lineX + 35, 218);
|
|
4630
4636
|
|
|
4631
4637
|
updateScoreDetailLabel(`Speed`, `${speedType}S`, speedObj[speedType].cnt, j, g_lblNameObj[`s_${speedType}`]);
|
|
@@ -4663,7 +4669,7 @@ const createOptionWindow = _sprite => {
|
|
|
4663
4669
|
context.moveTo(lineX, 215);
|
|
4664
4670
|
context.lineTo(lineX + 20, 215);
|
|
4665
4671
|
context.stroke();
|
|
4666
|
-
context.font = `${
|
|
4672
|
+
context.font = `${g_limitObj.difSelectorSiz}px ${getBasicFont()}`;
|
|
4667
4673
|
context.fillText(lineNames[j], lineX + 20, 218);
|
|
4668
4674
|
});
|
|
4669
4675
|
|
|
@@ -4686,7 +4692,7 @@ const createOptionWindow = _sprite => {
|
|
|
4686
4692
|
const baseLabel = (_bLabel, _bLabelname, _bAlign) =>
|
|
4687
4693
|
document.querySelector(`#detail${_name}`).appendChild(
|
|
4688
4694
|
createDivCss2Label(`${_bLabel}`, `${_bLabelname}`, {
|
|
4689
|
-
x: 10, y: 105 + _pos * 20, w: 100, h: 20, siz:
|
|
4695
|
+
x: 10, y: 105 + _pos * 20, w: 100, h: 20, siz: g_limitObj.difSelectorSiz, align: _bAlign,
|
|
4690
4696
|
})
|
|
4691
4697
|
);
|
|
4692
4698
|
if (document.querySelector(`#data${_label}`) === null) {
|
|
@@ -4703,7 +4709,7 @@ const createOptionWindow = _sprite => {
|
|
|
4703
4709
|
* @param {number} _resolution
|
|
4704
4710
|
*/
|
|
4705
4711
|
const drawBaseLine = (_context, _resolution = 10) => {
|
|
4706
|
-
_context.clearRect(0, 0,
|
|
4712
|
+
_context.clearRect(0, 0, g_limitObj.graphWidth, g_limitObj.graphHeight);
|
|
4707
4713
|
|
|
4708
4714
|
for (let j = 0; j <= 2 * _resolution; j += 5) {
|
|
4709
4715
|
drawLine(_context, j / _resolution, `main`, 2);
|
|
@@ -4724,7 +4730,7 @@ const createOptionWindow = _sprite => {
|
|
|
4724
4730
|
const lineY = (_y - 1) * -90 + 105;
|
|
4725
4731
|
_context.beginPath();
|
|
4726
4732
|
_context.moveTo(30, lineY);
|
|
4727
|
-
_context.lineTo(
|
|
4733
|
+
_context.lineTo(g_limitObj.graphWidth, lineY);
|
|
4728
4734
|
_context.lineWidth = 1;
|
|
4729
4735
|
|
|
4730
4736
|
if (_lineType === `main`) {
|
|
@@ -4754,7 +4760,7 @@ const createOptionWindow = _sprite => {
|
|
|
4754
4760
|
* @param {string} _data
|
|
4755
4761
|
* @param {object} _obj
|
|
4756
4762
|
*/
|
|
4757
|
-
const makeDifInfoLabel = (_lbl, _data, { x = 130, y = 25, w = 125, h = 35, siz =
|
|
4763
|
+
const makeDifInfoLabel = (_lbl, _data, { x = 130, y = 25, w = 125, h = 35, siz = g_limitObj.difSelectorSiz, ...rest } = {}) =>
|
|
4758
4764
|
createDivCss2Label(_lbl, _data, { x, y, w, h, siz, align: C_ALIGN_LEFT, ...rest });
|
|
4759
4765
|
|
|
4760
4766
|
let printData = ``;
|
|
@@ -4818,7 +4824,7 @@ const createOptionWindow = _sprite => {
|
|
|
4818
4824
|
dataDouji.textContent = g_detailObj.toolDif[_scoreId].douji;
|
|
4819
4825
|
dataTate.textContent = g_detailObj.toolDif[_scoreId].tate;
|
|
4820
4826
|
lblArrowInfo2.innerHTML = g_lblNameObj.s_linecnts.split(`{0}`).join(g_detailObj.toolDif[_scoreId].push3cnt);
|
|
4821
|
-
dataArrowInfo.innerHTML = `${arrowCnts + frzCnts} <span style="font-size:${
|
|
4827
|
+
dataArrowInfo.innerHTML = `${arrowCnts + frzCnts} <span style="font-size:${g_limitObj.difSelectorSiz}px;">(${arrowCnts} + ${frzCnts})</span>`;
|
|
4822
4828
|
dataArrowInfo2.innerHTML = `<br>(${g_detailObj.arrowCnt[_scoreId]})<br><br>
|
|
4823
4829
|
(${g_detailObj.frzCnt[_scoreId]})<br><br>
|
|
4824
4830
|
${push3CntStr}`.split(`,`).join(`/`);
|
|
@@ -5240,7 +5246,7 @@ const createOptionWindow = _sprite => {
|
|
|
5240
5246
|
// 譜面名設定 (Difficulty)
|
|
5241
5247
|
const difWidth = parseFloat(lnkDifficulty.style.width);
|
|
5242
5248
|
const difNames = [`${getKeyName(g_keyObj.currentKey)} ${getStgDetailName('key')} / ${g_headerObj.difLabels[g_stateObj.scoreId]}`];
|
|
5243
|
-
lnkDifficulty.style.fontSize = `${getFontSize(difNames[0], difWidth, getBasicFont(),
|
|
5249
|
+
lnkDifficulty.style.fontSize = `${getFontSize(difNames[0], difWidth, getBasicFont(), g_limitObj.setLblSiz)}px`;
|
|
5244
5250
|
|
|
5245
5251
|
if (g_headerObj.makerView) {
|
|
5246
5252
|
difNames.push(`(${g_headerObj.creatorNames[g_stateObj.scoreId]})`);
|
|
@@ -5354,8 +5360,8 @@ const createGeneralSetting = (_obj, _settingName, { unitName = ``,
|
|
|
5354
5360
|
// 右回し・左回しボタン(最内側)
|
|
5355
5361
|
if (skipTerms[2] > 1) {
|
|
5356
5362
|
multiAppend(_obj,
|
|
5357
|
-
makeMiniCssButton(linkId, `RRR`, 0, _ => setSetting(skipTerms[2], _settingName, unitName, roundNum), { dw: -
|
|
5358
|
-
makeMiniCssButton(linkId, `LLL`, 0, _ => setSetting(skipTerms[2] * (-1), _settingName, unitName, roundNum), { dw: -
|
|
5363
|
+
makeMiniCssButton(linkId, `RRR`, 0, _ => setSetting(skipTerms[2], _settingName, unitName, roundNum), { dw: -g_limitObj.setMiniWidth / 2 }),
|
|
5364
|
+
makeMiniCssButton(linkId, `LLL`, 0, _ => setSetting(skipTerms[2] * (-1), _settingName, unitName, roundNum), { dw: -g_limitObj.setMiniWidth / 2 }),
|
|
5359
5365
|
);
|
|
5360
5366
|
}
|
|
5361
5367
|
|
|
@@ -5439,7 +5445,7 @@ const setSetting = (_scrollNum, _settingName, _unitName = ``, _roundNum = 0) =>
|
|
|
5439
5445
|
*/
|
|
5440
5446
|
const makeDisabledLabel = (_id, _heightPos, _defaultStr) => {
|
|
5441
5447
|
return createDivCss2Label(_id, _defaultStr, {
|
|
5442
|
-
x:
|
|
5448
|
+
x: g_limitObj.setLblLeft, y: g_limitObj.setLblHeight * _heightPos,
|
|
5443
5449
|
}, g_cssObj.settings_Disabled);
|
|
5444
5450
|
};
|
|
5445
5451
|
|
|
@@ -5473,7 +5479,7 @@ const setReverseDefault = _ => {
|
|
|
5473
5479
|
const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
|
|
5474
5480
|
const baseKeyCtrlPtn = _localStorage[`keyCtrlPtn${_extraKeyName}`];
|
|
5475
5481
|
const basePtn = `${g_keyObj.currentKey}_${baseKeyCtrlPtn}`;
|
|
5476
|
-
const baseKeyNum = g_keyObj[
|
|
5482
|
+
const baseKeyNum = g_keyObj[`${g_keyObj.defaultProp}${basePtn}`].length;
|
|
5477
5483
|
|
|
5478
5484
|
if (_localStorage[`keyCtrl${_extraKeyName}`] !== undefined && _localStorage[`keyCtrl${_extraKeyName}`][0].length > 0) {
|
|
5479
5485
|
const prevPtn = g_keyObj.currentPtn;
|
|
@@ -5522,11 +5528,11 @@ const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
|
|
|
5522
5528
|
*/
|
|
5523
5529
|
const makeSettingLblCssButton = (_id, _name, _heightPos, _func, { x, y, w, h, siz, cxtFunc = _ => true, ...rest } = {}, ..._classes) => {
|
|
5524
5530
|
const tmpObj = {
|
|
5525
|
-
x: x !== undefined ? x :
|
|
5526
|
-
y: y !== undefined ? y :
|
|
5527
|
-
w: w !== undefined ? w :
|
|
5528
|
-
h: h !== undefined ? h :
|
|
5529
|
-
siz: siz !== undefined ? siz :
|
|
5531
|
+
x: x !== undefined ? x : g_limitObj.setLblLeft,
|
|
5532
|
+
y: y !== undefined ? y : g_limitObj.setLblHeight * _heightPos,
|
|
5533
|
+
w: w !== undefined ? w : g_limitObj.setLblWidth,
|
|
5534
|
+
h: h !== undefined ? h : g_limitObj.setLblHeight,
|
|
5535
|
+
siz: siz !== undefined ? siz : g_limitObj.setLblSiz,
|
|
5530
5536
|
cxtFunc: cxtFunc !== undefined ? cxtFunc : _ => true,
|
|
5531
5537
|
};
|
|
5532
5538
|
return createCss2Button(_id, _name, _func, { ...tmpObj, ...rest }, g_cssObj.button_Default, ..._classes);
|
|
@@ -5539,11 +5545,11 @@ const makeSettingLblCssButton = (_id, _name, _heightPos, _func, { x, y, w, h, si
|
|
|
5539
5545
|
* @param {number} _heightPos 上からの配置順
|
|
5540
5546
|
* @param {function} _func
|
|
5541
5547
|
*/
|
|
5542
|
-
const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w =
|
|
5548
|
+
const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = g_limitObj.difSelectorWidth, btnStyle = `Default` } = {}) => {
|
|
5543
5549
|
return createCss2Button(_id, _name, _func, {
|
|
5544
|
-
x: x, y:
|
|
5545
|
-
w: w, h:
|
|
5546
|
-
siz:
|
|
5550
|
+
x: x, y: g_limitObj.setLblHeight * _heightPos,
|
|
5551
|
+
w: w, h: g_limitObj.setLblHeight,
|
|
5552
|
+
siz: g_limitObj.difSelectorSiz,
|
|
5547
5553
|
borderStyle: `solid`,
|
|
5548
5554
|
}, g_cssObj[`button_${btnStyle}`], g_cssObj.button_ON);
|
|
5549
5555
|
};
|
|
@@ -5558,8 +5564,8 @@ const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = C_LEN_D
|
|
|
5558
5564
|
const makeMiniCssButton = (_id, _directionFlg, _heightPos, _func, { dx = 0, dy = 0, dw = 0, dh = 0, dsiz = 0, visibility = `visible` } = {}) => {
|
|
5559
5565
|
return createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, {
|
|
5560
5566
|
x: g_settingBtnObj.pos[_directionFlg] + dx,
|
|
5561
|
-
y:
|
|
5562
|
-
w:
|
|
5567
|
+
y: g_limitObj.setLblHeight * _heightPos + dy,
|
|
5568
|
+
w: g_limitObj.setMiniWidth + dw, h: g_limitObj.setLblHeight + dh, siz: g_limitObj.setLblSiz + dsiz,
|
|
5563
5569
|
visibility: visibility
|
|
5564
5570
|
}, g_cssObj.button_Mini);
|
|
5565
5571
|
};
|
|
@@ -5646,8 +5652,8 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5646
5652
|
*/
|
|
5647
5653
|
const makeDisabledDisplayLabel = (_id, _heightPos, _widthPos, _defaultStr, _flg) => {
|
|
5648
5654
|
return createDivCss2Label(_id, _defaultStr, {
|
|
5649
|
-
x: 30 + 180 * _widthPos, y: 3 +
|
|
5650
|
-
w: 170, siz:
|
|
5655
|
+
x: 30 + 180 * _widthPos, y: 3 + g_limitObj.setLblHeight * _heightPos,
|
|
5656
|
+
w: 170, siz: g_limitObj.difSelectorSiz,
|
|
5651
5657
|
}, g_cssObj[`button_Disabled${flg}`]);
|
|
5652
5658
|
};
|
|
5653
5659
|
|
|
@@ -5679,16 +5685,9 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5679
5685
|
// 各ボタン用のスプライトを作成
|
|
5680
5686
|
createOptionSprite(_sprite);
|
|
5681
5687
|
|
|
5682
|
-
// 設定名、縦位置、縦位置差分、幅差分、高さ差分
|
|
5683
|
-
const settingList = [
|
|
5684
|
-
[`appearance`, 7.4, 10, 0, 0],
|
|
5685
|
-
[`opacity`, 9, 10, 0, 0],
|
|
5686
|
-
[`hitPosition`, 10, 10, 0, 0],
|
|
5687
|
-
];
|
|
5688
|
-
|
|
5689
5688
|
// 設定毎に個別のスプライトを作成し、その中にラベル・ボタン類を配置
|
|
5690
5689
|
const displaySprite = createEmptySprite(optionsprite, `displaySprite`, g_windowObj.displaySprite);
|
|
5691
|
-
const spriteList = setSpriteList(
|
|
5690
|
+
const spriteList = setSpriteList(g_settingPos.settingsDisplay);
|
|
5692
5691
|
|
|
5693
5692
|
_sprite.appendChild(createDivCss2Label(`sdDesc`, g_lblNameObj.sdDesc, g_lblPosObj.sdDesc));
|
|
5694
5693
|
g_displays.forEach((name, j) => makeDisplayButton(name, j % 7, Math.floor(j / 7)));
|
|
@@ -5970,7 +5969,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
5970
5969
|
setKeyConfigCursor();
|
|
5971
5970
|
}, {
|
|
5972
5971
|
x: keyconX, y: 50 + C_KYC_REPHEIGHT * k + keyconY,
|
|
5973
|
-
w: C_ARW_WIDTH, h: C_KYC_REPHEIGHT, siz:
|
|
5972
|
+
w: C_ARW_WIDTH, h: C_KYC_REPHEIGHT, siz: g_limitObj.jdgCntsSiz,
|
|
5974
5973
|
}, g_cssObj.button_Default_NoColor, g_cssObj.title_base)
|
|
5975
5974
|
);
|
|
5976
5975
|
|
|
@@ -6064,7 +6063,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6064
6063
|
* @returns ボタン
|
|
6065
6064
|
*/
|
|
6066
6065
|
const makeKCButton = (_id, _text, _func, { x = g_sWidth * 5 / 6 - 20, y = 15, w = g_sWidth / 6, h = 18,
|
|
6067
|
-
siz =
|
|
6066
|
+
siz = g_limitObj.jdgCntsSiz, borderStyle = `solid`, cxtFunc, ...rest } = {}, _mainClass = g_cssObj.button_RevOFF, ..._classes) => {
|
|
6068
6067
|
return makeSettingLblCssButton(_id, getStgDetailName(_text), 0, _func, { x, y, w, h, siz, cxtFunc, borderStyle, ...rest }, _mainClass, ..._classes);
|
|
6069
6068
|
};
|
|
6070
6069
|
|
|
@@ -6076,7 +6075,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6076
6075
|
* @param {*} object (x, y, w, h, siz)
|
|
6077
6076
|
* @returns
|
|
6078
6077
|
*/
|
|
6079
|
-
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz =
|
|
6078
|
+
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz = g_limitObj.mainSiz } = {}) => {
|
|
6080
6079
|
return createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func,
|
|
6081
6080
|
{ x, y, w, h, siz }, g_cssObj.button_Mini);
|
|
6082
6081
|
};
|
|
@@ -6553,7 +6552,7 @@ const getShadowColor = (_colorPos, _arrowColor) => g_headerObj.setShadowColor[_c
|
|
|
6553
6552
|
*/
|
|
6554
6553
|
const getKeyInfo = _ => {
|
|
6555
6554
|
const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
|
|
6556
|
-
const keyNum = g_keyObj[
|
|
6555
|
+
const keyNum = g_keyObj[`${g_keyObj.defaultProp}${keyCtrlPtn}`].length;
|
|
6557
6556
|
const posMax = (g_keyObj[`divMax${keyCtrlPtn}`] !== undefined ?
|
|
6558
6557
|
g_keyObj[`divMax${keyCtrlPtn}`] : Math.max(...g_keyObj[`pos${keyCtrlPtn}`]) + 1);
|
|
6559
6558
|
const divideCnt = g_keyObj[`div${keyCtrlPtn}`] - 1;
|
|
@@ -7104,7 +7103,7 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7104
7103
|
const obj = {};
|
|
7105
7104
|
|
|
7106
7105
|
const scoreIdHeader = setScoreIdHeader(_scoreId, g_stateObj.scoreLockFlg);
|
|
7107
|
-
const keyNum = g_keyObj[
|
|
7106
|
+
const keyNum = g_keyObj[`${g_keyObj.defaultProp}${_keyCtrlPtn}`].length;
|
|
7108
7107
|
obj.arrowData = [];
|
|
7109
7108
|
obj.frzData = [];
|
|
7110
7109
|
obj.dummyArrowData = [];
|
|
@@ -7584,7 +7583,7 @@ const calcLifeVal = (_val, _allArrows) => Math.round(_val * g_headerObj.maxLifeV
|
|
|
7584
7583
|
const getLastFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`) => {
|
|
7585
7584
|
|
|
7586
7585
|
let tmpLastNum = 0;
|
|
7587
|
-
const keyNum = g_keyObj[
|
|
7586
|
+
const keyNum = g_keyObj[`${g_keyObj.defaultProp}${_keyCtrlPtn}`].length;
|
|
7588
7587
|
|
|
7589
7588
|
for (let j = 0; j < keyNum; j++) {
|
|
7590
7589
|
const data = [
|
|
@@ -7611,7 +7610,7 @@ const getLastFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj
|
|
|
7611
7610
|
const getFirstArrowFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`) => {
|
|
7612
7611
|
|
|
7613
7612
|
let tmpFirstNum = Infinity;
|
|
7614
|
-
const keyNum = g_keyObj[
|
|
7613
|
+
const keyNum = g_keyObj[`${g_keyObj.defaultProp}${_keyCtrlPtn}`].length;
|
|
7615
7614
|
|
|
7616
7615
|
for (let j = 0; j < keyNum; j++) {
|
|
7617
7616
|
const data = [
|
|
@@ -8729,7 +8728,7 @@ const mainInit = _ => {
|
|
|
8729
8728
|
const makerView = g_headerObj.makerView ? ` (${g_headerObj.creatorNames[g_stateObj.scoreId]})` : ``;
|
|
8730
8729
|
let difName = `[${getKeyName(g_headerObj.keyLabels[g_stateObj.scoreId])} / ${g_headerObj.difLabels[g_stateObj.scoreId]}${assistFlg}${shuffleName}${makerView}]`;
|
|
8731
8730
|
let creditName = `${musicTitle} / ${artistName}`;
|
|
8732
|
-
if (checkMusicSiz(creditName,
|
|
8731
|
+
if (checkMusicSiz(creditName, g_limitObj.musicTitleSiz) < 12) {
|
|
8733
8732
|
creditName = `${musicTitle}`;
|
|
8734
8733
|
difName = `/ ${artistName} ` + difName;
|
|
8735
8734
|
}
|
|
@@ -8738,7 +8737,7 @@ const mainInit = _ => {
|
|
|
8738
8737
|
|
|
8739
8738
|
// ライフ(数字)
|
|
8740
8739
|
createDivCss2Label(`lblLife`, intLifeVal, {
|
|
8741
|
-
x: 0, y: 30, w: 70, h: 20, siz:
|
|
8740
|
+
x: 0, y: 30, w: 70, h: 20, siz: g_limitObj.jdgCntsSiz, display: g_workObj.lifegaugeDisp,
|
|
8742
8741
|
}, lblInitColor),
|
|
8743
8742
|
|
|
8744
8743
|
// ライフ背景
|
|
@@ -8762,7 +8761,7 @@ const mainInit = _ => {
|
|
|
8762
8761
|
}, g_cssObj.life_Border, g_cssObj.life_BorderColor),
|
|
8763
8762
|
|
|
8764
8763
|
// 曲名・アーティスト名表示
|
|
8765
|
-
createDivCss2Label(`lblCredit`, creditName, Object.assign(g_lblPosObj.lblCredit, { siz: checkMusicSiz(creditName,
|
|
8764
|
+
createDivCss2Label(`lblCredit`, creditName, Object.assign(g_lblPosObj.lblCredit, { siz: checkMusicSiz(creditName, g_limitObj.musicTitleSiz) })),
|
|
8766
8765
|
|
|
8767
8766
|
// 譜面名表示
|
|
8768
8767
|
createDivCss2Label(`lblDifName`, difName, Object.assign(g_lblPosObj.lblDifName, { siz: checkMusicSiz(difName, 12) })),
|
|
@@ -8801,7 +8800,7 @@ const mainInit = _ => {
|
|
|
8801
8800
|
// キャラクタ表示
|
|
8802
8801
|
const charaJ = createDivCss2Label(`chara${jdg}`, ``, {
|
|
8803
8802
|
x: jdgX[j], y: jdgY[j],
|
|
8804
|
-
w:
|
|
8803
|
+
w: g_limitObj.jdgCharaWidth, h: g_limitObj.jdgCharaHeight, siz: g_limitObj.jdgCharaSiz,
|
|
8805
8804
|
opacity: g_stateObj.opacity / 100, display: g_workObj.judgmentDisp,
|
|
8806
8805
|
}, g_cssObj.common_ii);
|
|
8807
8806
|
charaJ.setAttribute(`cnt`, 0);
|
|
@@ -8814,14 +8813,14 @@ const mainInit = _ => {
|
|
|
8814
8813
|
// コンボ表示
|
|
8815
8814
|
createDivCss2Label(`combo${jdg}`, ``, {
|
|
8816
8815
|
x: jdgX[j] + 170, y: jdgY[j],
|
|
8817
|
-
w:
|
|
8816
|
+
w: g_limitObj.jdgCharaWidth, h: g_limitObj.jdgCharaHeight, siz: g_limitObj.jdgCharaSiz,
|
|
8818
8817
|
opacity: g_stateObj.opacity / 100, display: g_workObj.judgmentDisp,
|
|
8819
8818
|
}, g_cssObj[`common_${jdgCombos[j]}`]),
|
|
8820
8819
|
|
|
8821
8820
|
// Fast/Slow表示
|
|
8822
8821
|
createDivCss2Label(`diff${jdg}`, ``, {
|
|
8823
8822
|
x: jdgX[j] + 170, y: jdgY[j] + 25,
|
|
8824
|
-
w:
|
|
8823
|
+
w: g_limitObj.jdgCharaWidth, h: g_limitObj.jdgCharaHeight, siz: g_limitObj.mainSiz,
|
|
8825
8824
|
opacity: g_stateObj.opacity / 100, display: g_workObj.fastslowDisp,
|
|
8826
8825
|
}, g_cssObj.common_combo),
|
|
8827
8826
|
|
|
@@ -9652,7 +9651,7 @@ const mainInit = _ => {
|
|
|
9652
9651
|
} else if (/\[fontSize=\d+\]/.test(g_wordObj.wordDat)) {
|
|
9653
9652
|
|
|
9654
9653
|
// フォントサイズ変更
|
|
9655
|
-
const fontSize = setIntVal(g_wordObj.wordDat.match(/\d+/)[0],
|
|
9654
|
+
const fontSize = setIntVal(g_wordObj.wordDat.match(/\d+/)[0], g_limitObj.mainSiz);
|
|
9656
9655
|
g_wordSprite.style.fontSize = `${fontSize}px`;
|
|
9657
9656
|
|
|
9658
9657
|
} else {
|
|
@@ -9782,8 +9781,8 @@ const changeAppearanceFilter = (_appearance, _num = 10) => {
|
|
|
9782
9781
|
*/
|
|
9783
9782
|
const makeCounterSymbol = (_id, _x, _class, _heightPos, _text, _display = C_DIS_INHERIT) => {
|
|
9784
9783
|
return createDivCss2Label(_id, _text, {
|
|
9785
|
-
x: _x, y:
|
|
9786
|
-
w:
|
|
9784
|
+
x: _x, y: g_limitObj.jdgCntsHeight * _heightPos,
|
|
9785
|
+
w: g_limitObj.jdgCntsWidth, h: g_limitObj.jdgCntsHeight, siz: g_limitObj.jdgCntsSiz, align: C_ALIGN_RIGHT,
|
|
9787
9786
|
display: _display,
|
|
9788
9787
|
}, _class);
|
|
9789
9788
|
};
|
|
@@ -10749,9 +10748,9 @@ const resultInit = _ => {
|
|
|
10749
10748
|
* @param {string} _text
|
|
10750
10749
|
* @param {string} _align
|
|
10751
10750
|
*/
|
|
10752
|
-
const makeCssResultPlayData = (_id, _x, _class, _heightPos, _text, _align = C_ALIGN_CENTER, { w = 400, siz =
|
|
10751
|
+
const makeCssResultPlayData = (_id, _x, _class, _heightPos, _text, _align = C_ALIGN_CENTER, { w = 400, siz = g_limitObj.mainSiz } = {}) =>
|
|
10753
10752
|
createDivCss2Label(_id, _text, {
|
|
10754
|
-
x: _x, y:
|
|
10753
|
+
x: _x, y: g_limitObj.setMiniSiz * _heightPos, w, h: g_limitObj.setMiniSiz, siz, align: _align,
|
|
10755
10754
|
}, _class);
|
|
10756
10755
|
|
|
10757
10756
|
/**
|
|
@@ -10764,7 +10763,7 @@ const makeCssResultPlayData = (_id, _x, _class, _heightPos, _text, _align = C_AL
|
|
|
10764
10763
|
* @param {string} _align
|
|
10765
10764
|
*/
|
|
10766
10765
|
const makeCssResultSymbol = (_id, _x, _class, _heightPos, _text, _align = C_ALIGN_LEFT) =>
|
|
10767
|
-
makeCssResultPlayData(_id, _x, _class, _heightPos, _text, _align, { w: 150, siz:
|
|
10766
|
+
makeCssResultPlayData(_id, _x, _class, _heightPos, _text, _align, { w: 150, siz: g_limitObj.jdgCntsSiz });
|
|
10768
10767
|
|
|
10769
10768
|
// ライセンス原文、以下は削除しないでください
|
|
10770
10769
|
/*-----------------------------------------------------------*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2023/
|
|
8
|
+
* Revised : 2023/04/05 (v31.3.1)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -21,10 +21,12 @@ const C_VALIGN_TOP = `top`;
|
|
|
21
21
|
const C_VALIGN_MIDDLE = `middle`;
|
|
22
22
|
const C_VALIGN_BOTTOM = `bottom`;
|
|
23
23
|
|
|
24
|
+
const C_LBL_BASICFONT = `"Meiryo UI", sans-serif`;
|
|
25
|
+
|
|
26
|
+
/** 廃止予定の定数群 */
|
|
24
27
|
const C_LBL_TITLESIZE = 32;
|
|
25
28
|
const C_LBL_BTNSIZE = 28;
|
|
26
29
|
const C_LBL_LNKSIZE = 16;
|
|
27
|
-
const C_LBL_BASICFONT = `"Meiryo UI", sans-serif`;
|
|
28
30
|
|
|
29
31
|
const C_BTN_HEIGHT = 50;
|
|
30
32
|
const C_LNK_HEIGHT = 30;
|
|
@@ -42,6 +44,98 @@ const C_SIZ_DIFSELECTOR = 14;
|
|
|
42
44
|
const C_SIZ_MAIN = 14;
|
|
43
45
|
const C_SIZ_MUSIC_TITLE = 13;
|
|
44
46
|
|
|
47
|
+
const C_LEN_JDGCHARA_WIDTH = 200;
|
|
48
|
+
const C_LEN_JDGCHARA_HEIGHT = 20;
|
|
49
|
+
const C_SIZ_JDGCHARA = 20;
|
|
50
|
+
|
|
51
|
+
const C_LEN_JDGCNTS_WIDTH = 100;
|
|
52
|
+
const C_LEN_JDGCNTS_HEIGHT = 20;
|
|
53
|
+
const C_SIZ_JDGCNTS = 16;
|
|
54
|
+
|
|
55
|
+
const C_LEN_GRAPH_WIDTH = 286;
|
|
56
|
+
const C_LEN_GRAPH_HEIGHT = 226;
|
|
57
|
+
const C_CLR_SPEEDGRAPH_SPEED = `#cc3333`;
|
|
58
|
+
const C_CLR_SPEEDGRAPH_BOOST = `#999900`;
|
|
59
|
+
const C_CLR_DENSITY_MAX = `#990000cc`;
|
|
60
|
+
const C_CLR_DENSITY_DEFAULT = `#999999cc`;
|
|
61
|
+
const C_LEN_DENSITY_DIVISION = 16;
|
|
62
|
+
|
|
63
|
+
const C_MAX_ADJUSTMENT = 30;
|
|
64
|
+
|
|
65
|
+
/** 設定幅、位置などを管理するプロパティ */
|
|
66
|
+
const g_limitObj = {
|
|
67
|
+
|
|
68
|
+
// Adjustment, HitPositionの設定幅
|
|
69
|
+
adjustment: 30,
|
|
70
|
+
hitPosition: 50,
|
|
71
|
+
|
|
72
|
+
// 譜面密度グラフの分割数、上位色付け数
|
|
73
|
+
densityDivision: 16,
|
|
74
|
+
densityMaxVals: 3,
|
|
75
|
+
|
|
76
|
+
// ボタン・リンクの高さ、フォントサイズ
|
|
77
|
+
btnHeight: 50,
|
|
78
|
+
btnSiz: 28,
|
|
79
|
+
lnkHeight: 30,
|
|
80
|
+
lnkSiz: 16,
|
|
81
|
+
|
|
82
|
+
// 設定画面用のボタンの位置、幅、高さ、フォントサイズ
|
|
83
|
+
setLblLeft: 160,
|
|
84
|
+
setLblWidth: 210,
|
|
85
|
+
setLblHeight: 22,
|
|
86
|
+
setLblSiz: 17,
|
|
87
|
+
|
|
88
|
+
// 設定画面の左右移動ボタンの幅、フォントサイズ
|
|
89
|
+
setMiniWidth: 40,
|
|
90
|
+
setMiniSiz: 18,
|
|
91
|
+
|
|
92
|
+
// 譜面選択エリアの幅、フォントサイズ
|
|
93
|
+
difSelectorWidth: 250,
|
|
94
|
+
difSelectorSiz: 14,
|
|
95
|
+
difCoverWidth: 110,
|
|
96
|
+
|
|
97
|
+
// 判定キャラクタの幅、高さ、フォントサイズ
|
|
98
|
+
jdgCharaWidth: 200,
|
|
99
|
+
jdgCharaHeight: 20,
|
|
100
|
+
jdgCharaSiz: 20,
|
|
101
|
+
|
|
102
|
+
// 判定数の幅、高さ、フォントサイズ
|
|
103
|
+
jdgCntsWidth: 100,
|
|
104
|
+
jdgCntsHeight: 20,
|
|
105
|
+
jdgCntsSiz: 16,
|
|
106
|
+
|
|
107
|
+
// グラフ表示部分の幅、高さ
|
|
108
|
+
graphWidth: 286,
|
|
109
|
+
graphHeight: 226,
|
|
110
|
+
|
|
111
|
+
// その他のフォントサイズ
|
|
112
|
+
titleSiz: 32,
|
|
113
|
+
mainSiz: 14,
|
|
114
|
+
musicTitleSiz: 13,
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/** 設定項目の位置 */
|
|
118
|
+
const g_settingPos = {
|
|
119
|
+
option: {
|
|
120
|
+
difficulty: { heightPos: 0, y: -5, dw: 0, dh: 10 },
|
|
121
|
+
speed: { heightPos: 2, y: 0, dw: 0, dh: 0 },
|
|
122
|
+
motion: { heightPos: 3, y: 0, dw: 0, dh: 0 },
|
|
123
|
+
reverse: { heightPos: 4, y: 0, dw: 0, dh: 0 },
|
|
124
|
+
scroll: { heightPos: 4, y: 0, dw: 0, dh: 0 },
|
|
125
|
+
shuffle: { heightPos: 5.5, y: 0, dw: 0, dh: 0 },
|
|
126
|
+
autoPlay: { heightPos: 6.5, y: 0, dw: 0, dh: 0 },
|
|
127
|
+
gauge: { heightPos: 7.5, y: 0, dw: 0, dh: 0 },
|
|
128
|
+
adjustment: { heightPos: 10.5, y: 0, dw: 0, dh: 0 },
|
|
129
|
+
fadein: { heightPos: 11.5, y: 0, dw: 0, dh: 0 },
|
|
130
|
+
volume: { heightPos: 12.5, y: 0, dw: 0, dh: 0 },
|
|
131
|
+
},
|
|
132
|
+
settingsDisplay: {
|
|
133
|
+
appearance: { heightPos: 7.4, y: 10, dw: 0, dh: 0 },
|
|
134
|
+
opacity: { heightPos: 9, y: 10, dw: 0, dh: 0 },
|
|
135
|
+
hitPosition: { heightPos: 10, y: 10, dw: 0, dh: 0 },
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
|
|
45
139
|
// スプライト(ムービークリップ相当)のルート
|
|
46
140
|
const C_SPRITE_ROOT = `divRoot`;
|
|
47
141
|
|
|
@@ -98,7 +192,7 @@ const g_lblPosObj = {};
|
|
|
98
192
|
const updateWindowSiz = _ => {
|
|
99
193
|
Object.assign(g_windowObj, {
|
|
100
194
|
optionSprite: { x: (g_sWidth - 450) / 2, y: 65 + (g_sHeight - 500) / 2, w: 450, h: 325 },
|
|
101
|
-
displaySprite: { x: 25, y: 30, w: (g_sWidth - 450) / 2, h:
|
|
195
|
+
displaySprite: { x: 25, y: 30, w: (g_sWidth - 450) / 2, h: g_limitObj.setLblHeight * 5 },
|
|
102
196
|
keyconSprite: { y: 88 + (g_sHeight - 500) / 2, h: g_sHeight, overflow: `auto` },
|
|
103
197
|
loader: { y: g_sHeight - 10, h: 10, backgroundColor: `#333333` },
|
|
104
198
|
playDataWindow: { x: g_sWidth / 2 - 225, y: 70 + (g_sHeight - 500) / 2, w: 450, h: 110 },
|
|
@@ -118,11 +212,11 @@ const updateWindowSiz = _ => {
|
|
|
118
212
|
x: 0, y: g_sHeight - 150, w: 40, h: 40, siz: 30, title: g_msgObj.howto,
|
|
119
213
|
},
|
|
120
214
|
lnkMaker: {
|
|
121
|
-
x: 0, y: g_sHeight - 50, w: g_sWidth / 2, h:
|
|
215
|
+
x: 0, y: g_sHeight - 50, w: g_sWidth / 2, h: g_limitObj.lnkHeight,
|
|
122
216
|
align: C_ALIGN_LEFT, title: g_headerObj.creatorUrl,
|
|
123
217
|
},
|
|
124
218
|
lnkArtist: {
|
|
125
|
-
x: g_sWidth / 2, y: g_sHeight - 50, w: g_sWidth / 2, h:
|
|
219
|
+
x: g_sWidth / 2, y: g_sHeight - 50, w: g_sWidth / 2, h: g_limitObj.lnkHeight,
|
|
126
220
|
align: C_ALIGN_LEFT, title: g_headerObj.artistUrl,
|
|
127
221
|
},
|
|
128
222
|
lnkVersion: {
|
|
@@ -133,7 +227,7 @@ const updateWindowSiz = _ => {
|
|
|
133
227
|
x: g_sWidth - 20, y: g_sHeight - 20, w: 20, h: 16, siz: 12, title: g_msgObj.security,
|
|
134
228
|
},
|
|
135
229
|
lblComment: {
|
|
136
|
-
x: 0, y: 70, w: g_sWidth, h: g_sHeight - 180, siz:
|
|
230
|
+
x: 0, y: 70, w: g_sWidth, h: g_sHeight - 180, siz: g_limitObj.difSelectorSiz, align: C_ALIGN_LEFT,
|
|
137
231
|
overflow: `auto`, background: `#222222`, color: `#cccccc`, display: C_DIS_NONE,
|
|
138
232
|
whiteSpace: `normal`,
|
|
139
233
|
},
|
|
@@ -150,7 +244,7 @@ const updateWindowSiz = _ => {
|
|
|
150
244
|
x: g_sWidth * 2 / 3,
|
|
151
245
|
},
|
|
152
246
|
btnSwitchSetting: {
|
|
153
|
-
x: g_sWidth / 2 + 175 -
|
|
247
|
+
x: g_sWidth / 2 + 175 - g_limitObj.setMiniWidth / 2, y: 25, w: g_limitObj.setMiniWidth, h: 40,
|
|
154
248
|
},
|
|
155
249
|
btnSave: {
|
|
156
250
|
x: 0, y: 5, w: g_sWidth / 5, h: 16, siz: 12,
|
|
@@ -158,22 +252,22 @@ const updateWindowSiz = _ => {
|
|
|
158
252
|
},
|
|
159
253
|
|
|
160
254
|
btnReverse: {
|
|
161
|
-
x: 160, y: 0, w: 90, h: 21, siz:
|
|
255
|
+
x: 160, y: 0, w: 90, h: 21, siz: g_limitObj.difSelectorSiz, borderStyle: `solid`,
|
|
162
256
|
},
|
|
163
257
|
lblGauge2: {
|
|
164
|
-
x:
|
|
165
|
-
w:
|
|
258
|
+
x: g_limitObj.setLblLeft - 35, y: g_limitObj.setLblHeight,
|
|
259
|
+
w: g_limitObj.setLblWidth + 60, h: g_limitObj.setLblHeight * 2, siz: 11,
|
|
166
260
|
},
|
|
167
261
|
lnkFadein: {
|
|
168
|
-
x:
|
|
262
|
+
x: g_limitObj.setLblLeft, y: 0,
|
|
169
263
|
},
|
|
170
264
|
lblFadeinBar: {
|
|
171
|
-
x:
|
|
265
|
+
x: g_limitObj.setLblLeft, y: 0,
|
|
172
266
|
},
|
|
173
267
|
|
|
174
268
|
/** 設定: 譜面明細子画面 */
|
|
175
269
|
lblTooldif: {
|
|
176
|
-
y: 5, w: 250, siz:
|
|
270
|
+
y: 5, w: 250, siz: g_limitObj.jdgCntsSiz,
|
|
177
271
|
},
|
|
178
272
|
dataTooldif: {
|
|
179
273
|
x: 270, y: 3, w: 160, siz: 18,
|
|
@@ -189,10 +283,10 @@ const updateWindowSiz = _ => {
|
|
|
189
283
|
x: 345, w: 160,
|
|
190
284
|
},
|
|
191
285
|
lblArrowInfo: {
|
|
192
|
-
x: 130, y: 45, w: 290, siz:
|
|
286
|
+
x: 130, y: 45, w: 290, siz: g_limitObj.jdgCntsSiz,
|
|
193
287
|
},
|
|
194
288
|
dataArrowInfo: {
|
|
195
|
-
x: 270, y: 45, w: 160, siz:
|
|
289
|
+
x: 270, y: 45, w: 160, siz: g_limitObj.jdgCntsSiz,
|
|
196
290
|
},
|
|
197
291
|
lblArrowInfo2: {
|
|
198
292
|
x: 130, y: 70, w: 200, h: 90,
|
|
@@ -201,7 +295,7 @@ const updateWindowSiz = _ => {
|
|
|
201
295
|
x: 140, y: 70, w: 275, h: 150, overflow: `auto`,
|
|
202
296
|
},
|
|
203
297
|
lnkDifInfo: {
|
|
204
|
-
w:
|
|
298
|
+
w: g_limitObj.difCoverWidth, borderStyle: `solid`,
|
|
205
299
|
},
|
|
206
300
|
|
|
207
301
|
/** ディスプレイ画面 */
|
|
@@ -209,16 +303,16 @@ const updateWindowSiz = _ => {
|
|
|
209
303
|
x: 0, y: g_sHeight - 45, w: g_sWidth, h: 20,
|
|
210
304
|
},
|
|
211
305
|
sdDesc: {
|
|
212
|
-
x: 0, y: 65, w: g_sWidth, h: 20, siz:
|
|
306
|
+
x: 0, y: 65, w: g_sWidth, h: 20, siz: g_limitObj.mainSiz,
|
|
213
307
|
},
|
|
214
308
|
lblAppearancePos: {
|
|
215
|
-
x:
|
|
309
|
+
x: g_limitObj.setLblLeft, y: 20, siz: 12, align: C_ALIGN_CENTER,
|
|
216
310
|
},
|
|
217
311
|
lblAppearanceBar: {
|
|
218
|
-
x:
|
|
312
|
+
x: g_limitObj.setLblLeft, y: 15,
|
|
219
313
|
},
|
|
220
314
|
lnkLockBtn: {
|
|
221
|
-
x:
|
|
315
|
+
x: g_limitObj.setLblLeft + g_limitObj.setLblWidth - 40, y: 0, w: 40, h: g_limitObj.setLblHeight, siz: 12,
|
|
222
316
|
borderStyle: `solid`,
|
|
223
317
|
},
|
|
224
318
|
|
|
@@ -227,7 +321,7 @@ const updateWindowSiz = _ => {
|
|
|
227
321
|
x: 0, y: g_sHeight - 45, w: g_sWidth, h: 20,
|
|
228
322
|
},
|
|
229
323
|
kcMsg: {
|
|
230
|
-
x: 0, y: g_sHeight - 25, w: g_sWidth, h: 20, siz:
|
|
324
|
+
x: 0, y: g_sHeight - 25, w: g_sWidth, h: 20, siz: g_limitObj.mainSiz,
|
|
231
325
|
},
|
|
232
326
|
kcDesc: {
|
|
233
327
|
x: 0, y: 68, w: g_sWidth, h: 20,
|
|
@@ -244,30 +338,30 @@ const updateWindowSiz = _ => {
|
|
|
244
338
|
|
|
245
339
|
btnKcBack: {
|
|
246
340
|
x: g_sWidth / 3, y: g_sHeight - 75,
|
|
247
|
-
w: g_sWidth / 3, h:
|
|
341
|
+
w: g_sWidth / 3, h: g_limitObj.btnHeight / 2, siz: g_limitObj.btnSiz * 2 / 3,
|
|
248
342
|
},
|
|
249
343
|
lblPattern: {
|
|
250
|
-
x: g_sWidth / 6, y: g_sHeight - 100, w: g_sWidth / 3, h:
|
|
344
|
+
x: g_sWidth / 6, y: g_sHeight - 100, w: g_sWidth / 3, h: g_limitObj.btnHeight / 2,
|
|
251
345
|
},
|
|
252
346
|
btnPtnChangeR: {
|
|
253
347
|
x: g_sWidth / 2, y: g_sHeight - 100,
|
|
254
|
-
w: g_sWidth / 9, h:
|
|
348
|
+
w: g_sWidth / 9, h: g_limitObj.btnHeight / 2, siz: g_limitObj.btnSiz * 2 / 3,
|
|
255
349
|
},
|
|
256
350
|
btnPtnChangeL: {
|
|
257
351
|
x: g_sWidth / 18, y: g_sHeight - 100,
|
|
258
|
-
w: g_sWidth / 9, h:
|
|
352
|
+
w: g_sWidth / 9, h: g_limitObj.btnHeight / 2, siz: g_limitObj.btnSiz * 2 / 3,
|
|
259
353
|
},
|
|
260
354
|
btnPtnChangeRR: {
|
|
261
355
|
x: g_sWidth * 11 / 18, y: g_sHeight - 100,
|
|
262
|
-
w: g_sWidth / 18, h:
|
|
356
|
+
w: g_sWidth / 18, h: g_limitObj.btnHeight / 2, siz: g_limitObj.btnSiz * 2 / 3,
|
|
263
357
|
},
|
|
264
358
|
btnPtnChangeLL: {
|
|
265
359
|
x: 0, y: g_sHeight - 100,
|
|
266
|
-
w: g_sWidth / 18, h:
|
|
360
|
+
w: g_sWidth / 18, h: g_limitObj.btnHeight / 2, siz: g_limitObj.btnSiz * 2 / 3,
|
|
267
361
|
},
|
|
268
362
|
btnKcReset: {
|
|
269
363
|
x: 0, y: g_sHeight - 75,
|
|
270
|
-
w: g_sWidth / 3, h:
|
|
364
|
+
w: g_sWidth / 3, h: g_limitObj.btnHeight / 2, siz: g_limitObj.btnSiz * 2 / 3,
|
|
271
365
|
},
|
|
272
366
|
|
|
273
367
|
/** メイン画面 */
|
|
@@ -290,14 +384,14 @@ const updateWindowSiz = _ => {
|
|
|
290
384
|
x: 125, y: g_sHeight - 16, w: g_headerObj.playingWidth, h: 20, align: C_ALIGN_LEFT,
|
|
291
385
|
},
|
|
292
386
|
lblTime1: {
|
|
293
|
-
x: 18, y: g_sHeight - 30, w: 40, h: 20, siz:
|
|
387
|
+
x: 18, y: g_sHeight - 30, w: 40, h: 20, siz: g_limitObj.mainSiz, align: C_ALIGN_RIGHT,
|
|
294
388
|
},
|
|
295
389
|
lblTime2: {
|
|
296
|
-
x: 60, y: g_sHeight - 30, w: 60, h: 20, siz:
|
|
390
|
+
x: 60, y: g_sHeight - 30, w: 60, h: 20, siz: g_limitObj.mainSiz,
|
|
297
391
|
},
|
|
298
392
|
lblWord: {
|
|
299
393
|
x: 100, w: g_headerObj.playingWidth - 200, h: 50,
|
|
300
|
-
siz:
|
|
394
|
+
siz: g_limitObj.mainSiz, align: C_ALIGN_LEFT, display: `block`, margin: `auto`,
|
|
301
395
|
},
|
|
302
396
|
finishView: {
|
|
303
397
|
x: g_headerObj.playingWidth / 2 - 150, y: g_sHeight / 2 - 50, w: 300, h: 20, siz: 50,
|
|
@@ -317,21 +411,21 @@ const updateWindowSiz = _ => {
|
|
|
317
411
|
x: g_sWidth / 2 + 50, y: 40, w: 200, h: 30, siz: 20,
|
|
318
412
|
},
|
|
319
413
|
btnRsBack: {
|
|
320
|
-
w: g_sWidth / 4, h:
|
|
414
|
+
w: g_sWidth / 4, h: g_limitObj.btnHeight * 5 / 4, animationName: `smallToNormalY`,
|
|
321
415
|
},
|
|
322
416
|
btnRsCopy: {
|
|
323
|
-
x: g_sWidth / 4, w: g_sWidth / 2, h:
|
|
417
|
+
x: g_sWidth / 4, w: g_sWidth / 2, h: g_limitObj.btnHeight * 5 / 8, siz: 24, animationName: `smallToNormalY`,
|
|
324
418
|
},
|
|
325
419
|
btnRsTweet: {
|
|
326
|
-
x: g_sWidth / 4, y: g_sHeight - 100 +
|
|
327
|
-
w: g_sWidth / 4, h:
|
|
420
|
+
x: g_sWidth / 4, y: g_sHeight - 100 + g_limitObj.btnHeight * 5 / 8,
|
|
421
|
+
w: g_sWidth / 4, h: g_limitObj.btnHeight * 5 / 8, siz: 24, animationName: `smallToNormalY`,
|
|
328
422
|
},
|
|
329
423
|
btnRsGitter: {
|
|
330
|
-
x: g_sWidth / 2, y: g_sHeight - 100 +
|
|
331
|
-
w: g_sWidth / 4, h:
|
|
424
|
+
x: g_sWidth / 2, y: g_sHeight - 100 + g_limitObj.btnHeight * 5 / 8,
|
|
425
|
+
w: g_sWidth / 4, h: g_limitObj.btnHeight * 5 / 8, siz: 24, animationName: `smallToNormalY`,
|
|
332
426
|
},
|
|
333
427
|
btnRsRetry: {
|
|
334
|
-
x: g_sWidth / 4 * 3, w: g_sWidth / 4, h:
|
|
428
|
+
x: g_sWidth / 4 * 3, w: g_sWidth / 4, h: g_limitObj.btnHeight * 5 / 4, animationName: `smallToNormalY`,
|
|
335
429
|
},
|
|
336
430
|
});
|
|
337
431
|
};
|
|
@@ -516,14 +610,6 @@ const C_BLOCK_KEYS = [
|
|
|
516
610
|
];
|
|
517
611
|
|
|
518
612
|
/** 設定・オプション画面用共通 */
|
|
519
|
-
const C_LEN_GRAPH_WIDTH = 286;
|
|
520
|
-
const C_LEN_GRAPH_HEIGHT = 226;
|
|
521
|
-
const C_CLR_SPEEDGRAPH_SPEED = `#cc3333`;
|
|
522
|
-
const C_CLR_SPEEDGRAPH_BOOST = `#999900`;
|
|
523
|
-
const C_CLR_DENSITY_MAX = `#990000cc`;
|
|
524
|
-
const C_CLR_DENSITY_DEFAULT = `#999999cc`;
|
|
525
|
-
const C_LEN_DENSITY_DIVISION = 16;
|
|
526
|
-
|
|
527
613
|
const g_graphColorObj = {
|
|
528
614
|
max: `#993333cc`,
|
|
529
615
|
default: `#999999cc`,
|
|
@@ -531,6 +617,9 @@ const g_graphColorObj = {
|
|
|
531
617
|
default2Push: `#777777cc`,
|
|
532
618
|
max3Push: `#003399cc`,
|
|
533
619
|
default3Push: `#555555cc`,
|
|
620
|
+
|
|
621
|
+
speed: `#cc3333`,
|
|
622
|
+
boost: `#999900`,
|
|
534
623
|
};
|
|
535
624
|
|
|
536
625
|
const g_settingBtnObj = {
|
|
@@ -547,25 +636,17 @@ const g_settingBtnObj = {
|
|
|
547
636
|
U: `↑`,
|
|
548
637
|
},
|
|
549
638
|
pos: {
|
|
550
|
-
L:
|
|
551
|
-
LL:
|
|
552
|
-
LLL:
|
|
553
|
-
HL:
|
|
554
|
-
R:
|
|
555
|
-
RR:
|
|
556
|
-
RRR:
|
|
557
|
-
HR:
|
|
639
|
+
L: g_limitObj.setLblLeft - g_limitObj.setMiniWidth,
|
|
640
|
+
LL: g_limitObj.setLblLeft,
|
|
641
|
+
LLL: g_limitObj.setLblLeft + g_limitObj.setMiniWidth + 1,
|
|
642
|
+
HL: g_limitObj.setLblLeft,
|
|
643
|
+
R: g_limitObj.setLblLeft + g_limitObj.setLblWidth,
|
|
644
|
+
RR: g_limitObj.setLblLeft + g_limitObj.setLblWidth - g_limitObj.setMiniWidth,
|
|
645
|
+
RRR: g_limitObj.setLblLeft + g_limitObj.setLblWidth - g_limitObj.setMiniWidth * 3 / 2 - 1,
|
|
646
|
+
HR: g_limitObj.setLblLeft + g_limitObj.setLblWidth - g_limitObj.setMiniWidth,
|
|
558
647
|
}
|
|
559
648
|
};
|
|
560
649
|
|
|
561
|
-
const g_limitObj = {
|
|
562
|
-
adjustment: 30,
|
|
563
|
-
hitPosition: 50,
|
|
564
|
-
|
|
565
|
-
densityDivision: 16,
|
|
566
|
-
densityMaxVals: 3,
|
|
567
|
-
};
|
|
568
|
-
const C_MAX_ADJUSTMENT = 30;
|
|
569
650
|
const C_MAX_SPEED = 10;
|
|
570
651
|
const C_MIN_SPEED = 1;
|
|
571
652
|
|
|
@@ -591,14 +672,6 @@ const g_judgPosObj = {
|
|
|
591
672
|
|
|
592
673
|
const C_CLR_DUMMY = `#777777`;
|
|
593
674
|
|
|
594
|
-
const C_LEN_JDGCHARA_WIDTH = 200;
|
|
595
|
-
const C_LEN_JDGCHARA_HEIGHT = 20;
|
|
596
|
-
const C_SIZ_JDGCHARA = 20;
|
|
597
|
-
|
|
598
|
-
const C_LEN_JDGCNTS_WIDTH = 100;
|
|
599
|
-
const C_LEN_JDGCNTS_HEIGHT = 20;
|
|
600
|
-
const C_SIZ_JDGCNTS = 16;
|
|
601
|
-
|
|
602
675
|
let C_FRM_HITMOTION = 4;
|
|
603
676
|
let C_FRM_JDGMOTION = 60;
|
|
604
677
|
|
|
@@ -1481,6 +1554,7 @@ const g_keyObj = {
|
|
|
1481
1554
|
// - 原則、キー×パターンの数だけ設定が必要
|
|
1482
1555
|
currentKey: 7,
|
|
1483
1556
|
currentPtn: 0,
|
|
1557
|
+
defaultProp: `keyCtrl`,
|
|
1484
1558
|
|
|
1485
1559
|
prevKey: `Dummy`,
|
|
1486
1560
|
dfPtnNum: 0,
|
|
@@ -1988,10 +2062,8 @@ const g_keyObj = {
|
|
|
1988
2062
|
|
|
1989
2063
|
};
|
|
1990
2064
|
|
|
1991
|
-
//
|
|
1992
|
-
Object.
|
|
1993
|
-
setKeyDfVal(charaPtn.slice(`chara`.length));
|
|
1994
|
-
});
|
|
2065
|
+
// g_keyObj.defaultProp の上書きを禁止
|
|
2066
|
+
Object.defineProperty(g_keyObj, `defaultProp`, { writable: false });
|
|
1995
2067
|
|
|
1996
2068
|
// キーパターンのコピーリスト
|
|
1997
2069
|
// ・コピー先:コピー元の順に指定する
|
|
@@ -2040,6 +2112,13 @@ const g_copyKeyPtn = {
|
|
|
2040
2112
|
'15B_1': `15A_0`,
|
|
2041
2113
|
};
|
|
2042
2114
|
|
|
2115
|
+
// charaX_Y, posX_Y, keyGroupX_Y, divX_Y, divMaxX_Yが未定義のときに0からの連番で補完する処理 (charaX_Yが定義されていることが前提)
|
|
2116
|
+
// この後g_copyKeyPtnにてデータコピーするため、ここのみcharaX_Yがあるものだけについて処理
|
|
2117
|
+
Object.keys(g_keyObj).filter(val => val.startsWith(`chara`) &&
|
|
2118
|
+
!Object.keys(g_copyKeyPtn).includes(val.slice(`chara`.length))).forEach(charaPtn => {
|
|
2119
|
+
setKeyDfVal(charaPtn.slice(`chara`.length));
|
|
2120
|
+
});
|
|
2121
|
+
|
|
2043
2122
|
// キーパターンのコピー処理
|
|
2044
2123
|
// ただし、すでに定義済みの場合は定義済みのものを優先する
|
|
2045
2124
|
Object.keys(g_copyKeyPtn).forEach(keyPtnTo => {
|
|
@@ -2068,9 +2147,9 @@ Object.keys(g_copyKeyPtn).forEach(keyPtnTo => {
|
|
|
2068
2147
|
copyKeyPtn(`stepRtn`, `${keyPtnFrom}_${stepRtnGr}`, `${keyPtnTo}_${stepRtnGr}`);
|
|
2069
2148
|
stepRtnGr++;
|
|
2070
2149
|
}
|
|
2150
|
+
copyKeyPtn(`keyCtrl`);
|
|
2071
2151
|
copyKeyPtn(`chara`);
|
|
2072
2152
|
copyKeyPtn(`pos`);
|
|
2073
|
-
copyKeyPtn(`keyCtrl`);
|
|
2074
2153
|
copyKeyPtn(`scrollDir`);
|
|
2075
2154
|
copyKeyPtn(`assistPos`);
|
|
2076
2155
|
|