Skip to content

Commit

Permalink
[0591/sc-group:0.4.0] 一部Display設定の自動保存機能を撤去
Browse files Browse the repository at this point in the history
  • Loading branch information
cwtickle committed Oct 5, 2022
1 parent 2389022 commit e7c5e35
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 8 additions & 1 deletion js/danoni_main.js
Expand Up @@ -1956,6 +1956,13 @@ const loadLocalStorage = _ => {
g_localStorage.highscores = {};
}

// 廃棄済みリストからデータを消去
g_storeSettingsEx.forEach(val => {
if (g_localStorage[val] !== undefined) {
delete g_localStorage[val];
}
});

} else {
g_localStorage = {
adjustment: 0,
Expand Down Expand Up @@ -2907,7 +2914,7 @@ const headerConvert = _dosObj => {
});
}

// ローカルストレージに保存済みのDisplay設定・ColorType設定を戻す
// ローカルストレージに保存済みのAppearance, Opacity設定・ColorType設定を戻す
g_storeSettings.filter(tmpSetting => hasVal(g_localStorage[tmpSetting])).forEach(setting =>
g_stateObj[setting] = g_localStorage[setting]);
if (g_localStorage.colorType !== undefined) {
Expand Down
6 changes: 5 additions & 1 deletion js/lib/danoni_constants.js
Expand Up @@ -837,7 +837,11 @@ const g_keycons = {
let g_displays = [`stepZone`, `judgment`, `fastSlow`, `lifeGauge`, `score`, `musicInfo`, `filterLine`,
`speed`, `color`, `lyrics`, `background`, `arrowEffect`, `special`];

let g_storeSettings = [`appearance`, `opacity`, `d_stepzone`, `d_judgment`, `d_fastslow`, `d_lifegauge`,
// ローカルストレージ保存対象
let g_storeSettings = [`appearance`, `opacity`];

// 廃棄対象のリスト(過去の登録対象をリスト化。ここに乗せるとローカルストレージから自動消去される)
let g_storeSettingsEx = [`d_stepzone`, `d_judgment`, `d_fastslow`, `d_lifegauge`,
`d_score`, `d_musicinfo`, `d_filterline`];

let g_canDisabledSettings = [`motion`, `scroll`, `shuffle`, `autoPlay`, `gauge`, `appearance`];
Expand Down

0 comments on commit e7c5e35

Please sign in to comment.