danoniplus 33.6.0 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js/danoni_main.js +70 -89
- package/js/lib/danoni_constants.js +2 -1
- package/js/template/danoni_setting.js +13 -1
- 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/09/
|
|
7
|
+
* Revised : 2023/09/24
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver
|
|
12
|
-
const g_revisedDate = `2023/09/
|
|
11
|
+
const g_version = `Ver 34.0.0`;
|
|
12
|
+
const g_revisedDate = `2023/09/24`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -294,6 +294,12 @@ const g_convFunc = {
|
|
|
294
294
|
const setVal = (_checkStr, _default, _type = C_TYP_STRING) =>
|
|
295
295
|
hasValN(_checkStr) ? g_convFunc[_type](_checkStr, _default) : _default;
|
|
296
296
|
|
|
297
|
+
/**
|
|
298
|
+
* ブール値からON/OFFへ変換
|
|
299
|
+
* @param {boolean} _condition
|
|
300
|
+
*/
|
|
301
|
+
const boolToSwitch = _condition => _condition ? C_FLG_ON : C_FLG_OFF;
|
|
302
|
+
|
|
297
303
|
/**
|
|
298
304
|
* ブール値への変換
|
|
299
305
|
* @param {string} _val
|
|
@@ -2299,11 +2305,9 @@ const copySetColor = (_baseObj, _scoreId) => {
|
|
|
2299
2305
|
* MusicUrlの基本情報を取得
|
|
2300
2306
|
* @param {number} _scoreId
|
|
2301
2307
|
*/
|
|
2302
|
-
const getMusicUrl = _scoreId =>
|
|
2303
|
-
|
|
2304
|
-
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ??
|
|
2305
|
-
g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2306
|
-
};
|
|
2308
|
+
const getMusicUrl = _scoreId =>
|
|
2309
|
+
g_headerObj.musicUrls !== undefined ?
|
|
2310
|
+
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ?? g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2307
2311
|
|
|
2308
2312
|
/**
|
|
2309
2313
|
* 譜面ファイル読込後処理(譜面詳細情報取得用)
|
|
@@ -2718,8 +2722,9 @@ const headerConvert = _dosObj => {
|
|
|
2718
2722
|
$id(`canvas-frame`).width = `${g_sWidth}px`;
|
|
2719
2723
|
}
|
|
2720
2724
|
// 高さ設定
|
|
2721
|
-
if (hasVal(_dosObj.windowHeight)) {
|
|
2722
|
-
g_sHeight = Math.max(setIntVal(_dosObj.windowHeight, g_sHeight),
|
|
2725
|
+
if (hasVal(_dosObj.windowHeight) || hasVal(g_presetObj.autoMinHeight)) {
|
|
2726
|
+
g_sHeight = Math.max(setIntVal(_dosObj.windowHeight, g_sHeight),
|
|
2727
|
+
setIntVal(g_presetObj.autoMinHeight, g_sHeight), g_sHeight);
|
|
2723
2728
|
$id(`canvas-frame`).height = `${g_sHeight}px`;
|
|
2724
2729
|
}
|
|
2725
2730
|
|
|
@@ -2934,7 +2939,7 @@ const headerConvert = _dosObj => {
|
|
|
2934
2939
|
if (g_presetObj.gaugeList !== undefined) {
|
|
2935
2940
|
Object.keys(g_presetObj.gaugeList).forEach(key => {
|
|
2936
2941
|
g_gaugeOptionObj.customDefault.push(key);
|
|
2937
|
-
g_gaugeOptionObj.varCustomDefault.push((g_presetObj.gaugeList[key]
|
|
2942
|
+
g_gaugeOptionObj.varCustomDefault.push(boolToSwitch(g_presetObj.gaugeList[key] === `V`));
|
|
2938
2943
|
});
|
|
2939
2944
|
g_gaugeOptionObj.custom = g_gaugeOptionObj.customDefault.concat();
|
|
2940
2945
|
g_gaugeOptionObj.varCustom = g_gaugeOptionObj.varCustomDefault.concat();
|
|
@@ -2989,12 +2994,12 @@ const headerConvert = _dosObj => {
|
|
|
2989
2994
|
}
|
|
2990
2995
|
|
|
2991
2996
|
// プレイサイズ(X方向, Y方向)
|
|
2992
|
-
obj.playingWidth = setIntVal(_dosObj.playingWidth, `default`);
|
|
2993
|
-
obj.playingHeight = setIntVal(_dosObj.playingHeight, g_sHeight);
|
|
2997
|
+
obj.playingWidth = setIntVal(_dosObj.playingWidth, g_presetObj.playingWidth ?? `default`);
|
|
2998
|
+
obj.playingHeight = setIntVal(_dosObj.playingHeight, g_presetObj.playingHeight ?? g_sHeight);
|
|
2994
2999
|
|
|
2995
3000
|
// プレイ左上位置(X座標, Y座標)
|
|
2996
|
-
obj.playingX = setIntVal(_dosObj.playingX);
|
|
2997
|
-
obj.playingY = setIntVal(_dosObj.playingY);
|
|
3001
|
+
obj.playingX = setIntVal(_dosObj.playingX, g_presetObj.playingX ?? 0);
|
|
3002
|
+
obj.playingY = setIntVal(_dosObj.playingY, g_presetObj.playingY ?? 0);
|
|
2998
3003
|
|
|
2999
3004
|
// ステップゾーン位置
|
|
3000
3005
|
g_posObj.stepY = (isNaN(parseFloat(_dosObj.stepY)) ? C_STEP_Y : parseFloat(_dosObj.stepY));
|
|
@@ -3114,8 +3119,8 @@ const headerConvert = _dosObj => {
|
|
|
3114
3119
|
|
|
3115
3120
|
// 空押し判定を行うか
|
|
3116
3121
|
obj.excessiveJdgUse = setBoolVal(_dosObj.excessiveJdgUse ?? g_presetObj.excessiveJdgUse);
|
|
3117
|
-
g_stateObj.excessive = obj.excessiveJdgUse
|
|
3118
|
-
g_settings.excessiveNum = obj.excessiveJdgUse
|
|
3122
|
+
g_stateObj.excessive = boolToSwitch(obj.excessiveJdgUse);
|
|
3123
|
+
g_settings.excessiveNum = Number(obj.excessiveJdgUse);
|
|
3119
3124
|
|
|
3120
3125
|
// 譜面名に制作者名を付加するかどうかのフラグ
|
|
3121
3126
|
obj.makerView = setBoolVal(_dosObj.makerView);
|
|
@@ -3140,7 +3145,7 @@ const headerConvert = _dosObj => {
|
|
|
3140
3145
|
// displayUse -> ボタンの有効/無効, displaySet -> ボタンの初期値(ON/OFF)
|
|
3141
3146
|
obj[`${option}Use`] = setBoolVal(displayUse[0], true);
|
|
3142
3147
|
obj[`${option}Set`] = setVal(displayUse.length > 1 ? displayUse[1] :
|
|
3143
|
-
(obj[`${option}Use`]
|
|
3148
|
+
boolToSwitch(obj[`${option}Use`]), ``, C_TYP_SWITCH);
|
|
3144
3149
|
g_stateObj[`d_${option.toLowerCase()}`] = setVal(obj[`${option}Set`], C_FLG_ON, C_TYP_SWITCH);
|
|
3145
3150
|
obj[`${option}ChainOFF`] = (_dosObj[`${option}ChainOFF`] !== undefined ? _dosObj[`${option}ChainOFF`].split(`,`) : []);
|
|
3146
3151
|
|
|
@@ -3169,7 +3174,7 @@ const headerConvert = _dosObj => {
|
|
|
3169
3174
|
if (g_localStorage.colorType !== undefined) {
|
|
3170
3175
|
g_colorType = g_localStorage.colorType;
|
|
3171
3176
|
if (obj.colorUse) {
|
|
3172
|
-
g_stateObj.d_color = g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1
|
|
3177
|
+
g_stateObj.d_color = boolToSwitch(g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1);
|
|
3173
3178
|
}
|
|
3174
3179
|
}
|
|
3175
3180
|
|
|
@@ -3514,7 +3519,7 @@ const resetCustomGauge = (_dosObj, { scoreId = 0 } = {}) => {
|
|
|
3514
3519
|
for (let j = 0; j < customGauges.length; j++) {
|
|
3515
3520
|
const customGaugeSets = customGauges[j].split(`::`);
|
|
3516
3521
|
obj[`custom${scoreId}`][j] = customGaugeSets[0];
|
|
3517
|
-
obj[`varCustom${scoreId}`][j] = (customGaugeSets[1]
|
|
3522
|
+
obj[`varCustom${scoreId}`][j] = boolToSwitch(customGaugeSets[1] === `V`);
|
|
3518
3523
|
}
|
|
3519
3524
|
if (scoreId === 0) {
|
|
3520
3525
|
obj.custom = obj.custom0.concat();
|
|
@@ -3821,7 +3826,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
|
|
|
3821
3826
|
if (!hasVal(tmpParam)) {
|
|
3822
3827
|
return;
|
|
3823
3828
|
}
|
|
3824
|
-
g_keyObj[pairName] = {}
|
|
3829
|
+
g_keyObj[pairName] = {};
|
|
3825
3830
|
|
|
3826
3831
|
// デフォルト項目がある場合は先に定義
|
|
3827
3832
|
if (_defaultName !== ``) {
|
|
@@ -4343,8 +4348,10 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
|
|
|
4343
4348
|
const commonSettingBtn = _labelName => {
|
|
4344
4349
|
|
|
4345
4350
|
const switchSave = evt => {
|
|
4351
|
+
const from = boolToSwitch(g_stateObj.dataSaveFlg);
|
|
4346
4352
|
g_stateObj.dataSaveFlg = !g_stateObj.dataSaveFlg;
|
|
4347
|
-
|
|
4353
|
+
|
|
4354
|
+
const to = boolToSwitch(g_stateObj.dataSaveFlg);
|
|
4348
4355
|
evt.target.classList.replace(g_cssObj[`button_${from}`], g_cssObj[`button_${to}`]);
|
|
4349
4356
|
};
|
|
4350
4357
|
|
|
@@ -4385,8 +4392,7 @@ const commonSettingBtn = _labelName => {
|
|
|
4385
4392
|
*/
|
|
4386
4393
|
const makePlayButton = _func => createCss2Button(`btnPlay`, g_lblNameObj.b_play, _ => true,
|
|
4387
4394
|
Object.assign(g_lblPosObj.btnPlay, {
|
|
4388
|
-
animationName: (g_initialFlg ? `` : `smallToNormalY`),
|
|
4389
|
-
resetFunc: _func,
|
|
4395
|
+
animationName: (g_initialFlg ? `` : `smallToNormalY`), resetFunc: _func,
|
|
4390
4396
|
}), g_cssObj.button_Next);
|
|
4391
4397
|
|
|
4392
4398
|
/**
|
|
@@ -4435,12 +4441,6 @@ const setSpriteList = _settingList => {
|
|
|
4435
4441
|
return spriteList;
|
|
4436
4442
|
};
|
|
4437
4443
|
|
|
4438
|
-
/**
|
|
4439
|
-
* 設定ウィンドウの作成
|
|
4440
|
-
* @param {string} _sprite
|
|
4441
|
-
*/
|
|
4442
|
-
const createOptionSprite = _sprite => createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
4443
|
-
|
|
4444
4444
|
/**
|
|
4445
4445
|
* スライダー共通処理
|
|
4446
4446
|
* @param {object} _slider
|
|
@@ -4458,7 +4458,7 @@ const inputSlider = (_slider, _link) => {
|
|
|
4458
4458
|
const resetDifWindow = _ => {
|
|
4459
4459
|
if (document.querySelector(`#difList`) !== null) {
|
|
4460
4460
|
deleteChildspriteAll(`difList`);
|
|
4461
|
-
[`difList`, `difCover`, `btnDifU`, `btnDifD`].forEach(obj =>
|
|
4461
|
+
[`difList`, `difCover`, `btnDifU`, `btnDifD`].forEach(obj => document.getElementById(obj).remove());
|
|
4462
4462
|
g_currentPage = `option`;
|
|
4463
4463
|
setShortcutEvent(g_currentPage, _ => true, { displayFlg: false, dfEvtFlg: true });
|
|
4464
4464
|
}
|
|
@@ -5067,7 +5067,7 @@ const setDifficulty = (_initFlg) => {
|
|
|
5067
5067
|
const createOptionWindow = _sprite => {
|
|
5068
5068
|
|
|
5069
5069
|
// 各ボタン用のスプライトを作成
|
|
5070
|
-
const optionsprite =
|
|
5070
|
+
const optionsprite = createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
5071
5071
|
|
|
5072
5072
|
// 設定毎に個別のスプライトを作成し、その中にラベル・ボタン類を配置
|
|
5073
5073
|
const spriteList = setSpriteList(g_settingPos.option);
|
|
@@ -5721,8 +5721,8 @@ const setExcessive = _btn => {
|
|
|
5721
5721
|
* @param {string} _extraKeyName 特殊キー名(通常キーは省略)
|
|
5722
5722
|
*/
|
|
5723
5723
|
const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
|
|
5724
|
-
|
|
5725
|
-
const basePtn = `${g_keyObj.currentKey}_${
|
|
5724
|
+
g_keyObj.storagePtn = _localStorage[`keyCtrlPtn${_extraKeyName}`];
|
|
5725
|
+
const basePtn = `${g_keyObj.currentKey}_${g_keyObj.storagePtn}`;
|
|
5726
5726
|
const baseKeyNum = g_keyObj[`${g_keyObj.defaultProp}${basePtn}`].length;
|
|
5727
5727
|
|
|
5728
5728
|
if (_localStorage[`keyCtrl${_extraKeyName}`] !== undefined && _localStorage[`keyCtrl${_extraKeyName}`][0].length > 0) {
|
|
@@ -5922,7 +5922,7 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5922
5922
|
};
|
|
5923
5923
|
|
|
5924
5924
|
// 各ボタン用のスプライトを作成
|
|
5925
|
-
|
|
5925
|
+
const optionsprite = createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
5926
5926
|
|
|
5927
5927
|
// 設定毎に個別のスプライトを作成し、その中にラベル・ボタン類を配置
|
|
5928
5928
|
const displaySprite = createEmptySprite(optionsprite, `displaySprite`, g_windowObj.displaySprite);
|
|
@@ -5971,13 +5971,11 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5971
5971
|
// ---------------------------------------------------
|
|
5972
5972
|
// 判定表示系の不透明度 (Opacity)
|
|
5973
5973
|
// 縦位置: 9
|
|
5974
|
-
|
|
5974
|
+
g_headerObj.opacityUse = false;
|
|
5975
5975
|
[`judgment`, `fastSlow`, `filterLine`].forEach(display =>
|
|
5976
|
-
opacityUse ||= g_headerObj[`${display}Use`] || g_headerObj[`${display}Set`] === C_FLG_ON);
|
|
5976
|
+
g_headerObj.opacityUse ||= g_headerObj[`${display}Use`] || g_headerObj[`${display}Set`] === C_FLG_ON);
|
|
5977
5977
|
|
|
5978
|
-
|
|
5979
|
-
createGeneralSetting(spriteList.opacity, `opacity`, { unitName: g_lblNameObj.percent });
|
|
5980
|
-
}
|
|
5978
|
+
createGeneralSetting(spriteList.opacity, `opacity`, { unitName: g_lblNameObj.percent });
|
|
5981
5979
|
|
|
5982
5980
|
// ---------------------------------------------------
|
|
5983
5981
|
// タイミング調整 (HitPosition)
|
|
@@ -6283,9 +6281,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6283
6281
|
*/
|
|
6284
6282
|
const makeKCButtonHeader = (_id, _name, {
|
|
6285
6283
|
x = g_sWidth * 5 / 6 - 30, y = 0, w = g_sWidth / 6, h = 20, siz = 12, align = C_ALIGN_LEFT, ...rest
|
|
6286
|
-
} = {}, ..._classes) => {
|
|
6287
|
-
return createDivCss2Label(_id, g_lblNameObj[_name], { x, y, w, h, siz, align, ...rest }, ..._classes);
|
|
6288
|
-
};
|
|
6284
|
+
} = {}, ..._classes) => createDivCss2Label(_id, g_lblNameObj[_name], { x, y, w, h, siz, align, ...rest }, ..._classes);
|
|
6289
6285
|
|
|
6290
6286
|
/**
|
|
6291
6287
|
* キーコンフィグ用設定ボタン
|
|
@@ -6298,9 +6294,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6298
6294
|
* @returns ボタン
|
|
6299
6295
|
*/
|
|
6300
6296
|
const makeKCButton = (_id, _text, _func, { x = g_sWidth * 5 / 6 - 20, y = 15, w = g_sWidth / 6, h = 18,
|
|
6301
|
-
siz = g_limitObj.jdgCntsSiz, borderStyle = `solid`, cxtFunc, ...rest } = {}, _mainClass = g_cssObj.button_RevOFF, ..._classes) =>
|
|
6302
|
-
|
|
6303
|
-
};
|
|
6297
|
+
siz = g_limitObj.jdgCntsSiz, borderStyle = `solid`, cxtFunc, ...rest } = {}, _mainClass = g_cssObj.button_RevOFF, ..._classes) =>
|
|
6298
|
+
makeSettingLblCssButton(_id, getStgDetailName(_text), 0, _func, { x, y, w, h, siz, cxtFunc, borderStyle, ...rest }, _mainClass, ..._classes);
|
|
6304
6299
|
|
|
6305
6300
|
/**
|
|
6306
6301
|
* キーコンフィグ用ミニボタン
|
|
@@ -6309,10 +6304,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6309
6304
|
* @param {function} _func
|
|
6310
6305
|
* @param {*} object (x, y, w, h, siz)
|
|
6311
6306
|
*/
|
|
6312
|
-
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz = g_limitObj.mainSiz } = {}) =>
|
|
6313
|
-
|
|
6314
|
-
{ x, y, w, h, siz }, g_cssObj.button_Mini);
|
|
6315
|
-
};
|
|
6307
|
+
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz = g_limitObj.mainSiz } = {}) =>
|
|
6308
|
+
createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, { x, y, w, h, siz }, g_cssObj.button_Mini);
|
|
6316
6309
|
|
|
6317
6310
|
/**
|
|
6318
6311
|
* キーコンフィグ用グループ設定ラベル・ボタンの作成
|
|
@@ -6339,7 +6332,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6339
6332
|
multiAppend(divRoot,
|
|
6340
6333
|
|
|
6341
6334
|
// ショートカットキーメッセージ
|
|
6342
|
-
createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc.split(`{0}`)
|
|
6335
|
+
createDescDiv(`scMsg`, g_lblNameObj.kcShortcutDesc.split(`{0}`)
|
|
6336
|
+
.join(g_isMac ? `Shift+${g_kCd[g_headerObj.keyRetry]}` : g_kCd[g_headerObj.keyTitleBack])
|
|
6343
6337
|
.split(`{1}`).join(g_kCd[g_headerObj.keyRetry]), `scKcMsg`),
|
|
6344
6338
|
|
|
6345
6339
|
// 別キーモード警告メッセージ
|
|
@@ -6385,8 +6379,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6385
6379
|
|
|
6386
6380
|
const nextLeft = (kWidth - C_ARW_WIDTH) / 2 + g_keyObj.blank * stdPos - maxLeftX - 10;
|
|
6387
6381
|
cursor.style.left = `${nextLeft}px`;
|
|
6388
|
-
|
|
6389
|
-
cursor.style.top = `${baseY + C_KYC_REPHEIGHT * g_currentk}px`;
|
|
6382
|
+
cursor.style.top = `${C_KYC_HEIGHT * Number(posj > divideCnt) + 57 + C_KYC_REPHEIGHT * g_currentk}px`;
|
|
6390
6383
|
g_kcType = (g_currentk === 0 ? `Main` : `Replaced`);
|
|
6391
6384
|
|
|
6392
6385
|
// 次の位置が見えなくなったらkeyconSpriteの位置を調整する
|
|
@@ -6423,10 +6416,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6423
6416
|
keyconSprite.scrollLeft = - maxLeftX;
|
|
6424
6417
|
};
|
|
6425
6418
|
|
|
6426
|
-
const getNextNum = (_scrollNum, _groupName, _target) =>
|
|
6427
|
-
|
|
6428
|
-
return nextPos(typeNum, _scrollNum, g_keycons[_groupName].length);
|
|
6429
|
-
};
|
|
6419
|
+
const getNextNum = (_scrollNum, _groupName, _target) =>
|
|
6420
|
+
nextPos(g_keycons[_groupName].findIndex(value => value === _target), _scrollNum, g_keycons[_groupName].length);
|
|
6430
6421
|
|
|
6431
6422
|
/**
|
|
6432
6423
|
* ConfigTypeの制御
|
|
@@ -6501,7 +6492,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6501
6492
|
const nextNum = getNextNum(_scrollNum, `colorTypes`, g_colorType);
|
|
6502
6493
|
g_colorType = g_keycons.colorTypes[nextNum];
|
|
6503
6494
|
if (g_headerObj.colorUse) {
|
|
6504
|
-
g_stateObj.d_color = g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1
|
|
6495
|
+
g_stateObj.d_color = boolToSwitch(g_keycons.colorDefTypes.findIndex(val => val === g_colorType) !== -1);
|
|
6505
6496
|
}
|
|
6506
6497
|
changeSetColor();
|
|
6507
6498
|
viewGroupObj.color(`_${g_keycons.colorGroupNum}`);
|
|
@@ -6577,8 +6568,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6577
6568
|
keyconSprite.scrollLeft = - maxLeftX;
|
|
6578
6569
|
|
|
6579
6570
|
// キーパターン表示
|
|
6580
|
-
const lblTransKey = hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ?
|
|
6581
|
-
`(${g_keyObj[`transKey${keyCtrlPtn}`] ?? ''})` : ``;
|
|
6571
|
+
const lblTransKey = hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ? `(${g_keyObj[`transKey${keyCtrlPtn}`] ?? ''})` : ``;
|
|
6582
6572
|
|
|
6583
6573
|
/**
|
|
6584
6574
|
* キーパターン検索
|
|
@@ -6791,8 +6781,7 @@ const getKeyInfo = _ => {
|
|
|
6791
6781
|
const keyGroupList = makeDedupliArray(keyGroupMaps.flat()).sort((a, b) => parseInt(a) - parseInt(b));
|
|
6792
6782
|
|
|
6793
6783
|
return {
|
|
6794
|
-
keyCtrlPtn
|
|
6795
|
-
keyGroupMaps: keyGroupMaps, keyGroupList: keyGroupList,
|
|
6784
|
+
keyCtrlPtn, keyNum, posMax, divideCnt, keyGroupMaps, keyGroupList,
|
|
6796
6785
|
};
|
|
6797
6786
|
};
|
|
6798
6787
|
|
|
@@ -6839,18 +6828,7 @@ const changeSetColor = _ => {
|
|
|
6839
6828
|
* @param {string} _cssName
|
|
6840
6829
|
*/
|
|
6841
6830
|
const changeConfigColor = (_obj, _cssName) => {
|
|
6842
|
-
|
|
6843
|
-
if (_obj.classList.contains(_className)) {
|
|
6844
|
-
_obj.classList.remove(_className);
|
|
6845
|
-
}
|
|
6846
|
-
};
|
|
6847
|
-
|
|
6848
|
-
// CSSクラスの除去
|
|
6849
|
-
resetClass(g_cssObj.keyconfig_Changekey);
|
|
6850
|
-
resetClass(g_cssObj.keyconfig_Defaultkey);
|
|
6851
|
-
resetClass(g_cssObj.title_base);
|
|
6852
|
-
|
|
6853
|
-
// 指定されたCSSクラスを適用
|
|
6831
|
+
_obj.classList.remove(g_cssObj.keyconfig_Changekey, g_cssObj.keyconfig_Defaultkey, g_cssObj.title_base);
|
|
6854
6832
|
_obj.classList.add(_cssName);
|
|
6855
6833
|
};
|
|
6856
6834
|
|
|
@@ -7536,7 +7514,10 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7536
7514
|
*/
|
|
7537
7515
|
const getRefData = (_header, _dataName) => {
|
|
7538
7516
|
const data = _dosObj[`${_header}${_dataName}`];
|
|
7539
|
-
|
|
7517
|
+
let dataStr = data;
|
|
7518
|
+
splitLF(data)?.filter(val => val?.startsWith(_header) && _dosObj[val] !== undefined)
|
|
7519
|
+
.forEach(val => dataStr = dataStr.replace(val, _dosObj[val]));
|
|
7520
|
+
return dataStr;
|
|
7540
7521
|
}
|
|
7541
7522
|
|
|
7542
7523
|
/**
|
|
@@ -7561,7 +7542,8 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7561
7542
|
}
|
|
7562
7543
|
|
|
7563
7544
|
const list = [];
|
|
7564
|
-
const
|
|
7545
|
+
const ptnName = `${(g_keyObj.currentPtn === -1 ? g_keyObj.storagePtn : g_keyObj.currentPtn) + 1}`;
|
|
7546
|
+
const keyName = setVal(g_keyObj[`transKey${_keyCtrlPtn}`], g_keyObj.currentKey);
|
|
7565
7547
|
let type = ``;
|
|
7566
7548
|
if (g_stateObj.scroll !== `---`) {
|
|
7567
7549
|
type = `Alt`;
|
|
@@ -7569,14 +7551,13 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7569
7551
|
type = `Rev`;
|
|
7570
7552
|
}
|
|
7571
7553
|
|
|
7572
|
-
|
|
7573
|
-
list.push(`${
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
list.push(type);
|
|
7579
|
-
list.push(``);
|
|
7554
|
+
[g_stateObj.scroll, type, ``].forEach(header => {
|
|
7555
|
+
list.push(`${header}[${ptnName}]`, `${header}<${keyName}>`);
|
|
7556
|
+
if (hasVal(g_keyObj[`transKey${_keyCtrlPtn}`])) {
|
|
7557
|
+
list.push(`${header}A`);
|
|
7558
|
+
}
|
|
7559
|
+
});
|
|
7560
|
+
list.push(g_stateObj.scroll, type, ``);
|
|
7580
7561
|
|
|
7581
7562
|
return makeDedupliArray(list);
|
|
7582
7563
|
};
|
|
@@ -7833,7 +7814,7 @@ const getFirstArrowFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_
|
|
|
7833
7814
|
];
|
|
7834
7815
|
|
|
7835
7816
|
data.filter(data => hasVal(data)).forEach(_objData => {
|
|
7836
|
-
if (
|
|
7817
|
+
if (_objData[0] !== `` && _objData[0] < tmpFirstNum && _objData[0] + g_limitObj.adjustment > 0) {
|
|
7837
7818
|
tmpFirstNum = _objData[0];
|
|
7838
7819
|
}
|
|
7839
7820
|
});
|
|
@@ -8065,7 +8046,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8065
8046
|
}
|
|
8066
8047
|
|
|
8067
8048
|
// 個別加速のタイミング更新
|
|
8068
|
-
const
|
|
8049
|
+
const calcBoostData = _data => {
|
|
8069
8050
|
if (hasArrayList(_data, 2)) {
|
|
8070
8051
|
let delIdx = 0;
|
|
8071
8052
|
for (let k = _data.length - 2; k >= 0; k -= 2) {
|
|
@@ -8085,7 +8066,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8085
8066
|
}
|
|
8086
8067
|
return [];
|
|
8087
8068
|
};
|
|
8088
|
-
g_workObj.boostData =
|
|
8069
|
+
g_workObj.boostData = calcBoostData(_dataObj.boostData);
|
|
8089
8070
|
|
|
8090
8071
|
/**
|
|
8091
8072
|
* 色変化・モーションデータ・スクロール反転データのタイミング更新
|
|
@@ -8533,7 +8514,7 @@ const getArrowSettings = _ => {
|
|
|
8533
8514
|
const scrollDirOptions = (g_keyObj[`scrollDir${keyCtrlPtn}`] !== undefined ?
|
|
8534
8515
|
g_keyObj[`scrollDir${keyCtrlPtn}`][g_stateObj.scroll] : [...Array(keyNum)].fill(1));
|
|
8535
8516
|
|
|
8536
|
-
g_stateObj.autoAll = (g_stateObj.autoPlay === C_FLG_ALL
|
|
8517
|
+
g_stateObj.autoAll = boolToSwitch(g_stateObj.autoPlay === C_FLG_ALL);
|
|
8537
8518
|
g_workObj.hitPosition = (g_stateObj.autoAll ? 0 : g_stateObj.hitPosition);
|
|
8538
8519
|
changeSetColor();
|
|
8539
8520
|
|
|
@@ -9266,7 +9247,7 @@ const mainInit = _ => {
|
|
|
9266
9247
|
g_typeLists.arrow.forEach(type =>
|
|
9267
9248
|
judgeObjDelete[type] = (_j, _deleteName) => {
|
|
9268
9249
|
g_workObj[`judg${toCapitalize(type)}Cnt`][_j]++;
|
|
9269
|
-
|
|
9250
|
+
document.getElementById(_deleteName).remove();
|
|
9270
9251
|
delete g_attrObj[_deleteName];
|
|
9271
9252
|
});
|
|
9272
9253
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2023/09/
|
|
8
|
+
* Revised : 2023/09/24 (v34.0.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -1677,6 +1677,7 @@ const g_keyObj = {
|
|
|
1677
1677
|
// - 原則、キー×パターンの数だけ設定が必要
|
|
1678
1678
|
currentKey: 7,
|
|
1679
1679
|
currentPtn: 0,
|
|
1680
|
+
storagePtn: 0,
|
|
1680
1681
|
defaultProp: `keyCtrl`,
|
|
1681
1682
|
|
|
1682
1683
|
prevKey: `Dummy`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
3
|
* Dancing☆Onigiri 設定用jsファイル
|
|
4
|
-
* Template Update: 2023/08
|
|
4
|
+
* Template Update: 2023/09/08 (v33.7.0)
|
|
5
5
|
*
|
|
6
6
|
* このファイルでは、作品全体に対しての初期設定を行うことができます。
|
|
7
7
|
* 譜面データ側で個別に同様の項目が設定されている場合は、譜面データ側の設定が優先されます。
|
|
@@ -29,6 +29,9 @@ g_presetObj.tuningUrl = `https://www.google.co.jp/`;
|
|
|
29
29
|
/** 個人サイト別の最小横幅設定 */
|
|
30
30
|
//g_presetObj.autoMinWidth = 600;
|
|
31
31
|
|
|
32
|
+
/** 個人サイト別の最小高さ設定 */
|
|
33
|
+
//g_presetObj.autoMinHeight = 500;
|
|
34
|
+
|
|
32
35
|
/** 個人サイト別のウィンドウ位置 (left:左寄せ, center:中央, right:右寄せ)*/
|
|
33
36
|
//g_presetObj.windowAlign = `center`;
|
|
34
37
|
|
|
@@ -292,6 +295,15 @@ g_presetObj.stockForceDelList = {
|
|
|
292
295
|
*/
|
|
293
296
|
//g_presetObj.playingLayout = `left`;
|
|
294
297
|
|
|
298
|
+
/**
|
|
299
|
+
* プレイ画面の位置調整
|
|
300
|
+
* - 譜面ヘッダーのplayingX, playingY, playingWidth, playingHeightと同じ
|
|
301
|
+
*/
|
|
302
|
+
//g_presetObj.playingX = 0;
|
|
303
|
+
//g_presetObj.playingY = 0;
|
|
304
|
+
//g_presetObj.playingWidth = 600;
|
|
305
|
+
//g_presetObj.playingHeight = 500;
|
|
306
|
+
|
|
295
307
|
/*
|
|
296
308
|
------------------------------------------------------------------------
|
|
297
309
|
リザルトデータ
|