AirNovel - ラジオボタン
をテンプレートにして作成
[
ホーム
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
*AirNovel - ラジオボタン [#x0cc202c]
- どちらか一方しか押せないボタン。
適当に作ってみました。上手く動作しなかったらごめんなさい。
自由に改変してください。
公式サンプルのを参考にした方がいいかもしれません。
----
#contents
** ラジオボタンセットアップ用のマクロ [#q45f051f]
;//----------------------------------------------------...
;/**
; * ラジオボタンをセットアップ
; *
; * @param[ in ] layer : [必須]使用レイヤー名(他と共用...
; * @param[ in ] lcenter : [必須]左ボタンの表示位置xセ...
; * @param[ in ] lmiddle : [必須]左ボタンの表示位置yセ...
; * @param[ in ] rcenter : [必須]右ボタンの表示位置xセ...
; * @param[ in ] rmiddle : [必須]右ボタンの表示位置yセ...
; * @param[ in ] lpic_nosel : [必須]左ボタン未選択時の...
; * @param[ in ] lpic_sel : [必須]左ボタン選択時の表...
; * @param[ in ] rpic_nosel : [必須]右ボタン未選択時の...
; * @param[ in ] rpic_sel : [必須]右ボタン選択時の表...
; * @param[ in ] lfn : [必須]左ボタンが押された時に...
; * @param[ in ] llabel : [必須]左ボタンが押された時に...
; * @param[ in ] rfn : [必須]右ボタンが押された時に...
; * @param[ in ] rlabel : [必須]右ボタンが押された時に...
; * @param[ in ] var : [必須]参照する変数。trueで左側...
; *
; * @note 使用例
; * [call label=*Setup]
; * [s]
; * *Setup
; * [RadioButtonSetup llabel=*Left rlabel=*Right ...]
; * [return]
; * *Left
; * [let name="var" text="true" cast="bool"]
; * [call label=*Setup]
; * [return]
; * *Right
; * [let name="var" text="false" cast="bool"]
; * [call label=*Setup]
; * [return]
; *
; */
;//----------------------------------------------------...
[macro name="RadioButtonSetup"]
[clear_lay layer="&mp:layer" page=back]
[button layer="&mp:layer" page=back pic="&mp:lpic_nos...
[button layer="&mp:layer" page=back pic="&mp:lpic_sel...
[button layer="&mp:layer" page=back pic="&mp:rpic_nos...
[button layer="&mp:layer" page=back pic="&mp:rpic_sel...
[trans layer="&mp:layer"]
[wt]
[endmacro]
** 使用例 [#k0ab9b78]
; ウィンドウモードの設定のラジオボタン
; スクリプト処理
[let name="is_fullscreen" text="false" cast="bool"]
[add_lay layer="option_windowmode_button" class="txt"]
[lay layer="option_windowmode_button" page=fore visible...
[lay layer="option_windowmode_button" page=back visible...
[call label=*Setup]
[s]
;//----------------------------------------------------...
;/// ラジオボタンのセットアップ
;//----------------------------------------------------...
*Setup
[RadioButtonSetup layer="option_windowmode_button"
lcenter=200 lmiddle=300 lpic_nosel="option_window...
rcenter=600 rmiddle=300 rpic_nosel="option_window...
var="&is_fullscreen"]
[return]
;//----------------------------------------------------...
;/// 左のボタンが押された際に呼ばれる
;//----------------------------------------------------...
*Left
[let name="is_fullscreen" text="true" cast="bool"]
[call label=*Setup]
[return]
;//----------------------------------------------------...
;/// 右のボタンが押された際に呼ばれる
;//----------------------------------------------------...
*Right
[let name="is_fullscreen" text="false" cast="bool"]
[call label=*Setup]
[return]
** 何か [#r4946dac]
- 使用するlayerは、このラジオボタン1つにつき1枚にしてくだ...
- lpic_nosel, rpic_nosel の画像は、[button]タグの3分割画...
- lpic_sel, rpic_sel の画像は、固定の画像になります。([b...
終了行:
*AirNovel - ラジオボタン [#x0cc202c]
- どちらか一方しか押せないボタン。
適当に作ってみました。上手く動作しなかったらごめんなさい。
自由に改変してください。
公式サンプルのを参考にした方がいいかもしれません。
----
#contents
** ラジオボタンセットアップ用のマクロ [#q45f051f]
;//----------------------------------------------------...
;/**
; * ラジオボタンをセットアップ
; *
; * @param[ in ] layer : [必須]使用レイヤー名(他と共用...
; * @param[ in ] lcenter : [必須]左ボタンの表示位置xセ...
; * @param[ in ] lmiddle : [必須]左ボタンの表示位置yセ...
; * @param[ in ] rcenter : [必須]右ボタンの表示位置xセ...
; * @param[ in ] rmiddle : [必須]右ボタンの表示位置yセ...
; * @param[ in ] lpic_nosel : [必須]左ボタン未選択時の...
; * @param[ in ] lpic_sel : [必須]左ボタン選択時の表...
; * @param[ in ] rpic_nosel : [必須]右ボタン未選択時の...
; * @param[ in ] rpic_sel : [必須]右ボタン選択時の表...
; * @param[ in ] lfn : [必須]左ボタンが押された時に...
; * @param[ in ] llabel : [必須]左ボタンが押された時に...
; * @param[ in ] rfn : [必須]右ボタンが押された時に...
; * @param[ in ] rlabel : [必須]右ボタンが押された時に...
; * @param[ in ] var : [必須]参照する変数。trueで左側...
; *
; * @note 使用例
; * [call label=*Setup]
; * [s]
; * *Setup
; * [RadioButtonSetup llabel=*Left rlabel=*Right ...]
; * [return]
; * *Left
; * [let name="var" text="true" cast="bool"]
; * [call label=*Setup]
; * [return]
; * *Right
; * [let name="var" text="false" cast="bool"]
; * [call label=*Setup]
; * [return]
; *
; */
;//----------------------------------------------------...
[macro name="RadioButtonSetup"]
[clear_lay layer="&mp:layer" page=back]
[button layer="&mp:layer" page=back pic="&mp:lpic_nos...
[button layer="&mp:layer" page=back pic="&mp:lpic_sel...
[button layer="&mp:layer" page=back pic="&mp:rpic_nos...
[button layer="&mp:layer" page=back pic="&mp:rpic_sel...
[trans layer="&mp:layer"]
[wt]
[endmacro]
** 使用例 [#k0ab9b78]
; ウィンドウモードの設定のラジオボタン
; スクリプト処理
[let name="is_fullscreen" text="false" cast="bool"]
[add_lay layer="option_windowmode_button" class="txt"]
[lay layer="option_windowmode_button" page=fore visible...
[lay layer="option_windowmode_button" page=back visible...
[call label=*Setup]
[s]
;//----------------------------------------------------...
;/// ラジオボタンのセットアップ
;//----------------------------------------------------...
*Setup
[RadioButtonSetup layer="option_windowmode_button"
lcenter=200 lmiddle=300 lpic_nosel="option_window...
rcenter=600 rmiddle=300 rpic_nosel="option_window...
var="&is_fullscreen"]
[return]
;//----------------------------------------------------...
;/// 左のボタンが押された際に呼ばれる
;//----------------------------------------------------...
*Left
[let name="is_fullscreen" text="true" cast="bool"]
[call label=*Setup]
[return]
;//----------------------------------------------------...
;/// 右のボタンが押された際に呼ばれる
;//----------------------------------------------------...
*Right
[let name="is_fullscreen" text="false" cast="bool"]
[call label=*Setup]
[return]
** 何か [#r4946dac]
- 使用するlayerは、このラジオボタン1つにつき1枚にしてくだ...
- lpic_nosel, rpic_nosel の画像は、[button]タグの3分割画...
- lpic_sel, rpic_sel の画像は、固定の画像になります。([b...
ページ名: