Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <local>
- <config>
- <!--
- Since there will be several game modes, including
- map mode, menu mode and presentation mode,
- this begin block will be used to tell the engine
- which mode it should start the scene with.
- -->
- <begin>global.menu</begin>
- </config>
- <assets>
- <!--
- All external files to be loaded with scene
- including images, sound, videos or maps
- will be defined and ID'd in assets block.
- Loaded from: /assests/scene/scenename
- -->
- <image id="newgame_over">newgame_over.png</image>
- <image id="newgame_out">newgame_out.png</image>
- <image id="loadgame_over">loadgame_over.png</image>
- <image id="loadgame_out">loadgame_out.png</image>
- <image id="options_over">options_over.png</image>
- <image id="options_out">options_out.png</image>
- <image id="exit_over">exit_over.png</image>
- <image id="exit_out">exit_out.png</image>
- <sound id="bg_music">bg.ogg</sound>
- <video id="logo_anim">logo.avi</video>
- </assets>
- <keys>
- <!--
- Button and Key presses will be handled here.
- When a button is pressed a corresponding action,
- global or scene script, will be executed.
- -->
- <key id="p">game.pause</key>
- <!--
- Pressing the space bar will execute def jump():
- in the current scene's *.py script.
- global.jump could also be used for common actions
- global.assets.script.loading.skip could also be used
- to skip the loading screen by executing def skip():
- -->
- <key id="space">scene.jump</key>
- <!--
- Buttons are stored as an array; this action
- will find the currently selected button, chnage
- selected to false, move to the next button in the
- buttons array and then change selected to true.
- This also switches to the over asset, if present.
- -->
- <key id="down">global.menu.buttons.selected.next</key>
- </keys>
- </local>
- <global>
- <!--
- Everything that can be set inside of local
- can be set inside of global and will instead
- remain loaded on the event of a scene change
- unless overwritten by an item of the same ID.
- -->
- <assets>
- <!--
- All external files to be loaded with scene
- including images, sound, videos or maps
- will be defined and ID'd in assets block.
- Loaded from: /assests/common
- -->
- <image id="loading_bar">loading_bar.png</image>
- <image id="loading_overlay">loading_overlay.png</image>
- <sound id="loading_music">loading.ogg</sound>
- <script id="loading">loading.py</script>
- </assets>
- <menu>
- <!--
- menu block will be used to store an overlay menu.
- Usually this will be done globally in the start scene,
- however; it will be possible to define a new menu set
- for each scene. This will allow for such things as
- a pause menu when in a battle scene, but a status menu
- when in a map scene. Scene block will be paused.
- -->
- <music>
- <id>bg_music</id>
- <loop>true</loop>
- <!--
- loopstart will allow you to specify a millisecond
- coordinate in the audio file where to start playing
- on the event of completing and restarting the loop.
- -->
- <loopstart>1000</loopstart>
- </music>
- <buttons>
- <button>
- <!--
- id functions both as the reference to the image asset
- and as an id to
- -->
- <id>newgame</id>
- <!--
- assets refences mouse over and mouse out assets.
- -->
- <selected>true</selected>
- <images>
- <over>newgame_over</over>
- <out>newgame_out</out>
- </images>
- <action>
- <type>scene</type>
- <value>level1</value>
- </action>
- <valign>bottom</valign>
- <halign>left</halign>
- <x>100</x>
- <y>-200</y>
- </button>
- <button>
- <id>loadgame</id>
- <images>
- <over>loadgame_over</over>
- <out>loadgame_out</out>
- </images>
- <action>
- <type>scene</type>
- <value>load</value>
- </action>
- <action>Load</action>
- <valign>bottom</valign>
- <halign>left</halign>
- <x>100</x>
- <y>-175</y>
- </button>
- <button>
- <id>options</id>
- <images>
- <over>options_over</over>
- <out>options_out</out>
- </images>
- <action>
- <type>scene</type>
- <value>options</value>
- </action>
- <valign>bottom</valign>
- <halign>left</halign>
- <x>100</x>
- <y>-150</y>
- </button>
- <button>
- <id>exit</id>
- <images>
- <over>exit_over</over>
- <out>exit_out</out>
- </images>
- <image>exit.png</image>
- <action>
- <type>exit</type>
- </action>
- <valign>bottom</valign>
- <!--
- Some internal variables will be exposed to be used
- within scene files. Here you see a centered button.
- -->
- <x>game.screen.width/2+local.assets.image.exit.width/2</x>
- <y>-100</y>
- </button>
- </buttons>
- </menu>
- </global>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement