![見出し画像](https://assets.st-note.com/production/uploads/images/109734567/rectangle_large_type_2_0d1668855914bd9a4577a0e5a90ecc81.png?width=1200)
【ティラノスクリプト】タイトル画面に終了ボタンを配置するサンプル
①終了の確認をする場合
![](https://assets.st-note.com/production/uploads/images/109733313/picture_pc_a0c47efaeb139ce20293c045692921db.gif?width=1200)
[cm]
@clearstack
@bg storage ="title.jpg" time=100
@wait time = 200
*start
[button x=135 y=230 graphic="title/button_start.png" enterimg="title/button_start2.png" target="gamestart" keyfocus="1"]
[button x=135 y=320 graphic="title/button_load.png" enterimg="title/button_load2.png" role="load" keyfocus="2"]
[button x=135 y=410 graphic="title/button_cg.png" enterimg="title/button_cg2.png" storage="cg.ks" keyfocus="3"]
[button x=135 y=500 graphic="title/button_replay.png" enterimg="title/button_replay2.png" storage="replay.ks" keyfocus="4"]
[button x=135 y=590 graphic="title/button_config.png" enterimg="title/button_config2.png" role="sleepgame" storage="config.ks" keyfocus="5"]
[glink target="close" text="ゲームを終了する" x="785" y="590" width="242" size="28" cm="false"]
[s]
*gamestart
;一番最初のシナリオファイルへジャンプする
@jump storage="scene1.ks"
*close
[close ask="true"]
[s]
②終了の確認をしない場合
![](https://assets.st-note.com/production/uploads/images/109734260/picture_pc_dd71dce171dfcea2c727e7d2180f76cc.gif?width=1200)
[cm]
@clearstack
@bg storage ="title.jpg" time=100
@wait time = 200
*start
[button x=135 y=230 graphic="title/button_start.png" enterimg="title/button_start2.png" target="gamestart" keyfocus="1"]
[button x=135 y=320 graphic="title/button_load.png" enterimg="title/button_load2.png" role="load" keyfocus="2"]
[button x=135 y=410 graphic="title/button_cg.png" enterimg="title/button_cg2.png" storage="cg.ks" keyfocus="3"]
[button x=135 y=500 graphic="title/button_replay.png" enterimg="title/button_replay2.png" storage="replay.ks" keyfocus="4"]
[button x=135 y=590 graphic="title/button_config.png" enterimg="title/button_config2.png" role="sleepgame" storage="config.ks" keyfocus="5"]
[glink target="close" text="ゲームを終了する" x="785" y="590" width="242" size="28" cm="false"]
[s]
*gamestart
;一番最初のシナリオファイルへジャンプする
@jump storage="scene1.ks"
*close
[close ask="false"]
[s]
この記事が気に入ったらサポートをしてみませんか?