danoniplus 19.5.14
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/LICENSE +21 -0
- package/README.md +92 -0
- package/css/danoni_main.css +300 -0
- package/danoni/dTemplate.html +71 -0
- package/danoni/danoni0.html +138 -0
- package/danoni/danoni0_remote.html +138 -0
- package/danoni/danoni1.html +157 -0
- package/danoni/danoni2.html +51 -0
- package/danoni/danoni3.html +109 -0
- package/danoni/danoni4_skin.html +74 -0
- package/danoni/danoniA.txt +22 -0
- package/danoni/danoniA2.txt +11 -0
- package/danoni/dos/0001_ThrustUp.txt +73 -0
- package/danoni/dos/0002_Combative.txt +31 -0
- package/img/aaShadow.png +0 -0
- package/img/aaShadow.svg +1 -0
- package/img/arrow.png +0 -0
- package/img/arrow.svg +1 -0
- package/img/arrowShadow.png +0 -0
- package/img/arrowShadow.svg +1 -0
- package/img/borderline.png +0 -0
- package/img/borderline.svg +1 -0
- package/img/c.png +0 -0
- package/img/c.svg +1 -0
- package/img/classic/arrow.png +0 -0
- package/img/classic/arrowShadow.png +0 -0
- package/img/classic-thin/arrow.png +0 -0
- package/img/classic-thin/arrowShadow.png +0 -0
- package/img/cursor.png +0 -0
- package/img/cursor.svg +1 -0
- package/img/frzbar.png +0 -0
- package/img/frzbar.svg +1 -0
- package/img/giko.png +0 -0
- package/img/giko.svg +1 -0
- package/img/iyo.png +0 -0
- package/img/iyo.svg +1 -0
- package/img/monar.png +0 -0
- package/img/monar.svg +1 -0
- package/img/morara.png +0 -0
- package/img/morara.svg +1 -0
- package/img/onigiri.png +0 -0
- package/img/onigiri.svg +1 -0
- package/js/danoni_main.js +9554 -0
- package/js/lib/danoni_constants.js +2092 -0
- package/js/lib/danoni_legacy_function.js +435 -0
- package/js/lib/danoni_localbinary.js +29 -0
- package/js/sample/danoni_custom-003.js +125 -0
- package/js/template/danoni_custom.js +165 -0
- package/js/template/danoni_custom2.js +163 -0
- package/js/template/danoni_setting.js +188 -0
- package/jsconfig.json +9 -0
- package/music/nosound.mp3 +0 -0
- package/package.json +23 -0
- package/skin/danoni_skin_background.css +8 -0
- package/skin/danoni_skin_background.js +75 -0
- package/skin/danoni_skin_blank.css +1 -0
- package/skin/danoni_skin_blank.js +75 -0
- package/skin/danoni_skin_default.css +343 -0
- package/skin/danoni_skin_default.js +63 -0
- package/skin/danoni_skin_light.css +343 -0
- package/skin/danoni_skin_light.js +62 -0
- package/skin/danoni_skin_skyblue.css +343 -0
- package/skin/danoni_skin_skyblue.js +62 -0
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* Dancing☆Onigiri (CW Edition)
|
|
4
|
+
* 旧バージョン定義変数・関数
|
|
5
|
+
*
|
|
6
|
+
* Source by tickle
|
|
7
|
+
* Created : 2019/11/19
|
|
8
|
+
* Revised : 2021/01/17 (v19.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
|
+
* 子div要素のラベル文字作成 (v9互換用)
|
|
51
|
+
* - ここで指定するテキストはhtmlタグが使える
|
|
52
|
+
* @param {string} _id
|
|
53
|
+
* @param {number} _x
|
|
54
|
+
* @param {number} _y
|
|
55
|
+
* @param {number} _width
|
|
56
|
+
* @param {number} _height
|
|
57
|
+
* @param {number} _fontsize
|
|
58
|
+
* @param {string} _color
|
|
59
|
+
* @param {string} _text
|
|
60
|
+
*/
|
|
61
|
+
function createDivLabel(_id, _x, _y, _width, _height, _fontsize, _color, _text) {
|
|
62
|
+
const div = createDiv(_id, _x, _y, _width, _height);
|
|
63
|
+
const style = div.style;
|
|
64
|
+
style.fontSize = `${_fontsize}px`;
|
|
65
|
+
style.color = _color;
|
|
66
|
+
style.fontFamily = getBasicFont();
|
|
67
|
+
style.textAlign = C_ALIGN_CENTER;
|
|
68
|
+
div.innerHTML = _text;
|
|
69
|
+
|
|
70
|
+
return div;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 子div要素のラベル文字作成 (CSS版, v16互換)
|
|
76
|
+
* @param {string} _id
|
|
77
|
+
* @param {number} _x
|
|
78
|
+
* @param {number} _y
|
|
79
|
+
* @param {number} _width
|
|
80
|
+
* @param {number} _height
|
|
81
|
+
* @param {number} _fontsize
|
|
82
|
+
* @param {string} _text
|
|
83
|
+
* @param {string} _class
|
|
84
|
+
*/
|
|
85
|
+
function createDivCssLabel(_id, _x, _y, _width, _height, _fontsize, _text, _class = g_cssObj.title_base) {
|
|
86
|
+
const div = createDiv(_id, _x, _y, _width, _height);
|
|
87
|
+
div.classList.add(_class);
|
|
88
|
+
|
|
89
|
+
const style = div.style;
|
|
90
|
+
style.fontSize = `${_fontsize}px`;
|
|
91
|
+
style.fontFamily = getBasicFont();
|
|
92
|
+
style.textAlign = C_ALIGN_CENTER;
|
|
93
|
+
div.innerHTML = _text;
|
|
94
|
+
|
|
95
|
+
return div;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 矢印オブジェクトの作成(色付きマスク版)- v10以降は未使用
|
|
100
|
+
* @param {string} _id
|
|
101
|
+
* @param {string} _color
|
|
102
|
+
* @param {number} _x
|
|
103
|
+
* @param {number} _y
|
|
104
|
+
* @param {number} _size
|
|
105
|
+
* @param {number, string} _rotate
|
|
106
|
+
*/
|
|
107
|
+
function createArrowEffect(_id, _color, _x, _y, _size, _rotate) {
|
|
108
|
+
|
|
109
|
+
const div = createDiv(_id, _x, _y, _size, _size);
|
|
110
|
+
|
|
111
|
+
// 矢印・おにぎり判定
|
|
112
|
+
let charaStyle;
|
|
113
|
+
if (isNaN(Number(_rotate))) {
|
|
114
|
+
charaStyle = `${_rotate}`;
|
|
115
|
+
} else {
|
|
116
|
+
charaStyle = `arrow`;
|
|
117
|
+
div.style.transform = `rotate(${_rotate}deg)`;
|
|
118
|
+
}
|
|
119
|
+
div.align = C_ALIGN_CENTER;
|
|
120
|
+
|
|
121
|
+
if (_color !== ``) {
|
|
122
|
+
div.style.backgroundColor = _color;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
div.style.maskImage = `url("${g_imgObj[charaStyle]}")`;
|
|
126
|
+
div.style.maskSize = `contain`;
|
|
127
|
+
div.style.webkitMaskImage = `url("${g_imgObj[charaStyle]}")`;
|
|
128
|
+
div.style.webkitMaskSize = `contain`;
|
|
129
|
+
div.setAttribute(`color`, _color);
|
|
130
|
+
|
|
131
|
+
return div;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 色付きオブジェクトの作成 (v16互換)
|
|
136
|
+
* @param {string} _id
|
|
137
|
+
* @param {string} _color
|
|
138
|
+
* @param {number} _x
|
|
139
|
+
* @param {number} _y
|
|
140
|
+
* @param {number} _width
|
|
141
|
+
* @param {number} _height
|
|
142
|
+
* @param {string} _rotate オブジェクト名/回転角度 (default : ``)
|
|
143
|
+
* @param {string} _styleName オブジェクト種類 (default : ``)
|
|
144
|
+
*/
|
|
145
|
+
function createColorObject(_id, _color, _x, _y, _width, _height,
|
|
146
|
+
_rotate = ``, _styleName = ``) {
|
|
147
|
+
|
|
148
|
+
const div = createDiv(_id, _x, _y, _width, _height);
|
|
149
|
+
|
|
150
|
+
// 矢印・オブジェクト判定
|
|
151
|
+
let charaStyle;
|
|
152
|
+
if (isNaN(Number(_rotate)) || _rotate === ``) {
|
|
153
|
+
charaStyle = `${_rotate}${_styleName}`;
|
|
154
|
+
} else {
|
|
155
|
+
charaStyle = `arrow${_styleName}`;
|
|
156
|
+
div.style.transform = `rotate(${_rotate}deg)`;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
if (_color !== ``) {
|
|
160
|
+
div.style.background = _color;
|
|
161
|
+
}
|
|
162
|
+
div.style.maskImage = `url("${g_imgObj[charaStyle]}")`;
|
|
163
|
+
div.style.maskSize = `contain`;
|
|
164
|
+
div.style.webkitMaskImage = `url("${g_imgObj[charaStyle]}")`;
|
|
165
|
+
div.style.webkitMaskSize = `contain`;
|
|
166
|
+
div.setAttribute(`color`, _color);
|
|
167
|
+
div.setAttribute(`type`, charaStyle);
|
|
168
|
+
|
|
169
|
+
return div;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* ボタンの作成 (v9互換版)
|
|
174
|
+
* - ボタンの位置、色といった基本設定をここで指定
|
|
175
|
+
* - 実際のボタンは以下のように設定して使用すること(表示されなくなる)
|
|
176
|
+
* - ボタンの表示テキスト及びフォントは固定
|
|
177
|
+
*
|
|
178
|
+
* - 使い方:
|
|
179
|
+
* const btnBack = createButton({
|
|
180
|
+
* // ボタンオブジェクト名
|
|
181
|
+
* id: `btnBack`,
|
|
182
|
+
* // ボタンに表示する名前
|
|
183
|
+
* name: `Back`,
|
|
184
|
+
* // 作成先のx座標 (appendChildする親に対する位置)
|
|
185
|
+
* x: 0,
|
|
186
|
+
* // 作成先のy座標 (appendChildする親に対する位置)
|
|
187
|
+
* y: g_sHeight-100,
|
|
188
|
+
* // 幅
|
|
189
|
+
* width: g_sWidth/3,
|
|
190
|
+
* // 高さ
|
|
191
|
+
* height: C_BTN_HEIGHT,
|
|
192
|
+
* // フォントサイズ
|
|
193
|
+
* fontsize: C_LBL_BTNSIZE,
|
|
194
|
+
* // 通常時の背景色 (カラーコード:#ffffff 形式)
|
|
195
|
+
* normalColor: C_CLR_DEFAULT,
|
|
196
|
+
* // オンマウス時の背景色 (カラーコード:#ffffff 形式)
|
|
197
|
+
* hoverColor: C_CLR_BACK,
|
|
198
|
+
* // 表示位置
|
|
199
|
+
* align: C_ALIGN_CENTER
|
|
200
|
+
* }, _ => {
|
|
201
|
+
* // ボタン押下後の処理
|
|
202
|
+
* clearWindow();
|
|
203
|
+
* titleInit();
|
|
204
|
+
* });
|
|
205
|
+
* divRoot.appendChild(btnBack);
|
|
206
|
+
*
|
|
207
|
+
* @param {object} _obj ボタンオブジェクト
|
|
208
|
+
* @param {function} _func ボタン押下後の処理(マウスハンドラ)
|
|
209
|
+
*/
|
|
210
|
+
function createButton(_obj, _func) {
|
|
211
|
+
|
|
212
|
+
// ボタン用の子要素divを作成
|
|
213
|
+
const div = createDiv(_obj.id, _obj.x, _obj.y, _obj.width, _obj.height);
|
|
214
|
+
|
|
215
|
+
// ボタンの装飾を定義
|
|
216
|
+
const style = div.style;
|
|
217
|
+
div.innerHTML = _obj.name;
|
|
218
|
+
style.textAlign = _obj.align;
|
|
219
|
+
style.verticalAlign = C_VALIGN_MIDDLE;
|
|
220
|
+
style.color = C_CLR_TEXT;
|
|
221
|
+
style.fontSize = `${_obj.fontsize}px`;
|
|
222
|
+
style.fontFamily = getBasicFont();
|
|
223
|
+
style.backgroundColor = _obj.normalColor;
|
|
224
|
+
style.transition = `background-color 0.25s linear`;
|
|
225
|
+
if (setVal(_obj.animationName, ``, C_TYP_STRING) !== ``) {
|
|
226
|
+
style.animationName = _obj.animationName;
|
|
227
|
+
style.animationDuration = `1s`;
|
|
228
|
+
}
|
|
229
|
+
style.display = `flex`;
|
|
230
|
+
style.flexDirection = `column`;
|
|
231
|
+
style.justifyContent = `center`;
|
|
232
|
+
|
|
233
|
+
// オンマウス・タップ時の挙動 (背景色変更、カーソル変化)
|
|
234
|
+
div.onmouseover = _ => {
|
|
235
|
+
style.backgroundColor = _obj.hoverColor;
|
|
236
|
+
style.cursor = `pointer`;
|
|
237
|
+
}
|
|
238
|
+
const lsnrkeyTS = g_handler.addListener(div, `touchstart`, _ => {
|
|
239
|
+
style.backgroundColor = _obj.hoverColor;
|
|
240
|
+
style.cursor = `pointer`;
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
// 通常時の挙動 (背景色変更、カーソル変化)
|
|
244
|
+
div.onmouseout = _ => {
|
|
245
|
+
style.backgroundColor = _obj.normalColor;
|
|
246
|
+
style.cursor = `default`;
|
|
247
|
+
}
|
|
248
|
+
const lsnrkeyTE = g_handler.addListener(div, `touchend`, _ => {
|
|
249
|
+
style.backgroundColor = _obj.normalColor;
|
|
250
|
+
style.cursor = `default`;
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// ボタンを押したときの動作
|
|
254
|
+
const lsnrkey = g_handler.addListener(div, `click`, _ => _func());
|
|
255
|
+
|
|
256
|
+
// イベントリスナー用のキーをセット
|
|
257
|
+
div.setAttribute(`lsnrkey`, lsnrkey);
|
|
258
|
+
div.setAttribute(`lsnrkeyTS`, lsnrkeyTS);
|
|
259
|
+
div.setAttribute(`lsnrkeyTE`, lsnrkeyTE);
|
|
260
|
+
|
|
261
|
+
return div;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* ボタンの作成 (CSS版, v16互換)
|
|
266
|
+
* - ボタンの位置、色といった基本設定をここで指定
|
|
267
|
+
* - 実際のボタンは以下のように設定して使用すること(表示されなくなる)
|
|
268
|
+
* - ボタンの表示テキスト及びフォントは固定
|
|
269
|
+
*
|
|
270
|
+
* - 使い方:
|
|
271
|
+
* const btnBack = createButton({
|
|
272
|
+
* // ボタンオブジェクト名
|
|
273
|
+
* id: `btnBack`,
|
|
274
|
+
* // ボタンに表示する名前
|
|
275
|
+
* name: `Back`,
|
|
276
|
+
* // 作成先のx座標 (appendChildする親に対する位置)
|
|
277
|
+
* x: 0,
|
|
278
|
+
* // 作成先のy座標 (appendChildする親に対する位置)
|
|
279
|
+
* y: g_sHeight-100,
|
|
280
|
+
* // 幅
|
|
281
|
+
* width: g_sWidth/3,
|
|
282
|
+
* // 高さ
|
|
283
|
+
* height: C_BTN_HEIGHT,
|
|
284
|
+
* // フォントサイズ
|
|
285
|
+
* fontsize: C_LBL_BTNSIZE,
|
|
286
|
+
* // 表示位置
|
|
287
|
+
* align: C_ALIGN_CENTER,
|
|
288
|
+
* // CSSクラス名
|
|
289
|
+
* class: `class_name`,
|
|
290
|
+
* }, _ => {
|
|
291
|
+
* // ボタン押下後の処理
|
|
292
|
+
* clearWindow();
|
|
293
|
+
* titleInit();
|
|
294
|
+
* });
|
|
295
|
+
* divRoot.appendChild(btnBack);
|
|
296
|
+
*
|
|
297
|
+
* @param {object} _obj ボタンオブジェクト
|
|
298
|
+
* @param {function} _func ボタン押下後の処理(マウスハンドラ)
|
|
299
|
+
*/
|
|
300
|
+
function createCssButton(_obj, _func) {
|
|
301
|
+
|
|
302
|
+
// ボタン用の子要素divを作成
|
|
303
|
+
const div = createDiv(_obj.id, _obj.x, _obj.y, _obj.width, _obj.height);
|
|
304
|
+
div.classList.add(`button_common`, _obj.class);
|
|
305
|
+
|
|
306
|
+
// ボタンの装飾を定義
|
|
307
|
+
const style = div.style;
|
|
308
|
+
div.innerHTML = _obj.name;
|
|
309
|
+
style.textAlign = _obj.align;
|
|
310
|
+
style.verticalAlign = C_VALIGN_MIDDLE;
|
|
311
|
+
style.fontSize = `${_obj.fontsize}px`;
|
|
312
|
+
style.fontFamily = getBasicFont();
|
|
313
|
+
if (hasVal(_obj.animationName)) {
|
|
314
|
+
style.animationName = _obj.animationName;
|
|
315
|
+
style.animationDuration = `1s`;
|
|
316
|
+
}
|
|
317
|
+
div.ontouchstart = ``;
|
|
318
|
+
|
|
319
|
+
// ボタンを押したときの動作
|
|
320
|
+
const lsnrkey = g_handler.addListener(div, `click`, _ => _func());
|
|
321
|
+
|
|
322
|
+
// イベントリスナー用のキーをセット
|
|
323
|
+
div.setAttribute(`lsnrkey`, lsnrkey);
|
|
324
|
+
|
|
325
|
+
return div;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* 設定・オプション表示用ボタン - v9互換用
|
|
330
|
+
* @param {string} _id
|
|
331
|
+
* @param {string} _name 初期設定文字
|
|
332
|
+
* @param {number} _heightPos 上からの配置順
|
|
333
|
+
* @param {function} _func
|
|
334
|
+
*/
|
|
335
|
+
function makeSettingLblButton(_id, _name, _heightPos, _func) {
|
|
336
|
+
const settingLblButton = createButton({
|
|
337
|
+
id: _id,
|
|
338
|
+
name: _name,
|
|
339
|
+
x: C_LEN_SETLBL_LEFT,
|
|
340
|
+
y: C_LEN_SETLBL_HEIGHT * _heightPos,
|
|
341
|
+
width: C_LEN_SETLBL_WIDTH,
|
|
342
|
+
height: C_LEN_SETLBL_HEIGHT,
|
|
343
|
+
fontsize: C_SIZ_SETLBL,
|
|
344
|
+
normalColor: C_CLR_LNK,
|
|
345
|
+
hoverColor: C_CLR_DEFHOVER,
|
|
346
|
+
align: C_ALIGN_CENTER
|
|
347
|
+
}, _func);
|
|
348
|
+
|
|
349
|
+
return settingLblButton;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* 譜面変更セレクター用ボタン - v9互換用
|
|
354
|
+
* @param {string} _id
|
|
355
|
+
* @param {string} _name 初期設定文字
|
|
356
|
+
* @param {number} _heightPos 上からの配置順
|
|
357
|
+
* @param {function} _func
|
|
358
|
+
*/
|
|
359
|
+
function makeDifLblButton(_id, _name, _heightPos, _func) {
|
|
360
|
+
const difLblButton = createButton({
|
|
361
|
+
id: _id,
|
|
362
|
+
name: _name,
|
|
363
|
+
x: 0,
|
|
364
|
+
y: C_LEN_SETLBL_HEIGHT * _heightPos,
|
|
365
|
+
width: C_LEN_SETLBL_WIDTH,
|
|
366
|
+
height: C_LEN_SETLBL_HEIGHT,
|
|
367
|
+
fontsize: C_SIZ_DIFSELECTOR,
|
|
368
|
+
normalColor: C_CLR_LNK,
|
|
369
|
+
hoverColor: C_CLR_DEFHOVER,
|
|
370
|
+
align: C_ALIGN_CENTER
|
|
371
|
+
}, _func);
|
|
372
|
+
difLblButton.style.borderStyle = `solid`;
|
|
373
|
+
difLblButton.style.borderColor = `#000000 #cccccc`;
|
|
374
|
+
|
|
375
|
+
return difLblButton;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* 設定・オプション用の設定変更ミニボタン - v9互換用
|
|
380
|
+
* @param {string} _id
|
|
381
|
+
* @param {string} _directionFlg 表示用ボタンのどちら側に置くかを設定。(R, RR:右、L, LL:左)
|
|
382
|
+
* @param {number} _heightPos 上からの配置順
|
|
383
|
+
* @param {function} _func
|
|
384
|
+
*/
|
|
385
|
+
function makeMiniButton(_id, _directionFlg, _heightPos, _func) {
|
|
386
|
+
const miniButton = createButton({
|
|
387
|
+
id: _id + _directionFlg,
|
|
388
|
+
name: eval(`C_LBL_SETMINI${_directionFlg}`),
|
|
389
|
+
x: eval(`C_LEN_SETMINI${_directionFlg}_LEFT`),
|
|
390
|
+
y: C_LEN_SETLBL_HEIGHT * _heightPos,
|
|
391
|
+
width: C_LEN_SETMINI_WIDTH,
|
|
392
|
+
height: C_LEN_SETLBL_HEIGHT,
|
|
393
|
+
fontsize: C_SIZ_SETLBL,
|
|
394
|
+
normalColor: C_CLR_DEFAULT,
|
|
395
|
+
hoverColor: C_CLR_SETTING,
|
|
396
|
+
align: C_ALIGN_CENTER
|
|
397
|
+
}, _func);
|
|
398
|
+
|
|
399
|
+
return miniButton;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* 結果表示作成(曲名、オプション)- v9互換用
|
|
404
|
+
* @param {string} _id
|
|
405
|
+
* @param {number} _x
|
|
406
|
+
* @param {string} _color
|
|
407
|
+
* @param {number} _heightPos
|
|
408
|
+
* @param {string, number} _text
|
|
409
|
+
* @param {string} _align
|
|
410
|
+
*/
|
|
411
|
+
function makeResultPlayData(_id, _x, _color, _heightPos, _text, _align) {
|
|
412
|
+
const symbol = createDivLabel(_id, _x, 18 * _heightPos,
|
|
413
|
+
400, 18, 14, _color, _text);
|
|
414
|
+
symbol.style.textAlign = _align;
|
|
415
|
+
|
|
416
|
+
return symbol;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* 結果表示作成(キャラクタ)- v9互換用
|
|
421
|
+
* @param {string} _id
|
|
422
|
+
* @param {number} _x
|
|
423
|
+
* @param {string} _color
|
|
424
|
+
* @param {number} _heightPos
|
|
425
|
+
* @param {string, number} _text
|
|
426
|
+
* @param {string} _align
|
|
427
|
+
*/
|
|
428
|
+
function makeResultSymbol(_id, _x, _color, _heightPos, _text, _align) {
|
|
429
|
+
const symbol = createDivLabel(_id, _x, 18 * _heightPos,
|
|
430
|
+
150, 18, 16, _color, _text);
|
|
431
|
+
symbol.style.textAlign = _align;
|
|
432
|
+
|
|
433
|
+
return symbol;
|
|
434
|
+
}
|
|
435
|
+
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* Dancing☆Onigiri (CW Edition)
|
|
4
|
+
* ローカル起動用バイナリファイル定義
|
|
5
|
+
*
|
|
6
|
+
* Source by tickle
|
|
7
|
+
* Created : 2020/03/22
|
|
8
|
+
* Revised : 2020/05/21 (v15.1.0)
|
|
9
|
+
*
|
|
10
|
+
* https://github.com/cwtickle/danoniplus
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
function loadBinary() {
|
|
14
|
+
if (location.href.match(`^file`)) {
|
|
15
|
+
C_IMG_ARROW = `data:image/svg+xml,${encodeURIComponent('<svg id="arrow" data-name="arrow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:20px;}</style></defs><polygon class="cls-1" points="288.91 42.76 32.94 249.83 288.91 456.9 249.87 314.02 466.8 314.02 466.8 187.71 249.87 187.71 288.91 42.76"/></svg>')}`
|
|
16
|
+
C_IMG_ARROWSD = `data:image/svg+xml,${encodeURIComponent('<svg id="arrowShadow" data-name="arrowShadow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{stroke:#000;stroke-miterlimit:10;stroke-width:30px;}</style></defs><polygon class="cls-1" points="288.91 42.76 32.94 249.83 288.91 456.9 249.87 314.02 466.8 314.02 466.8 187.71 249.87 187.71 288.91 42.76"/></svg>')}`;
|
|
17
|
+
C_IMG_ONIGIRI = `data:image/svg+xml,${encodeURIComponent('<svg id="onigiri" data-name="onigiri" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{fill:none;stroke-width:12px;}.cls-1,.cls-2{stroke:#000;stroke-miterlimit:10;}.cls-2{stroke-width:10px;}</style></defs><line class="cls-1" x1="160.22" y1="238.02" x2="124.03" y2="275.84"/><line class="cls-1" x1="354.94" y1="238.9" x2="391.19" y2="277"/><polyline class="cls-1" points="190.92 262 256.82 433 322.73 262"/><line class="cls-1" x1="205.47" y1="309" x2="308.18" y2="308"/><rect class="cls-2" x="192.63" y="42" width="128.39" height="150"/><line class="cls-1" x1="181.5" y1="42" x2="59.96" y2="195"/><line class="cls-1" x1="331.29" y1="42" x2="444.27" y2="183"/><path class="cls-1" d="M66,213c-81.9,97.55-79.69,176.84,7.71,277"/><path class="cls-1" d="M422,483.88c85.52-95,87.73-172.58,7.71-270.88"/></svg>')}`;
|
|
18
|
+
C_IMG_AASD = `data:image/svg+xml,${encodeURIComponent('<svg id="aaShadow" data-name="aaShadow" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{stroke:#000;stroke-miterlimit:10;}</style></defs><polygon class="cls-1" points="177.5 25.5 49.5 180.5 6.5 274.5 -0.5 347.5 13.5 416.5 82 500 410.85 499 479.85 418 500 332 480 250 438 162 333 25 177.5 25.5"/></svg>')}`;
|
|
19
|
+
C_IMG_GIKO = `data:image/svg+xml,${encodeURIComponent('<svg id="giko" data-name="giko" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:12px;}</style></defs><line class="cls-1" x1="118.5" y1="42" x2="62.41" y2="195"/><line class="cls-1" x1="388.1" y1="42.64" x2="445.06" y2="189.64"/><path class="cls-1" d="M68.45,213c-82.58,97.55-80.36,176.84,7.76,277"/><path class="cls-1" d="M427.46,483.88c86.24-95,88.46-172.58,7.77-270.88"/><path d="M262.56,262.91h80.73V416.82l10,.22-.95,54H342l-.79-39.36H249L248,471H237.76l-.95-54,8.85-.22c11.37-31.18,16.9-51.08,16.9-111.45Zm12.33,15.26v33.39c0,55.28-7.27,81.82-15.64,104.82H330.5V278.17Z"/><ellipse class="cls-1" cx="394.24" cy="248.5" rx="12.95" ry="15"/><ellipse class="cls-1" cx="209.12" cy="249" rx="12.95" ry="15"/><line class="cls-1" x1="388.6" y1="39.28" x2="332.51" y2="192.28"/><line class="cls-1" x1="116.25" y1="44.64" x2="173.2" y2="191.64"/><line class="cls-1" x1="49.46" y1="295" x2="152.16" y2="294"/><line class="cls-1" x1="38.24" y1="387" x2="138.35" y2="387"/><line class="cls-1" x1="97.79" y1="225" x2="53.78" y2="449"/><line class="cls-1" x1="144.39" y1="225" x2="102.11" y2="449"/></svg>')}`;
|
|
20
|
+
C_IMG_IYO = `data:image/svg+xml,${encodeURIComponent('<svg id="iyo" data-name="iyo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:12px;}</style></defs><line class="cls-1" x1="116.37" y1="42" x2="60.85" y2="195"/><line class="cls-1" x1="383.19" y1="42.64" x2="439.56" y2="189.64"/><path class="cls-1" d="M66.83,213C-14.9,310.55-12.7,389.84,74.52,490"/><path class="cls-1" d="M422.15,483.88c85.34-95,87.55-172.58,7.69-270.88"/><ellipse class="cls-1" cx="389.27" cy="248.5" rx="12.81" ry="15"/><ellipse class="cls-1" cx="206.05" cy="249" rx="12.81" ry="15"/><line class="cls-1" x1="383.69" y1="39.28" x2="328.17" y2="192.28"/><line class="cls-1" x1="114.13" y1="44.64" x2="170.51" y2="191.64"/><line class="cls-1" x1="48.04" y1="295" x2="149.68" y2="294"/><line class="cls-1" x1="36.93" y1="387" x2="136.01" y2="387"/><path d="M303.57,373.7c-.59,5.76-1,10.13-1,14.28.15,10.6,2.36,23,14.57,23,13.69,0,27.08-30.64,27.08-68,0-16.82-3.23-34.79-10.45-46.54l.15-.7h10.89c5.15,7.15,10.75,25.35,10.75,47,0,45.62-16.78,83.18-38.27,83.18-12.07,0-19.13-9-21.49-22.81H295C290.32,416.55,283.11,426,270.6,426c-13.1,0-25.9-15.21-25.9-48.39,0-38.48,14.72-71.43,24.43-81.8H281.2l-.15.7c-10.15,12-25,42.39-25,80.41,0,25.35,9.13,34.1,17.66,34.1,10.45,0,17.22-15,19.14-34.33l5.44-46.77H309Z"/></svg>')}`;
|
|
21
|
+
C_IMG_C = `data:image/svg+xml,${encodeURIComponent('<svg id="c" data-name="c" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:12px;}</style></defs><line class="cls-1" x1="115.62" y1="42" x2="59.84" y2="195"/><line class="cls-1" x1="383.69" y1="42.64" x2="440.33" y2="189.64"/><path class="cls-1" d="M65.85,213c-82.12,97.55-79.91,176.84,7.72,277"/><path class="cls-1" d="M422.84,483.88c85.75-95,88-172.58,7.72-270.88"/><ellipse class="cls-1" cx="389.8" cy="248.5" rx="12.87" ry="15"/><ellipse class="cls-1" cx="205.73" cy="249" rx="12.87" ry="15"/><line class="cls-1" x1="384.2" y1="39.28" x2="328.42" y2="192.28"/><line class="cls-1" x1="113.37" y1="44.64" x2="170.01" y2="191.64"/><line class="cls-1" x1="75.29" y1="277" x2="161.1" y2="365"/><line class="cls-1" x1="68.42" y1="364" x2="156.81" y2="278"/><line class="cls-1" x1="113.9" y1="379" x2="115.62" y2="264"/><line class="cls-1" x1="229.75" y1="326" x2="368.78" y2="326"/><line class="cls-1" x1="228.9" y1="316" x2="234.05" y2="327"/></svg>')}`;
|
|
22
|
+
C_IMG_MORARA = `data:image/svg+xml,${encodeURIComponent('<svg id="morara" data-name="morara" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:12px;}</style></defs><line class="cls-1" x1="117.96" y1="42" x2="61.63" y2="195"/><line class="cls-1" x1="388.66" y1="42.64" x2="445.86" y2="189.64"/><path class="cls-1" d="M67.7,213C-15.22,310.55-13,389.84,75.49,490"/><path class="cls-1" d="M428.19,483.88C514.78,388.84,517,311.3,436,213"/><ellipse cx="160.42" cy="333" rx="13" ry="15"/><line class="cls-1" x1="389.17" y1="39.28" x2="332.84" y2="192.28"/><line class="cls-1" x1="115.69" y1="44.64" x2="172.88" y2="191.64"/><polyline class="cls-1" points="219.35 261 286.07 432 352.8 261"/><line class="cls-1" x1="234.08" y1="308" x2="338.07" y2="307"/><ellipse cx="400.46" cy="333" rx="13" ry="15"/><line class="cls-1" x1="172.55" y1="192" x2="332.87" y2="192"/></svg>')}`;
|
|
23
|
+
C_IMG_MONAR = `data:image/svg+xml,${encodeURIComponent('<svg id="monar" data-name="monar" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><defs><style>.cls-1{fill:none;stroke:#000;stroke-miterlimit:10;stroke-width:12px;}</style></defs><line class="cls-1" x1="163.22" y1="238.02" x2="127.03" y2="275.84"/><line class="cls-1" x1="357.94" y1="238.9" x2="394.19" y2="277"/><polyline class="cls-1" points="193.92 262 259.82 433 325.73 262"/><line class="cls-1" x1="208.47" y1="309" x2="311.18" y2="308"/><path class="cls-1" d="M69,213c-81.9,97.55-79.69,176.84,7.71,277"/><path class="cls-1" d="M425,483.88c85.52-95,87.73-172.58,7.71-270.88"/><line class="cls-1" x1="121.16" y1="45" x2="65.53" y2="198"/><line class="cls-1" x1="388.54" y1="45.64" x2="445.03" y2="192.64"/><line class="cls-1" x1="389.04" y1="42.28" x2="333.4" y2="195.28"/><line class="cls-1" x1="118.92" y1="47.64" x2="175.41" y2="194.64"/><line class="cls-1" x1="175.09" y1="195" x2="333.43" y2="195"/></svg>')}`;
|
|
24
|
+
C_IMG_CURSOR = `data:image/svg+xml,${encodeURIComponent('<svg id="cursor" data-name="cursor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 100"><defs><style>.cls-1{fill:#f7931e;stroke:#999;stroke-miterlimit:10;}</style></defs><polygon class="cls-1" points="7.5 5.5 7.5 92.5 44.5 48.5 7.5 5.5"/></svg>')}`;
|
|
25
|
+
C_IMG_FRZBAR = `data:image/svg+xml,${encodeURIComponent('<svg id="frzbar" data-name="frzbar" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><rect width="500" height="500"/></svg>')}`;
|
|
26
|
+
C_IMG_LIFEBAR = C_IMG_FRZBAR;
|
|
27
|
+
C_IMG_LIFEBORDER = `data:image/svg+xml,${encodeURIComponent('<svg id="borderline" data-name="borderline" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 160"><path d="M400,160H80L0,80,80.8,0H400Z"/></svg>')}`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
/**
|
|
3
|
+
* Dancing☆Onigiri カスタム例 -003
|
|
4
|
+
*
|
|
5
|
+
* このファイルは、作品個別に設定できる項目となっています。
|
|
6
|
+
* 譜面データ側で下記のように作品別の外部jsファイルを指定することで、
|
|
7
|
+
* danoni_main.js の中身を変えることなく設定が可能です。
|
|
8
|
+
*
|
|
9
|
+
* 設定例:
|
|
10
|
+
* |customjs=danoni_custom-003.js|
|
|
11
|
+
*
|
|
12
|
+
* ・グローバル変数、div要素、関数は danoni_main.js のものがそのまま利用できます。
|
|
13
|
+
* ・danoni_main.jsの変数を直接書き換えると、動かなくなることがあります。
|
|
14
|
+
* こまめのバックアップをおススメします。
|
|
15
|
+
* ・ラベルなどのdiv要素を作る場合、「divRoot」の下にappendChild(div要素を追加)することで
|
|
16
|
+
* 画面遷移したときにきれいに消してくれます。
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* タイトル画面
|
|
22
|
+
*/
|
|
23
|
+
function customTitleInit() {
|
|
24
|
+
|
|
25
|
+
// 背景の矢印オブジェクトを表示
|
|
26
|
+
var lblC = createArrowEffect("lblC", "#ffffff", g_sWidth / 2 - 300, 0, 100, "onigiri");
|
|
27
|
+
lblC.style.opacity = 0.25;
|
|
28
|
+
divRoot.appendChild(lblC);
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
// Tweetボタン描画
|
|
32
|
+
var btnTweet = createButton({
|
|
33
|
+
id: "btnTweet",
|
|
34
|
+
name: "Info",
|
|
35
|
+
x: g_sWidth / 4 * 3,
|
|
36
|
+
y: 340,
|
|
37
|
+
width: g_sWidth / 4,
|
|
38
|
+
height: C_BTN_HEIGHT,
|
|
39
|
+
fontsize: C_LBL_BTNSIZE,
|
|
40
|
+
normalColor: C_CLR_DEFAULT,
|
|
41
|
+
hoverColor: C_CLR_TWEET,
|
|
42
|
+
align: C_ALIGN_CENTER
|
|
43
|
+
}, function () {
|
|
44
|
+
clearWindow();
|
|
45
|
+
customCommentInit();
|
|
46
|
+
});
|
|
47
|
+
divRoot.appendChild(btnTweet);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* カスタム画面(コメントとか)
|
|
52
|
+
*/
|
|
53
|
+
function customCommentInit() {
|
|
54
|
+
|
|
55
|
+
// タイトル文字描画
|
|
56
|
+
var lblTitle = getTitleDivLabel("lblTitle",
|
|
57
|
+
"<span style='color:#6666ff;font-size:40px;'>I</span>NFO", 0, 15);
|
|
58
|
+
divRoot.appendChild(lblTitle);
|
|
59
|
+
|
|
60
|
+
var comment = "これはカスタムページのテストです。<br>" +
|
|
61
|
+
"このように、作品別に特殊なページを作ることもできます。<br><br>" +
|
|
62
|
+
"下記のような戻るボタンがあると良いですね。(・∀・)";
|
|
63
|
+
|
|
64
|
+
var lblComment = createDivLabel("lblComment", g_sWidth / 2 - 200, 100, 400, 20, 14, "#cccccc",
|
|
65
|
+
comment);
|
|
66
|
+
lblComment.style.textAlign = C_ALIGN_LEFT;
|
|
67
|
+
divRoot.appendChild(lblComment);
|
|
68
|
+
|
|
69
|
+
var lblC = createArrowEffect("lblC", "#ffffff", g_sWidth / 2 + 200, 350, 100, "onigiri");
|
|
70
|
+
divRoot.appendChild(lblC);
|
|
71
|
+
|
|
72
|
+
// 戻るボタン描画
|
|
73
|
+
var btnBack = createButton({
|
|
74
|
+
id: "btnBack",
|
|
75
|
+
name: "Back",
|
|
76
|
+
x: 0,
|
|
77
|
+
y: g_sHeight - 100,
|
|
78
|
+
width: g_sWidth / 3,
|
|
79
|
+
height: C_BTN_HEIGHT,
|
|
80
|
+
fontsize: C_LBL_BTNSIZE,
|
|
81
|
+
normalColor: C_CLR_DEFAULT,
|
|
82
|
+
hoverColor: C_CLR_BACK,
|
|
83
|
+
align: C_ALIGN_CENTER
|
|
84
|
+
}, function () {
|
|
85
|
+
// タイトル画面へ戻る
|
|
86
|
+
clearWindow();
|
|
87
|
+
titleInit();
|
|
88
|
+
});
|
|
89
|
+
divRoot.appendChild(btnBack);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* オプション画面(初期表示)
|
|
94
|
+
*/
|
|
95
|
+
function customOptionInit() {
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* キーコンフィグ画面(初期表示)
|
|
101
|
+
*/
|
|
102
|
+
function customKeyConfigInit() {
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* メイン画面(初期表示)
|
|
108
|
+
*/
|
|
109
|
+
function customMainInit() {
|
|
110
|
+
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* メイン画面(フレーム毎表示)
|
|
115
|
+
*/
|
|
116
|
+
function customMainEnterFrame() {
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 結果画面(初期表示)
|
|
122
|
+
*/
|
|
123
|
+
function customResultInit() {
|
|
124
|
+
|
|
125
|
+
}
|