-
Notifications
You must be signed in to change notification settings - Fork 10
fnc c0004 createCss2Button
tickle edited this page Oct 16, 2020
·
18 revisions
- 座標、サイズ、フォントなどを設定したボタンを作成する。
- 従来の関数
createCssButton
で使用できる属性値に加え、CSSに対応した属性名に対応する設定が行える。
引数 | 型 | 必須 | 指定内容 |
---|---|---|---|
_id | string | * | ボタンのID名 |
_text | string | * | 表示する文字列 |
_func | function | * | ボタンを押したときの処理 |
_obj | object |
x : X座標(0), y : Y座標(g_sHeight - 100), w : 幅(g_sWidth / 3), h : 高さ(50),siz : フォントサイズ(28), align : 文字位置(中央寄せ), title : オンマウス時の説明表示文, cxtFunc : 右クリック時に実行する関数, (属性名) : (属性に対する設定) |
|
_classes | ...any | CSSクラス名 ※複数指定可 |
- この関数で作成したボタン(div要素)
- _obj内の要素については未指定の場合、デフォルトの値が適用される。
divRoot.appendChild(
createCss2Button(`btnKeyConfig`, `KeyConfig`, _ => {
// ボタン処理エリア
g_kcType = `Main`;
clearWindow();
keyConfigInit();
}, {
// CSSデザイン系変更エリア
x: g_sWidth / 3,
}, g_cssObj.button_Setting) // CSSクラス
);
spriteList.scroll.appendChild(
createCss2Button(`btnReverse`, `Reverse:${g_stateObj.reverse}`, evt => {
setReverse(evt.target);
}, {
x: 160, y: 0,
w: 90, h: 21, siz: C_SIZ_DIFSELECTOR,
borderStyle: `solid`,
cxtFunc: evt => setReverse(evt.target),
}, g_cssObj.button_Default, g_cssObj[`button_Rev${g_stateObj.reverse}`])
);
- Dancing Onigiri (CW Edition) WikiのテキストはCC BY-SA 4.0の下で利用可能です。
- Dancing Onigiri "CW Edition" Wiki text available under CC BY-SA 4.0.
- Wiki 更新履歴 / History
© 2018 ティックル & Contributors.
English | Japanese
- 譜面ヘッダー仕様 📝
- 譜面本体仕様 📝
- 譜面エフェクト仕様 (速度/ 色/ 背景) 📝
- グラデーション仕様 📝
- 共通設定ファイル仕様 📝
- スキンファイル仕様 📝
- 作品URLのクエリパラメーター仕様 📝
- 譜面データ中の特殊文字の取り扱い 📝
- キーの仕様について 📝
- KeyCtrl属性で使用するキーコード 📝
- 実行時エラー一覧 📝