danoniplus 36.3.2 → 36.4.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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Dancing☆Onigiri (CW Edition)
2
2
 
3
- [![Maintainability](https://api.codeclimate.com/v1/badges/9558f21e17a47a4dc987/maintainability)](https://codeclimate.com/github/cwtickle/danoniplus/maintainability)
4
- [![CodeQL](https://github.com/cwtickle/danoniplus/workflows/CodeQL/badge.svg)](https://github.com/cwtickle/danoniplus/actions?query=workflow%3ACodeQL)
5
- [![GitLab Community](https://img.shields.io/gitlab/issues/open/cwtickle/danonicw?gitlab_url=https%3A%2F%2Fgitlab.com%2F&label=Community&logo=gitlab)](https://gitlab.com/cwtickle/danonicw/-/issues)
3
+ [![CodeFactor](https://www.codefactor.io/repository/github/cwtickle/danoniplus/badge)](https://www.codefactor.io/repository/github/cwtickle/danoniplus)
4
+ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/1213a18348c34328ac4f10c9e8a2b987)](https://app.codacy.com/gh/cwtickle/danoniplus/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
5
+ [![CodeQL](https://github.com/cwtickle/danoniplus/workflows/CodeQL/badge.svg)](https://github.com/cwtickle/danoniplus/actions?query=workflow%3ACodeQL)
6
6
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/cwtickle/danoniplus?sort=semver)](https://github.com/cwtickle/danoniplus/security/policy)
7
7
  [![GitHub All Releases](https://img.shields.io/github/downloads/cwtickle/danoniplus/total?color=%23ff3399&label=downloads%20%28recently%29)](https://github.com/cwtickle/danoniplus/releases)
8
8
  [![GitHub](https://img.shields.io/github/license/cwtickle/danoniplus)](https://github.com/cwtickle/danoniplus/blob/develop/LICENSE)
@@ -22,11 +22,13 @@ Dancing☆Onigiri (CW Edition)は、ブラウザで動作するキーボード
22
22
  これまでのParaFla版に比べ、さまざまな機能強化を行っています。
23
23
 
24
24
  ## Demo
25
- - [Demo1](https://cw7.sakura.ne.jp/danoni/2013/0237_Cllema.html) クレマ / Kinoshita Tamaki
26
- - [Demo2](https://cw7.sakura.ne.jp/danoni/2017/0305_ShiningStar.html) シャイニングスター / MaouDamashii
27
- - [Demo3](https://cw7.sakura.ne.jp/danoni/2018/0315_PetitMagie.html) プチ・マギエ / Napi
25
+
26
+ - [Demo1](https://cw7.sakura.ne.jp/danoni/2013/0237_Cllema.html) クレマ / Kinoshita Tamaki
27
+ - [Demo2](https://cw7.sakura.ne.jp/danoni/2017/0305_ShiningStar.html) シャイニングスター / MaouDamashii
28
+ - [Demo3](https://cw7.sakura.ne.jp/danoni/2018/0315_PetitMagie.html) プチ・マギエ / Napi
28
29
 
29
30
  ## How to Play / 遊び方
31
+
30
32
  This is a rhythm game, using Keyboard on the website.
31
33
  There are many playstyles in the *Dancing Onigiri*. For example, 5keys, 7keys, 11keys, etc.
32
34
  The details are as follows.
@@ -43,6 +45,7 @@ The details are as follows.
43
45
  (The image is under development. / 画像は開発中のものです)
44
46
 
45
47
  ### Rule / ゲームのルール
48
+
46
49
  When you press the keyboard with good timing *:D Perfect!!* *:) O.K.* and life will go up.
47
50
  On the other hand, if you remove the timing *:( Bad*, *:_( Miss*, *:( N.G.* will be, life falls.
48
51
  If the life of the life gauge remains by the end of the game or it is over the quota, the game is cleared.
@@ -52,53 +55,69 @@ If the life of the life gauge remains by the end of the game or it is over the q
52
55
  ゲーム終了までにライフゲージのライフが残っているか、ノルマ以上であればゲームクリアです。
53
56
 
54
57
  ## Works / 公開作品
58
+
55
59
  - [Dancing☆Onigiri 難易度表 for.js](http://dodl4.g3.xrea.com/)
56
- - [多鍵データベース](http://apoi108.sakura.ne.jp/danoni/ta/index.php)
60
+ - [多鍵データベース](http://apoi108.sakura.ne.jp/danoni/ta/)
61
+ - [メジャー多鍵データベース](https://apoi108.sakura.ne.jp/danoni/danoni_all_list/)
57
62
  - [Dancing☆Onigiri サイト一覧](https://cw7.sakura.ne.jp/danonidb/)
58
63
  - [Dancing☆Onigiri 作品一覧](https://cw7.sakura.ne.jp/lst/)
59
64
 
60
65
  ## How to Make / 作り方
66
+
61
67
  - [How to make chart overview](https://github.com/cwtickle/danoniplus-docs/wiki/HowtoMake) / [譜面の作成概要](https://github.com/cwtickle/danoniplus/wiki/HowtoMake)
62
68
  - [ParaFla!ソース利用者向け移行方法 (Japanese Only)](https://github.com/cwtickle/danoniplus/wiki/forParaFlaUser)
63
69
 
64
70
  ### How to Install / 導入方法
71
+
65
72
  - Download from [Changelog](https://github.com/cwtickle/danoniplus-docs/wiki/Changelog-latest). You can also install from npm.
66
- - [Releases](https://github.com/cwtickle/danoniplus/releases)からダウンロードします。npmからの導入も可能です。
73
+ - [Releases](https://github.com/cwtickle/danoniplus/releases)からダウンロードします。npmからの導入も可能です。
67
74
  ```
68
75
  npm i danoniplus
69
76
  ```
70
77
  - When directly specifying the version name, specify the version after @ as shown below.
71
- - バージョン名を直接指定するときは下記のように @以降をバージョン指定します。
78
+ - バージョン名を直接指定するときは下記のように @以降をバージョン指定します。
72
79
  ```
73
80
  npm i danoniplus@26.1.2
74
81
  ```
75
82
 
76
83
  ## System requirements / 動作環境
84
+
77
85
  - Windows, Mac OS, Linux, Android, iPad OS
78
86
  - Google Chrome, Microsoft Edge, Opera, Vivaldi, Safari (WebKit), Firefox (Gecko)
79
87
 
80
88
  ## Difference from Flash Version / Flash版との差異 (Japanese Only)
89
+
81
90
  *Dancing Onigiri "CW Edition"* basically conforms to the specifications of *ParaFla!* Version, but the details are different from the conventional ones. See below for details.
82
91
 
83
92
  Dancing☆Onigiri (CW Edition)では基本的にParaFla!版の仕様に準拠していますが、
84
- 細かい点が従来と異なります。詳細は下記をご覧ください。
93
+ 細かい点が従来と異なります。詳細は下記をご覧ください。
94
+
85
95
  - [Difference from Flash Version / Flash版との差異 (Japanese)](https://github.com/cwtickle/danoniplus/wiki/DifferenceFromFlashVer)
86
96
 
87
97
  ## How to Contribute / 開発者の方へ
98
+
88
99
  If you would like to cooperate with the development, please see below. Even if you don't have a GitHub account, you can cooperate!
89
100
 
90
- 開発にご協力いただける方は、下記をご覧ください。GitHubアカウントの無い方でも協力できます!
101
+ 開発にご協力いただける方は、下記をご覧ください。GitHubアカウントの無い方でも協力できます!
102
+
91
103
  - [How to Contribute / 貢献の仕方](https://github.com/cwtickle/danoniplus/blob/develop/.github/CONTRIBUTING.md)
92
104
  - [GitLab community for requests and bug reports / 要望・不具合報告(GitLab Issues)](https://gitlab.com/cwtickle/danonicw/-/issues)
93
105
  - [Contributors / コントリビューター](https://github.com/cwtickle/danoniplus/blob/develop/CONTRIBUTORS.md)
94
106
 
107
+ ## Portal Site / ポータルサイト
108
+
109
+ - [Dancing☆Onigiri Wiki](https://wikiwiki.jp/danoniplus/)
110
+
95
111
  ## Community / コミュニティ
112
+
96
113
  - [Dancing☆Onigiri Discord server](https://discord.gg/TegbHFY7zg)
97
- - [Gitter for score reporting / 得点報告(Gitter)](https://app.gitter.im/#/room/#danonicw_freeboard:gitter.im)
98
- - [Twitter #danoni](https://twitter.com/search?q=%23danoni&src=typed_query&f=live)
114
+ - [X #danoni](https://x.com/search?q=%23danoni&src=typed_query&f=live)
99
115
 
100
116
  ## Related Tools Repository / 関連リポジトリ・ツール
117
+
101
118
  ### Dancing☆Onigiri
119
+
120
+ - [Dancing☆Onigiri Preview](https://danonicw.skr.jp/)
102
121
  - [Dancing☆Onigiri エディター(CW Edition 対応)](https://github.com/superkuppabros/danoni-editor) @superkuppabros
103
122
  - [ダンおに曲データjs化ツール](https://github.com/suzme/danoni-base64) @suzme
104
123
  - [ダンおに矢印色ツール](https://github.com/suzme/danoni-colorpicker) @suzme
@@ -107,14 +126,17 @@ If you would like to cooperate with the development, please see below. Even if y
107
126
  - [ダンおにゲージ計算機 (Gauge Calculator)](http://www.omission0.com/other/gauge_calculator/) @goe0
108
127
 
109
128
  ### Kirizma / キリズマ
129
+
110
130
  - [キリズマ譜面データ変換機](https://github.com/suzme/kirizma-converter) @suzme
111
131
  - [キリズマ歌詞表示作成ツール](https://github.com/prlg25/kirizma_lyric) @prlg25
112
132
  - [キリズマ難易度表](https://github.com/suzme/kirizma) @suzme
113
133
 
114
134
  ### Punching◇Panels
135
+
115
136
  - [Punching◇Panels](https://github.com/cwtickle/punching-panels) @cwtickle
116
137
  - [Punching◇Panels エディター](https://github.com/suzme/punpane-editor) @suzme
117
138
  - [Punching◇Panels 難易度表](https://github.com/suzme/punpane) @suzme
118
139
 
119
140
  ## License / ライセンス
141
+
120
142
  This software is released under the MIT License, see LICENSE.
@@ -4,7 +4,7 @@
4
4
  本体cssファイル
5
5
 
6
6
  Created : 2018/10/08
7
- Revised : 2024/04/18 (v36.1.0)
7
+ Revised : 2024/05/18 (v36.4.1)
8
8
 
9
9
  https://github.com/cwtickle/danoniplus
10
10
  ------------------------------------------ */
@@ -14,6 +14,8 @@
14
14
  position: relative;
15
15
  overflow: hidden;
16
16
  white-space: nowrap;
17
+ border-top: 1px solid var(--back-border-x, #666666);
18
+ border-bottom: 1px solid var(--back-border-x, #666666);
17
19
  }
18
20
 
19
21
  #canvas-frame canvas {
@@ -354,12 +356,6 @@ input[type="color"] {
354
356
 
355
357
  /* スキン定義 ------------------------------------------------------------*/
356
358
 
357
- /* 背景 */
358
- #canvas-frame {
359
- border-top: 1px solid var(--back-border-x, #666666);
360
- border-bottom: 1px solid var(--back-border-x, #666666);
361
- }
362
-
363
359
  #divBack {
364
360
  background: var(--background, linear-gradient(#000000, #222222));
365
361
  }
@@ -470,6 +466,23 @@ input[type="color"] {
470
466
  color: var(--settings-fadeinBar-x, #ffffff);
471
467
  }
472
468
 
469
+ .settings_Difficulty:hover,
470
+ .settings_Speed:hover,
471
+ .settings_Motion:hover,
472
+ .settings_Reverse:hover,
473
+ .settings_Scroll:hover,
474
+ .settings_Shuffle:hover,
475
+ .settings_AutoPlay:hover,
476
+ .settings_Gauge:hover,
477
+ .settings_Adjustment:hover,
478
+ .settings_Fadein:hover,
479
+ .settings_Volume:hover,
480
+ .settings_Appearance:hover,
481
+ .settings_Opacity:hover,
482
+ .settings_HitPosition:hover {
483
+ border-bottom: solid 1px;
484
+ }
485
+
473
486
  /* 設定画面:ゲージ設定詳細 */
474
487
  .settings_lifeVal {
475
488
  color: var(--settings-lifeVal-x, #ff9966);
@@ -497,6 +510,18 @@ input[type="color"] {
497
510
  color: var(--keyconfig-colorType-x, #ffdd99);
498
511
  }
499
512
 
513
+ .keyconfig_ColorGr::first-letter {
514
+ color: var(--keyconfig-colorGr-x, var(--keyconfig-colorType-x, #ffdd99));
515
+ }
516
+
517
+ .keyconfig_ShuffleGr::first-letter {
518
+ color: var(--keyconfig-shuffleGr-x, var(--settings-shuffle-x, #99ff99));
519
+ }
520
+
521
+ .keyconfig_StepRtnGr::first-letter {
522
+ color: var(--keyconfig-stepRtnGr-x, var(--settings-adjustment-x, #99ffff));
523
+ }
524
+
500
525
  .keyconfig_Changekey {
501
526
  color: var(--keyconfig-changekey-x, #ffff00);
502
527
  }
@@ -709,7 +734,8 @@ input[type="color"] {
709
734
  }
710
735
 
711
736
  /* デフォルト */
712
- .button_Default {
737
+ .button_Default,
738
+ .button_Discord {
713
739
  color: var(--button-color-default-x, #ffffff);
714
740
  background: var(--button-bg-default, #111111);
715
741
  }
@@ -783,7 +809,7 @@ input[type="color"] {
783
809
  background: var(--button-bgHover-reset, #009900);
784
810
  }
785
811
 
786
- /* ツイート */
812
+ /* X Post */
787
813
  .button_Tweet {
788
814
  color: var(--button-color-sns-x, #ffffff);
789
815
  background: var(--button-bg-sns, #113333);
@@ -794,6 +820,12 @@ input[type="color"] {
794
820
  background: var(--button-bgHover-sns, #009999);
795
821
  }
796
822
 
823
+ /* Discord */
824
+ .button_Discord:hover {
825
+ color: var(--button-colorHover-default-x, #ffffff);
826
+ background: var(--button-bgHover-discord, var(--button-bgHover-default, #666699));
827
+ }
828
+
797
829
  /* ボタン:ON/OFF */
798
830
  .button_OFF {
799
831
  color: var(--button-color-off-x, #666666);
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 : 2024/05/11
7
+ * Revised : 2024/05/18
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 36.3.2`;
12
- const g_revisedDate = `2024/05/11`;
11
+ const g_version = `Ver 36.4.1`;
12
+ const g_revisedDate = `2024/05/18`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -20,15 +20,6 @@ let g_localVersion2 = ``;
20
20
  // シーンジャンプ:Scene
21
21
 
22
22
  /**
23
- * ▽ ソースコーディング
24
- * https://github.com/cwtickle/danoniplus/blob/develop/.github/CONTRIBUTING.md
25
- *
26
- * - 定数・変数名
27
- * -- グローバル変数: 変数の頭に`g_`をつける。基本はオブジェクトプロパティとして定義。
28
- * -- 関数の引数  : アンダースコア始まりのキャメル表記。
29
- * -- 定数     : `C_(カテゴリ)_(名前)`の形式。全て英大文字、数字、アンダースコアのみを使用。
30
- * ※この定義方法は今後使用しない方針。
31
- *
32
23
  * ▽ 画面の構成
33
24
  * [タイトル]-[設定]-[ディスプレイ]-[キーコンフィグ]-[譜面読込]-[メイン]-[リザルト]
34
25
  * ⇒ 各画面に Init がついたものが画面の基本構成(ルート)を表す。
@@ -5455,7 +5446,10 @@ const createOptionWindow = _sprite => {
5455
5446
  );
5456
5447
  g_settings.scoreDetails.forEach((sd, j) => {
5457
5448
  scoreDetail.appendChild(
5458
- makeDifLblCssButton(`lnk${sd}G`, getStgDetailName(sd), j, _ => changeScoreDetail(j), { w: g_limitObj.difCoverWidth, h: 20, btnStyle: (g_stateObj.scoreDetail === sd ? `Setting` : `Default`) })
5449
+ makeDifLblCssButton(`lnk${sd}G`, getStgDetailName(sd), j, _ => changeScoreDetail(j), {
5450
+ w: g_limitObj.difCoverWidth, h: 20, title: g_msgObj[`s_${sd}`],
5451
+ btnStyle: (g_stateObj.scoreDetail === sd ? `Setting` : `Default`),
5452
+ })
5459
5453
  );
5460
5454
  createScText(document.getElementById(`lnk${sd}G`), `${sd}G`, { targetLabel: `lnk${sd}G`, x: -5 });
5461
5455
  });
@@ -5560,6 +5554,12 @@ const createOptionWindow = _sprite => {
5560
5554
  title: g_msgObj.excessive, cxtFunc: evt => setExcessive(evt.target),
5561
5555
  }), g_cssObj.button_Default, g_cssObj[`button_Rev${g_stateObj.excessive}`])
5562
5556
  );
5557
+ } else if (g_headerObj.excessiveJdgUse) {
5558
+ spriteList.gauge.appendChild(
5559
+ createDivCss2Label(`lnkExcessive`, `${g_lblNameObj.Excessive}:${C_FLG_ON}`,
5560
+ Object.assign(g_lblPosObj.btnExcessive, { x: 0, w: 100, border: C_DIS_NONE }), g_cssObj[`button_Disabled${C_FLG_ON}`]
5561
+ )
5562
+ );
5563
5563
  }
5564
5564
 
5565
5565
  // ---------------------------------------------------
@@ -6070,9 +6070,10 @@ const makeSettingLblCssButton = (_id, _name, _heightPos, _func, { x, y, w, h, si
6070
6070
  * @param {number} _heightPos 上からの配置順
6071
6071
  * @param {function} _func
6072
6072
  */
6073
- const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = g_limitObj.difSelectorWidth, h = g_limitObj.setLblHeight, btnStyle = `Default` } = {}) =>
6073
+ const makeDifLblCssButton = (_id, _name, _heightPos, _func,
6074
+ { x = 0, w = g_limitObj.difSelectorWidth, h = g_limitObj.setLblHeight, btnStyle = `Default` } = {}) =>
6074
6075
  createCss2Button(_id, _name, _func, {
6075
- x, y: h * _heightPos, w, h, siz: g_limitObj.difSelectorSiz, borderStyle: `solid`,
6076
+ x, y: h * _heightPos, w, h, siz: g_limitObj.difSelectorSiz, borderStyle: `solid`, title: g_msgObj[_id] ?? ``,
6076
6077
  }, g_cssObj[`button_${btnStyle}`], g_cssObj.button_ON);
6077
6078
 
6078
6079
  /**
@@ -6675,9 +6676,9 @@ const keyConfigInit = (_kcType = g_kcType) => {
6675
6676
  }
6676
6677
 
6677
6678
  // カラー/シャッフルグループ切替ボタン(カラー/シャッフルパターンが複数ある場合のみ)
6678
- makeGroupButton(`color`, { cssName: g_cssObj.keyconfig_ColorType });
6679
- makeGroupButton(`shuffle`, { baseX: g_btnX(11 / 12) - 10, cssName: g_cssObj.settings_Shuffle });
6680
- makeGroupButton(`stepRtn`, { baseY: 37, cssName: g_cssObj.settings_Adjustment });
6679
+ makeGroupButton(`color`, { cssName: g_cssObj.keyconfig_ColorGr });
6680
+ makeGroupButton(`shuffle`, { baseX: g_btnX(11 / 12) - 10, cssName: g_cssObj.keyconfig_ShuffleGr });
6681
+ makeGroupButton(`stepRtn`, { baseY: 37, cssName: g_cssObj.keyconfig_StepRtnGr });
6681
6682
 
6682
6683
  /**
6683
6684
  * カーソル位置の設定
@@ -11307,7 +11308,7 @@ const resultInit = _ => {
11307
11308
 
11308
11309
  }
11309
11310
 
11310
- // Twitter用リザルト
11311
+ // X (Twitter)用リザルト
11311
11312
  // スコアを上塗りする可能性があるため、カスタムイベント後に配置
11312
11313
  const hashTag = (hasVal(g_headerObj.hashTag) ? ` ${g_headerObj.hashTag}` : ``);
11313
11314
  let tweetDifData = `${getKeyName(g_headerObj.keyLabels[g_stateObj.scoreId])}${transKeyName}${getStgDetailName('k-')}${g_headerObj.difLabels[g_stateObj.scoreId]}${assistFlg}`;
@@ -11341,7 +11342,7 @@ const resultInit = _ => {
11341
11342
  tweetResultTmp = tweetResultTmp.split(`[${key}]`).join(g_resultObj[g_presetObj.resultVals[key]]));
11342
11343
  }
11343
11344
  const resultText = `${unEscapeHtml(tweetResultTmp)}`;
11344
- const tweetResult = `https://twitter.com/intent/tweet?text=${encodeURIComponent(resultText)}`;
11345
+ const tweetResult = `${g_linkObj.x}?text=${encodeURIComponent(resultText)}`;
11345
11346
 
11346
11347
  /**
11347
11348
  * リザルト画像をCanvasで作成しクリップボードへコピー
@@ -11474,15 +11475,15 @@ const resultInit = _ => {
11474
11475
  */
11475
11476
  const makeLinkButton = (_div = divRoot, _param = ``) => {
11476
11477
  multiAppend(_div,
11477
- // リザルトデータをTwitterへ転送
11478
+ // リザルトデータをX (Twitter)へ転送
11478
11479
  createCss2Button(`btnTweet${_param}`, g_lblNameObj.b_tweet, _ => true, Object.assign(g_lblPosObj.btnRsTweet, {
11479
11480
  resetFunc: _ => openLink(tweetResult),
11480
11481
  }), g_cssObj.button_Tweet),
11481
11482
 
11482
- // Gitterへのリンク
11483
+ // Discordへのリンク
11483
11484
  createCss2Button(`btnGitter${_param}`, g_lblNameObj.b_gitter, _ => true, Object.assign(g_lblPosObj.btnRsGitter, {
11484
- resetFunc: _ => openLink(`https://app.gitter.im/#/room/#danonicw_freeboard:gitter.im`),
11485
- }), g_cssObj.button_Default),
11485
+ resetFunc: _ => openLink(g_linkObj.discord),
11486
+ }), g_cssObj.button_Discord),
11486
11487
  );
11487
11488
  }
11488
11489
 
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2024/05/11 (v36.3.2)
8
+ * Revised : 2024/05/18 (v36.4.1)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -200,9 +200,9 @@ const g_lblPosObj = {};
200
200
  const updateWindowSiz = _ => {
201
201
  Object.assign(g_windowObj, {
202
202
  optionSprite: { x: (g_sWidth - 450) / 2, y: 65, w: 450, h: 325 },
203
- difList: { x: 165, y: 60, w: 280, h: 261 + g_sHeight - 500, overflow: `auto` },
204
- difCover: { x: 25, y: 60, w: 140, h: 261 + g_sHeight - 500, opacity: 0.95 },
205
- difFilter: { x: 0, y: 61, w: 140, h: 200 + g_sHeight - 500, overflow: `auto` },
203
+ difList: { x: 165, y: 60, w: 280, h: 265 + g_sHeight - 500, overflow: `auto` },
204
+ difCover: { x: 20, y: 60, w: 145, h: 265 + g_sHeight - 500, opacity: 0.95 },
205
+ difFilter: { x: 0, y: 61, w: 140, h: 204 + g_sHeight - 500, overflow: `auto` },
206
206
  displaySprite: { x: 25, y: 30, w: (g_sWidth - 450) / 2, h: g_limitObj.setLblHeight * 5 },
207
207
  scoreDetail: { x: 20, y: 85, w: (g_sWidth - 500) / 2 + 420, h: 240, visibility: `hidden` },
208
208
  detailObj: { w: (g_sWidth - 500) / 2 + 420, h: 230, visibility: `hidden` },
@@ -1741,8 +1741,8 @@ const g_shortcutObj = {
1741
1741
  ControlLeft_KeyC: { id: `` },
1742
1742
  ControlRight_KeyC: { id: `` },
1743
1743
  KeyC: { id: `btnCopy`, reset: true },
1744
- KeyT: { id: `btnTweet`, reset: true },
1745
- KeyG: { id: `btnGitter`, reset: true },
1744
+ KeyX: { id: `btnTweet`, reset: true }, // x
1745
+ KeyD: { id: `btnGitter`, reset: true }, // Discord
1746
1746
  KeyP: { id: `btnCopyImage` },
1747
1747
  Backspace: { id: `btnRetry` },
1748
1748
  },
@@ -1799,6 +1799,9 @@ const g_cssObj = {
1799
1799
  keyconfig_warning: `keyconfig_warning`,
1800
1800
  keyconfig_ConfigType: `keyconfig_ConfigType`,
1801
1801
  keyconfig_ColorType: `keyconfig_ColorType`,
1802
+ keyconfig_ColorGr: `keyconfig_ColorGr`,
1803
+ keyconfig_ShuffleGr: `keyconfig_ShuffleGr`,
1804
+ keyconfig_StepRtnGr: `keyconfig_StepRtnGr`,
1802
1805
  keyconfig_Changekey: `keyconfig_Changekey`,
1803
1806
  keyconfig_Defaultkey: `keyconfig_Defaultkey`,
1804
1807
 
@@ -1865,6 +1868,7 @@ const g_cssObj = {
1865
1868
  button_Next: `button_Next`,
1866
1869
  button_Reset: `button_Reset`,
1867
1870
  button_Tweet: `button_Tweet`,
1871
+ button_Discord: `button_Discord`,
1868
1872
 
1869
1873
  button_OFF: `button_OFF`,
1870
1874
  button_ON: `button_ON`,
@@ -2861,7 +2865,7 @@ const g_lang_msgInfoObj = {
2861
2865
  E_0012: `The song title information is not set. (E-0012)<br>
2862
2866
  |musicTitle=Song title,Artist name,Artist's site URL|`,
2863
2867
  E_0021: `Music information is not set or the format is incorrect.(E-0021)<br>
2864
- |difData=Keys' name,chart's name,Specified speed|`,
2868
+ |difData=Key type's name,chart's name,Specified speed|`,
2865
2869
  E_0022: `The format of the external music file is incorrect.(E-0022)<br>
2866
2870
  function externalDosInit() { g_externalDos = \`(Chart data)\`; }`,
2867
2871
  E_0023: `Music information is not set. (E-0023)<br>
@@ -2937,8 +2941,8 @@ const g_lblNameObj = {
2937
2941
  b_reset: `Reset Key`,
2938
2942
  b_settings: `To Settings`,
2939
2943
  b_copy: `CopyResult`,
2940
- b_tweet: `Tweet`,
2941
- b_gitter: `Gitter`,
2944
+ b_tweet: `Post X`,
2945
+ b_gitter: `Discord`,
2942
2946
  b_retry: `Retry`,
2943
2947
  b_close: `Close`,
2944
2948
  b_cReset: `Reset`,
@@ -3113,6 +3117,14 @@ const g_lblNameObj = {
3113
3117
  rd_Special: `SP`,
3114
3118
  };
3115
3119
 
3120
+ /**
3121
+ * リンク先管理
3122
+ */
3123
+ const g_linkObj = {
3124
+ x: `https://x.com/intent/tweet`,
3125
+ discord: `https://discord.gg/5Hxu4wDEZR`,
3126
+ };
3127
+
3116
3128
  /**
3117
3129
  * ラベル表示定義(言語別)
3118
3130
  */
@@ -3253,6 +3265,14 @@ const g_lang_msgObj = {
3253
3265
  d_arroweffect: `矢印・フリーズアローモーションの有効化設定`,
3254
3266
  d_special: `作品固有の特殊演出の有効化設定`,
3255
3267
 
3268
+ lnkSpeedG: `譜面の進行別の速度変化状況を表示`,
3269
+ lnkDensityG: `譜面の密度状況を表示`,
3270
+ lnkToolDifG: `譜面の難易度、矢印・フリーズアローの分布状況を表示`,
3271
+ lnkHighScoreG: `譜面のハイスコアを表示`,
3272
+ lnkDifInfo: `譜面の難易度、矢印・フリーズアローの分布状況をクリップボードへコピー`,
3273
+ lnkResetHighScore: `譜面のハイスコア情報を消去`,
3274
+ lnkHighScore: `譜面のハイスコアをクリップボードへコピー`,
3275
+
3256
3276
  appearance: `流れる矢印の見え方を制御します。`,
3257
3277
  opacity: `判定キャラクタ、コンボ数、Fast/Slow、Hidden+/Sudden+の\n境界線表示の透明度を設定します。`,
3258
3278
  hitPosition: `判定位置にズレを感じる場合、\n数値を変えることで判定の中央位置を1px単位(プラス:手前, マイナス:奥側)で調整することができます。\n早押し・遅押し傾向にある場合に使用します。`,
@@ -3315,6 +3335,14 @@ const g_lang_msgObj = {
3315
3335
  d_arroweffect: `Enable sequences' animations`,
3316
3336
  d_special: `Enable setting of special effects to the work`,
3317
3337
 
3338
+ lnkSpeedG: `Displays the speed change status by progression of the chart.`,
3339
+ lnkDensityG: `Displays the density status of the chart.`,
3340
+ lnkToolDifG: `Displays the difficulty level of the chart and the distribution of arrows and freeze arrows.`,
3341
+ lnkHighScoreG: `Displays the high score of the chart.`,
3342
+ lnkDifInfo: `Copy the difficulty of the chart and the distribution of arrows and freeze arrows to the clipboard.`,
3343
+ lnkResetHighScore: `Erase the high score information in the chart.`,
3344
+ lnkHighScore: `Copies the high score of the chart to the clipboard.`,
3345
+
3318
3346
  appearance: `Controls how the flowing sequences look.`,
3319
3347
  opacity: `Set the transparency of some objects such as judgment, combo counts, fast and slow`,
3320
3348
  hitPosition: `If you feel a discrepancy in the judgment position, \nyou can adjust the center position of the judgment in 1px increments \n (plus: in front, minus: at the back) by changing the numerical value. \nUse this function when there is a tendency to push too fast or too slow.`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "36.3.2",
3
+ "version": "36.4.1",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,7 +5,7 @@
5
5
  スキンcssファイル (default)
6
6
 
7
7
  Created : 2019/11/04
8
- Revised : 2023/07/29 (v33.0.0)
8
+ Revised : 2024/05/18 (v36.4.1)
9
9
 
10
10
  https://github.com/cwtickle/danoniplus
11
11
  ------------------------------------------ */
@@ -67,6 +67,9 @@
67
67
  --keyconfig-colorType-x: #ffdd99;
68
68
  --keyconfig-changekey-x: #ffff00;
69
69
  --keyconfig-defaultkey-x: #99ccff;
70
+ /* --keyconfig-colorGr-x: var(--settings-colorType-x); */
71
+ /* --keyconfig-shuffleGr-x: var(--settings-shuffle-x); */
72
+ /* --keyconfig-stepRtnGr-x: var(--settings-adjustment-x); */
70
73
 
71
74
  /* 判定 */
72
75
  --common-ii: #66ffff;
@@ -183,6 +186,7 @@
183
186
  --button-color-sns-x: #ffffff;
184
187
  --button-bgHover-sns: #009999;
185
188
  --button-colorHover-sns-x: #ffffff;
189
+ --button-bgHover-discord: #666699;
186
190
 
187
191
  /* ON/OFFボタン */
188
192
  --button-color-off-x: #666666;
@@ -5,7 +5,7 @@
5
5
  スキンcssファイル (light)
6
6
 
7
7
  Created : 2019/11/04
8
- Revised : 2023/07/29 (v33.0.0)
8
+ Revised : 2024/05/18 (v36.4.1)
9
9
 
10
10
  https://github.com/cwtickle/danoniplus
11
11
  ------------------------------------------ */
@@ -67,6 +67,9 @@
67
67
  --keyconfig-colorType-x: #773300;
68
68
  --keyconfig-changekey-x: #999900;
69
69
  --keyconfig-defaultkey-x: #000099;
70
+ /* --keyconfig-colorGr-x: var(--settings-colorType-x); */
71
+ /* --keyconfig-shuffleGr-x: var(--settings-shuffle-x); */
72
+ /* --keyconfig-stepRtnGr-x: var(--settings-adjustment-x); */
70
73
 
71
74
  /* 判定 */
72
75
  --common-ii: #009999;
@@ -183,6 +186,7 @@
183
186
  --button-color-sns-x: #000000;
184
187
  --button-bgHover-sns: #66ffff;
185
188
  --button-colorHover-sns-x: #000000;
189
+ --button-bgHover-discord: #bbbbbb;
186
190
 
187
191
  /* ON/OFFボタン */
188
192
  --button-color-off-x: #cccccc;
@@ -5,7 +5,7 @@
5
5
  スキンcssファイル (skyblue)
6
6
 
7
7
  Created : 2019/11/04
8
- Revised : 2023/07/29 (v33.0.0)
8
+ Revised : 2024/05/18 (v36.4.1)
9
9
 
10
10
  https://github.com/cwtickle/danoniplus
11
11
  ------------------------------------------ */
@@ -67,6 +67,9 @@
67
67
  --keyconfig-colorType-x: #773300;
68
68
  --keyconfig-changekey-x: #999900;
69
69
  --keyconfig-defaultkey-x: #000099;
70
+ /* --keyconfig-colorGr-x: var(--settings-colorType-x); */
71
+ /* --keyconfig-shuffleGr-x: var(--settings-shuffle-x); */
72
+ /* --keyconfig-stepRtnGr-x: var(--settings-adjustment-x); */
70
73
 
71
74
  /* 判定 */
72
75
  --common-ii: #009999;
@@ -183,6 +186,7 @@
183
186
  --button-color-sns-x: #000000;
184
187
  --button-bgHover-sns: #66ffff;
185
188
  --button-colorHover-sns-x: #000000;
189
+ --button-bgHover-discord: #bbbbbb;
186
190
 
187
191
  /* ON/OFFボタン */
188
192
  --button-color-off-x: #cccccc;
Binary file
@@ -1,694 +0,0 @@
1
- 'use strict';
2
- /**
3
- * Dancing☆Onigiri (CW Edition)
4
- * 旧バージョン定義変数・関数
5
- *
6
- * Source by tickle
7
- * Created : 2019/11/19
8
- * Revised : 2022/03/18 (v27.0.0)
9
- *
10
- * https://github.com/cwtickle/danoniplus
11
- */
12
-
13
- // ユーザインタフェース
14
- // カスタム側で変更できるようにletで定義している(v10以降のカラーコード類は互換関数以外の利用用途なし)
15
- let C_CLR_DEFAULT = `#333333`;
16
- let C_CLR_DEFAULTA = `#111133`;
17
- let C_CLR_DEFAULTB = `#333311`;
18
- let C_CLR_DEFAULTC = `#331111`;
19
- let C_CLR_DEFAULTD = `#113311`;
20
- let C_CLR_DEFAULTE = `#113333`;
21
- let C_CLR_DEFHOVER = `#666666`;
22
- let C_CLR_BACK = `#000099`;
23
- let C_CLR_NEXT = `#990000`;
24
- let C_CLR_SETTING = `#999900`;
25
- let C_CLR_RESET = `#009900`;
26
- let C_CLR_TWEET = `#009999`;
27
-
28
- let C_CLR_TEXT = `#ffffff`;
29
- let C_CLR_TITLE = `#cccccc`;
30
- let C_CLR_LOADING_BAR = `#eeeeee`;
31
- let C_CLR_LNK = `#111111`;
32
-
33
- // 判定キャラクタの色 (v10以降はcssで定義)
34
- const C_CLR_II = `#66ffff`;
35
- const C_CLR_SHAKIN = `#99ff99`;
36
- const C_CLR_MATARI = `#ff9966`;
37
- const C_CLR_UWAN = `#ff9999`;
38
- const C_CLR_SHOBON = `#ccccff`;
39
- const C_CLR_KITA = `#ffff99`;
40
- const C_CLR_SFSF = ``;
41
- const C_CLR_IKNAI = `#99ff66`;
42
-
43
- // ライフゲージの色 (v10以降はcssで定義)
44
- let C_CLR_MAXLIFE = `#444400`;
45
- let C_CLR_CLEARLIFE = `#004444`;
46
- let C_CLR_DEFAULTLIFE = `#444444`;
47
- let C_CLR_BACKLIFE = `#222222`;
48
-
49
- /**
50
- * 空スプライト(ムービークリップ相当)の作成
51
- * - 作成済みの場合はすでに作成済のスプライトを返却する
52
- * - ここで作成したスプライトは clearWindow() により削除される
53
- * @deprecated v21以降非推奨
54
- * @param {string} _parentObjName 親スプライト名
55
- * @param {string} _newObjName 作成する子スプライト名
56
- * @param {number} _x 作成するスプライトのx座標(親スプライト基準)
57
- * @param {number} _y 作成するスプライトのy座標(親スプライト基準)
58
- * @param {number} _width 幅
59
- * @param {number} _height 高さ
60
- */
61
- function createSprite(_parentObjName, _newObjName, _x, _y, _width, _height, _options = {}) {
62
- let newsprite;
63
- if (document.getElementById(_newObjName) === null) {
64
- newsprite = createDiv(_newObjName, _x, _y, _width, _height);
65
- document.getElementById(_parentObjName).appendChild(newsprite);
66
- } else {
67
- newsprite = document.getElementById(_newObjName);
68
- }
69
- if (_options.description !== undefined) {
70
- newsprite.title = _options.description;
71
- }
72
- return newsprite;
73
- }
74
-
75
- /**
76
- * ラベル文字作成(レイヤー直書き。htmlタグは使用できない)
77
- * @deprecated v10以降非推奨
78
- * @param {string} _ctx ラベルを作成する場所のコンテキスト名
79
- * @param {string} _text 表示するテキスト
80
- * @param {number} _x 作成先のx座標
81
- * @param {number} _y 作成先のy座標
82
- * @param {number} _fontsize フォントサイズ
83
- * @param {number} _fontname フォント名
84
- * @param {string} _color 色 (カラーコード:#ffffff 形式 or グラデーション)
85
- * @param {string} _align テキストの表示位置 (left, center, right)
86
- */
87
- function createLabel(_ctx, _text, _x, _y, _fontsize, _fontname, _color, _align) {
88
- const fontFamilys = _fontname.split(`,`);
89
- let fontView = ``;
90
- for (let j = 0; j < fontFamilys.length; j++) {
91
- fontView += `"${fontFamilys[j]}",`;
92
- }
93
- fontView += `sans-serif`;
94
-
95
- _ctx.font = `${_fontsize}px ${fontView}`;
96
- _ctx.textAlign = _align;
97
- _ctx.fillStyle = _color;
98
- _ctx.fillText(_text, _x, _y);
99
- }
100
-
101
- /**
102
- * 子div要素のラベル文字作成 (v9互換用)
103
- * - ここで指定するテキストはhtmlタグが使える
104
- * @deprecated v10以降非推奨
105
- * @param {string} _id
106
- * @param {number} _x
107
- * @param {number} _y
108
- * @param {number} _width
109
- * @param {number} _height
110
- * @param {number} _fontsize
111
- * @param {string} _color
112
- * @param {string} _text
113
- */
114
- function createDivLabel(_id, _x, _y, _width, _height, _fontsize, _color, _text) {
115
- const div = createDiv(_id, _x, _y, _width, _height);
116
- const style = div.style;
117
- style.fontSize = `${_fontsize}px`;
118
- style.color = _color;
119
- style.fontFamily = getBasicFont();
120
- style.textAlign = C_ALIGN_CENTER;
121
- div.innerHTML = _text;
122
-
123
- return div;
124
- }
125
-
126
-
127
- /**
128
- * 子div要素のラベル文字作成 (CSS版, v16互換)
129
- * @deprecated v17以降非推奨
130
- * @param {string} _id
131
- * @param {number} _x
132
- * @param {number} _y
133
- * @param {number} _width
134
- * @param {number} _height
135
- * @param {number} _fontsize
136
- * @param {string} _text
137
- * @param {string} _class
138
- */
139
- function createDivCssLabel(_id, _x, _y, _width, _height, _fontsize, _text, _class = g_cssObj.title_base) {
140
- const div = createDiv(_id, _x, _y, _width, _height);
141
- div.classList.add(_class);
142
-
143
- const style = div.style;
144
- style.fontSize = `${_fontsize}px`;
145
- style.fontFamily = getBasicFont();
146
- style.textAlign = C_ALIGN_CENTER;
147
- div.innerHTML = _text;
148
-
149
- return div;
150
- }
151
-
152
- /**
153
- * 矢印オブジェクトの作成(色付きマスク版)- v10以降は未使用
154
- * @deprecated v10以降非推奨
155
- * @param {string} _id
156
- * @param {string} _color
157
- * @param {number} _x
158
- * @param {number} _y
159
- * @param {number} _size
160
- * @param {number, string} _rotate
161
- */
162
- function createArrowEffect(_id, _color, _x, _y, _size, _rotate) {
163
-
164
- const div = createDiv(_id, _x, _y, _size, _size);
165
-
166
- // 矢印・おにぎり判定
167
- let charaStyle;
168
- if (isNaN(Number(_rotate))) {
169
- charaStyle = `${_rotate}`;
170
- } else {
171
- charaStyle = `arrow`;
172
- div.style.transform = `rotate(${_rotate}deg)`;
173
- }
174
- div.align = C_ALIGN_CENTER;
175
-
176
- if (_color !== ``) {
177
- div.style.backgroundColor = _color;
178
- }
179
-
180
- div.style.maskImage = `url("${g_imgObj[charaStyle]}")`;
181
- div.style.maskSize = `contain`;
182
- div.style.webkitMaskImage = `url("${g_imgObj[charaStyle]}")`;
183
- div.style.webkitMaskSize = `contain`;
184
- div.setAttribute(`color`, _color);
185
-
186
- return div;
187
- }
188
-
189
- /**
190
- * 色付きオブジェクトの作成 (v16互換)
191
- * @deprecated v17以降非推奨
192
- * @param {string} _id
193
- * @param {string} _color
194
- * @param {number} _x
195
- * @param {number} _y
196
- * @param {number} _width
197
- * @param {number} _height
198
- * @param {string} _rotate オブジェクト名/回転角度 (default : ``)
199
- * @param {string} _styleName オブジェクト種類 (default : ``)
200
- */
201
- function createColorObject(_id, _color, _x, _y, _width, _height,
202
- _rotate = ``, _styleName = ``) {
203
-
204
- const div = createDiv(_id, _x, _y, _width, _height);
205
-
206
- // 矢印・オブジェクト判定
207
- let charaStyle;
208
- if (isNaN(Number(_rotate)) || _rotate === ``) {
209
- charaStyle = `${_rotate}${_styleName}`;
210
- } else {
211
- charaStyle = `arrow${_styleName}`;
212
- div.style.transform = `rotate(${_rotate}deg)`;
213
- }
214
-
215
- if (_color !== ``) {
216
- div.style.background = _color;
217
- }
218
- div.style.maskImage = `url("${g_imgObj[charaStyle]}")`;
219
- div.style.maskSize = `contain`;
220
- div.style.webkitMaskImage = `url("${g_imgObj[charaStyle]}")`;
221
- div.style.webkitMaskSize = `contain`;
222
- div.setAttribute(`color`, _color);
223
- div.setAttribute(`type`, charaStyle);
224
-
225
- return div;
226
- }
227
-
228
- /**
229
- * ボタンの作成 (v9互換版)
230
- * - ボタンの位置、色といった基本設定をここで指定
231
- * - 実際のボタンは以下のように設定して使用すること(表示されなくなる)
232
- * - ボタンの表示テキスト及びフォントは固定
233
- *
234
- * - 使い方:
235
- * const btnBack = createButton({
236
- * // ボタンオブジェクト名
237
- * id: `btnBack`,
238
- * // ボタンに表示する名前
239
- * name: `Back`,
240
- * // 作成先のx座標 (appendChildする親に対する位置)
241
- * x: 0,
242
- * // 作成先のy座標 (appendChildする親に対する位置)
243
- * y: g_sHeight-100,
244
- * // 幅
245
- * width: g_sWidth/3,
246
- * // 高さ
247
- * height: C_BTN_HEIGHT,
248
- * // フォントサイズ
249
- * fontsize: C_LBL_BTNSIZE,
250
- * // 通常時の背景色 (カラーコード:#ffffff 形式)
251
- * normalColor: C_CLR_DEFAULT,
252
- * // オンマウス時の背景色 (カラーコード:#ffffff 形式)
253
- * hoverColor: C_CLR_BACK,
254
- * // 表示位置
255
- * align: C_ALIGN_CENTER
256
- * }, _ => {
257
- * // ボタン押下後の処理
258
- * clearWindow();
259
- * titleInit();
260
- * });
261
- * divRoot.appendChild(btnBack);
262
- *
263
- * @deprecated v10以降非推奨
264
- * @param {object} _obj ボタンオブジェクト
265
- * @param {function} _func ボタン押下後の処理(マウスハンドラ)
266
- */
267
- function createButton(_obj, _func) {
268
-
269
- // ボタン用の子要素divを作成
270
- const div = createDiv(_obj.id, _obj.x, _obj.y, _obj.width, _obj.height);
271
-
272
- // ボタンの装飾を定義
273
- const style = div.style;
274
- div.innerHTML = _obj.name;
275
- style.textAlign = _obj.align;
276
- style.verticalAlign = C_VALIGN_MIDDLE;
277
- style.color = C_CLR_TEXT;
278
- style.fontSize = `${_obj.fontsize}px`;
279
- style.fontFamily = getBasicFont();
280
- style.backgroundColor = _obj.normalColor;
281
- style.transition = `background-color 0.25s linear`;
282
- if (setVal(_obj.animationName, ``, C_TYP_STRING) !== ``) {
283
- style.animationName = _obj.animationName;
284
- style.animationDuration = `1s`;
285
- }
286
- style.display = `flex`;
287
- style.flexDirection = `column`;
288
- style.justifyContent = `center`;
289
-
290
- // オンマウス・タップ時の挙動 (背景色変更、カーソル変化)
291
- div.onmouseover = _ => {
292
- style.backgroundColor = _obj.hoverColor;
293
- style.cursor = `pointer`;
294
- };
295
- const lsnrkeyTS = g_handler.addListener(div, `touchstart`, _ => {
296
- style.backgroundColor = _obj.hoverColor;
297
- style.cursor = `pointer`;
298
- });
299
-
300
- // 通常時の挙動 (背景色変更、カーソル変化)
301
- div.onmouseout = _ => {
302
- style.backgroundColor = _obj.normalColor;
303
- style.cursor = `default`;
304
- };
305
- const lsnrkeyTE = g_handler.addListener(div, `touchend`, _ => {
306
- style.backgroundColor = _obj.normalColor;
307
- style.cursor = `default`;
308
- });
309
-
310
- // ボタンを押したときの動作
311
- const lsnrkey = g_handler.addListener(div, `click`, _ => _func());
312
-
313
- // イベントリスナー用のキーをセット
314
- div.setAttribute(`lsnrkey`, lsnrkey);
315
- div.setAttribute(`lsnrkeyTS`, lsnrkeyTS);
316
- div.setAttribute(`lsnrkeyTE`, lsnrkeyTE);
317
-
318
- return div;
319
- }
320
-
321
- /**
322
- * ボタンの作成 (CSS版, v16互換)
323
- * - ボタンの位置、色といった基本設定をここで指定
324
- * - 実際のボタンは以下のように設定して使用すること(表示されなくなる)
325
- * - ボタンの表示テキスト及びフォントは固定
326
- *
327
- * - 使い方:
328
- * const btnBack = createButton({
329
- * // ボタンオブジェクト名
330
- * id: `btnBack`,
331
- * // ボタンに表示する名前
332
- * name: `Back`,
333
- * // 作成先のx座標 (appendChildする親に対する位置)
334
- * x: 0,
335
- * // 作成先のy座標 (appendChildする親に対する位置)
336
- * y: g_sHeight-100,
337
- * // 幅
338
- * width: g_sWidth/3,
339
- * // 高さ
340
- * height: C_BTN_HEIGHT,
341
- * // フォントサイズ
342
- * fontsize: C_LBL_BTNSIZE,
343
- * // 表示位置
344
- * align: C_ALIGN_CENTER,
345
- * // CSSクラス名
346
- * class: `class_name`,
347
- * }, _ => {
348
- * // ボタン押下後の処理
349
- * clearWindow();
350
- * titleInit();
351
- * });
352
- * divRoot.appendChild(btnBack);
353
- *
354
- * @deprecated v17以降非推奨
355
- * @param {object} _obj ボタンオブジェクト
356
- * @param {function} _func ボタン押下後の処理(マウスハンドラ)
357
- */
358
- function createCssButton(_obj, _func) {
359
-
360
- // ボタン用の子要素divを作成
361
- const div = createDiv(_obj.id, _obj.x, _obj.y, _obj.width, _obj.height);
362
- div.classList.add(`button_common`, _obj.class);
363
-
364
- // ボタンの装飾を定義
365
- const style = div.style;
366
- div.innerHTML = _obj.name;
367
- style.textAlign = _obj.align;
368
- style.verticalAlign = C_VALIGN_MIDDLE;
369
- style.fontSize = `${_obj.fontsize}px`;
370
- style.fontFamily = getBasicFont();
371
- if (hasVal(_obj.animationName)) {
372
- style.animationName = _obj.animationName;
373
- style.animationDuration = `1s`;
374
- }
375
- div.ontouchstart = ``;
376
-
377
- // ボタンを押したときの動作
378
- const lsnrkey = g_handler.addListener(div, `click`, _ => _func());
379
-
380
- // イベントリスナー用のキーをセット
381
- div.setAttribute(`lsnrkey`, lsnrkey);
382
-
383
- return div;
384
- }
385
-
386
- /**
387
- * 設定・オプション表示用ボタン - v9互換用
388
- * @deprecated v10以降非推奨
389
- * @param {string} _id
390
- * @param {string} _name 初期設定文字
391
- * @param {number} _heightPos 上からの配置順
392
- * @param {function} _func
393
- */
394
- function makeSettingLblButton(_id, _name, _heightPos, _func) {
395
- const settingLblButton = createButton({
396
- id: _id,
397
- name: _name,
398
- x: C_LEN_SETLBL_LEFT,
399
- y: C_LEN_SETLBL_HEIGHT * _heightPos,
400
- width: C_LEN_SETLBL_WIDTH,
401
- height: C_LEN_SETLBL_HEIGHT,
402
- fontsize: C_SIZ_SETLBL,
403
- normalColor: C_CLR_LNK,
404
- hoverColor: C_CLR_DEFHOVER,
405
- align: C_ALIGN_CENTER
406
- }, _func);
407
-
408
- return settingLblButton;
409
- }
410
-
411
- /**
412
- * 譜面変更セレクター用ボタン - v9互換用
413
- * @deprecated v10以降非推奨
414
- * @param {string} _id
415
- * @param {string} _name 初期設定文字
416
- * @param {number} _heightPos 上からの配置順
417
- * @param {function} _func
418
- */
419
- function makeDifLblButton(_id, _name, _heightPos, _func) {
420
- const difLblButton = createButton({
421
- id: _id,
422
- name: _name,
423
- x: 0,
424
- y: C_LEN_SETLBL_HEIGHT * _heightPos,
425
- width: C_LEN_SETLBL_WIDTH,
426
- height: C_LEN_SETLBL_HEIGHT,
427
- fontsize: C_SIZ_DIFSELECTOR,
428
- normalColor: C_CLR_LNK,
429
- hoverColor: C_CLR_DEFHOVER,
430
- align: C_ALIGN_CENTER
431
- }, _func);
432
- difLblButton.style.borderStyle = `solid`;
433
- difLblButton.style.borderColor = `#000000 #cccccc`;
434
-
435
- return difLblButton;
436
- }
437
-
438
- /**
439
- * 設定・オプション用の設定変更ミニボタン - v9互換用
440
- * @deprecated v10以降非推奨
441
- * @param {string} _id
442
- * @param {string} _directionFlg 表示用ボタンのどちら側に置くかを設定。(R, RR:右、L, LL:左)
443
- * @param {number} _heightPos 上からの配置順
444
- * @param {function} _func
445
- */
446
- function makeMiniButton(_id, _directionFlg, _heightPos, _func) {
447
- const miniButton = createButton({
448
- id: _id + _directionFlg,
449
- name: eval(`C_LBL_SETMINI${_directionFlg}`),
450
- x: eval(`C_LEN_SETMINI${_directionFlg}_LEFT`),
451
- y: C_LEN_SETLBL_HEIGHT * _heightPos,
452
- width: C_LEN_SETMINI_WIDTH,
453
- height: C_LEN_SETLBL_HEIGHT,
454
- fontsize: C_SIZ_SETLBL,
455
- normalColor: C_CLR_DEFAULT,
456
- hoverColor: C_CLR_SETTING,
457
- align: C_ALIGN_CENTER
458
- }, _func);
459
-
460
- return miniButton;
461
- }
462
-
463
- /**
464
- * 結果表示作成(曲名、オプション)- v9互換用
465
- * @deprecated v10以降非推奨
466
- * @param {string} _id
467
- * @param {number} _x
468
- * @param {string} _color
469
- * @param {number} _heightPos
470
- * @param {string, number} _text
471
- * @param {string} _align
472
- */
473
- function makeResultPlayData(_id, _x, _color, _heightPos, _text, _align) {
474
- const symbol = createDivLabel(_id, _x, 18 * _heightPos,
475
- 400, 18, 14, _color, _text);
476
- symbol.style.textAlign = _align;
477
-
478
- return symbol;
479
- }
480
-
481
- /**
482
- * 結果表示作成(キャラクタ)- v9互換用
483
- * @deprecated v10以降非推奨
484
- * @param {string} _id
485
- * @param {number} _x
486
- * @param {string} _color
487
- * @param {number} _heightPos
488
- * @param {string, number} _text
489
- * @param {string} _align
490
- */
491
- function makeResultSymbol(_id, _x, _color, _heightPos, _text, _align) {
492
- const symbol = createDivLabel(_id, _x, 18 * _heightPos,
493
- 150, 18, 16, _color, _text);
494
- symbol.style.textAlign = _align;
495
-
496
- return symbol;
497
- }
498
-
499
- /**
500
- * 配列の型及び最小配列長のチェック
501
- * - チェックのみで変換は行わないため、変換が必要な場合は別途処理を組むこと。
502
- * - 型は最初の要素のみチェックを行う。
503
- *
504
- * @deprecated v20以降非推奨
505
- * @param {array} _checkArray
506
- * @param {string} _type
507
- * @param {number} _minLength 最小配列長
508
- */
509
- function checkArrayVal(_checkArray, _type, _minLength) {
510
-
511
- // 値がundefined相当の場合は無条件でデフォルト値を返却
512
- if (_checkArray === undefined || _checkArray === ``) {
513
- return false;
514
- }
515
-
516
- // 配列かどうかをチェック
517
- if (Object.prototype.toString.call(_checkArray) !== `[object Array]`) {
518
- return false;
519
- }
520
-
521
- // 最小配列長が不正の場合は強制的に1を設定
522
- if (isNaN(parseFloat(_minLength))) {
523
- _minLength = 1;
524
- }
525
-
526
- let isNaNflg;
527
- if (_type === C_TYP_FLOAT) {
528
- // 数値型(小数可)の場合
529
- isNaNflg = isNaN(parseFloat(_checkArray[0]));
530
- if (isNaNflg) {
531
- return false;
532
- }
533
- } else if (_type === C_TYP_NUMBER) {
534
- // 数値型(整数のみ)の場合
535
- isNaNflg = isNaN(parseInt(_checkArray[0]));
536
- if (isNaNflg) {
537
- return false;
538
- }
539
- }
540
-
541
- // 配列長のチェック
542
- return (_checkArray.length >= _minLength ? true : false);
543
- }
544
-
545
- /**
546
- * 半角換算の文字数を計算
547
- * @deprecated v20以降非推奨
548
- * @param {string} _str
549
- */
550
- function getStrLength(_str) {
551
- let result = 0;
552
- for (let i = 0; i < _str.length; i++) {
553
- const chr = _str.charCodeAt(i);
554
- if ((chr >= 0x00 && chr < 0x81) ||
555
- (chr === 0xf8f0) ||
556
- (chr >= 0xff61 && chr < 0xffa0) ||
557
- (chr >= 0xf8f1 && chr < 0xf8f4)) {
558
- //半角文字の場合は1を加算
559
- result += 1;
560
- } else {
561
- //それ以外の文字の場合は2を加算
562
- result += 2;
563
- }
564
- }
565
- //結果を返す
566
- return result;
567
- }
568
-
569
- /**
570
- * 左パディング
571
- * @deprecated v20以降非推奨
572
- * @param {string} _str 元の文字列
573
- * @param {number} _length パディング後の長さ
574
- * @param {string} _chr パディング文字列
575
- */
576
- function paddingLeft(_str, _length, _chr) {
577
- let paddingStr = _str;
578
- while (paddingStr.length < _length) {
579
- paddingStr = _chr + paddingStr;
580
- }
581
- return paddingStr;
582
- }
583
-
584
- /**
585
- * 子div要素のラベル文字作成
586
- * - createDivLabelに加えて、独自フォントが指定できる形式。
587
- *
588
- * @deprecated v20以降非推奨
589
- * @param {string} _id
590
- * @param {number} _x
591
- * @param {number} _y
592
- * @param {number} _width
593
- * @param {number} _height
594
- * @param {number} _fontsize
595
- * @param {string} _color
596
- * @param {string} _text
597
- * @param {string} _font
598
- */
599
- function createDivCustomLabel(_id, _x, _y, _width, _height, _fontsize, _color, _text, _font) {
600
- const div = createDiv(_id, _x, _y, _width, _height);
601
- const style = div.style;
602
- style.fontSize = `${_fontsize}px`;
603
- if (_color !== ``) {
604
- style.color = _color;
605
- }
606
- style.fontFamily = _font;
607
- style.textAlign = C_ALIGN_CENTER;
608
- div.innerHTML = _text;
609
-
610
- return div;
611
- }
612
-
613
- /**
614
- * 外部jsファイルの読込 (callback)
615
- * 読込可否を g_loadObj[ファイル名] で管理 (true: 読込成功, false: 読込失敗)
616
- * @deprecated v27以降非推奨
617
- * @param {string} _url
618
- * @param {function} _callback
619
- * @param {boolean} _requiredFlg (default : true / 読込必須)
620
- * @param {string} _charset (default : UTF-8)
621
- */
622
- function loadScript(_url, _callback, _requiredFlg = true, _charset = `UTF-8`) {
623
- const baseUrl = _url.split(`?`)[0];
624
- g_loadObj[baseUrl] = false;
625
- const script = document.createElement(`script`);
626
- script.type = `text/javascript`;
627
- script.src = _url;
628
- script.charset = _charset;
629
- script.onload = _ => {
630
- g_loadObj[baseUrl] = true;
631
- _callback();
632
- };
633
- script.onerror = _ => {
634
- if (_requiredFlg) {
635
- makeWarningWindow(g_msgInfoObj.E_0041.split(`{0}`).join(_url.split(`?`)[0]));
636
- } else {
637
- _callback();
638
- }
639
- };
640
- document.querySelector(`head`).appendChild(script);
641
- }
642
-
643
- /**
644
- * CSSファイルの読み込み (callback)
645
- * デフォルトは danoni_skin_default.css を読み込む
646
- * @deprecated v27以降非推奨
647
- * @param {url} _href
648
- * @param {function} _func
649
- */
650
- function importCssFile(_href, _func) {
651
- const baseUrl = _href.split(`?`)[0];
652
- g_loadObj[baseUrl] = false;
653
- const link = document.createElement(`link`);
654
- link.rel = `stylesheet`;
655
- link.href = _href;
656
- link.onload = _ => {
657
- g_loadObj[baseUrl] = true;
658
- _func();
659
- };
660
- link.onerror = _ => {
661
- makeWarningWindow(g_msgInfoObj.E_0041.split(`{0}`).join(baseUrl), { resetFlg: `title` });
662
- _func();
663
- };
664
- document.head.appendChild(link);
665
- }
666
-
667
- /**
668
- * js, cssファイルの連続読込 (callback)
669
- * @deprecated v27以降非推奨
670
- * @param {number} _j
671
- * @param {array} _fileData
672
- * @param {string} _loadType
673
- * @param {function} _afterFunc
674
- */
675
- function loadMultipleFiles(_j, _fileData, _loadType, _afterFunc = _ => true) {
676
- if (_j < _fileData.length) {
677
- const filePath = `${_fileData[_j][1]}${_fileData[_j][0]}?${new Date().getTime()}`;
678
- if (_fileData[_j][0].endsWith(`.css`)) {
679
- _loadType = `css`;
680
- }
681
-
682
- // jsファイル、cssファイルにより呼び出す関数を切替
683
- if (_loadType === `js`) {
684
- loadScript(filePath, _ =>
685
- loadMultipleFiles(_j + 1, _fileData, _loadType, _afterFunc), false);
686
- } else if (_loadType === `css`) {
687
- const cssPath = filePath.split(`.js`).join(`.css`);
688
- importCssFile(cssPath, _ =>
689
- loadMultipleFiles(_j + 1, _fileData, _loadType, _afterFunc));
690
- }
691
- } else {
692
- _afterFunc();
693
- }
694
- }