maxiGosの使い方(4)

maxiGosの使い方(3)で説明したcfgファイルは、自分でカスタマイズすることができます。
コメントで説明したcfgファイルのサンプルを記載します。
実行結果はこちらです。
コンポーネントの種類やオプションは、マニュアルに詳しく書いてあります(^_^;
余力があれば、別途説明します。

[crayon]
< ?php //----------------------------------------------------- // 以下4つは無条件に書く //----------------------------------------------------- $gosParam["Script"][]="mgos_lib.js"; $gosParam["Script"][]="mgos_rls.js"; $gosParam["Script"][]="mgos_prs.js"; $gosParam["Script"][]="mgos.js"; //----------------------------------------------------- // 使用スクリプトの指定 // 「mgosコンポーネント名.js」となっている。 // 以下の場合コンポーネント名は「Goban」 //----------------------------------------------------- $gosParam["Script"][]="mgosGoban.js"; //----------------------------------------------------- // コンポーネント名の指定 // []の中は「xxxBox」という名前にする。 // xxxは何でもOK //----------------------------------------------------- $gosParam["GobanBox"][]="Goban"; //----------------------------------------------------- // オプション指定 // オプションはコンポーネントごとに決まっている // 以下は3D化するオプション //----------------------------------------------------- $gosParam["in3dOn"]=1; //----------------------------------------------------- // CSS指定 // 「_maxgos/_mgos/_css/」からの相対パスで指定する点に注意 //----------------------------------------------------- $gosParam["Style"][]="../../../sample/cfgtest.css"; ?>
[/crayon]

cfgファイルで指定したcfgtest.css
[crayon]
div.mxGobanDiv canvas
{
background-color:#fcce9c;
box-shadow:0 1em 1em #963;
}
[/crayon]