Advertisement
Guest User

CyruzDraxs

a guest
Jan 5th, 2009
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.70 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <local>
  3.     <config>
  4.         <!--
  5.         Since there will be several game modes, including
  6.         map mode, menu mode and presentation mode,
  7.         this begin block will be used to tell the engine
  8.         which mode it should start the scene with.
  9.         -->
  10.         <begin>global.menu</begin>
  11.     </config>
  12.     <assets>
  13.         <!--
  14.         All external files to be loaded with scene
  15.         including images, sound, videos or maps
  16.         will be defined and ID'd in assets block.
  17.        
  18.         Loaded from: /assests/scene/scenename
  19.         -->
  20.         <image id="newgame_over">newgame_over.png</image>
  21.         <image id="newgame_out">newgame_out.png</image>
  22.         <image id="loadgame_over">loadgame_over.png</image>
  23.         <image id="loadgame_out">loadgame_out.png</image>
  24.         <image id="options_over">options_over.png</image>
  25.         <image id="options_out">options_out.png</image>
  26.         <image id="exit_over">exit_over.png</image>
  27.         <image id="exit_out">exit_out.png</image>
  28.        
  29.         <sound id="bg_music">bg.ogg</sound>
  30.        
  31.         <video id="logo_anim">logo.avi</video>
  32.     </assets>
  33.     <keys>
  34.         <!--
  35.         Button and Key presses will be handled here.
  36.         When a button is pressed a corresponding action,
  37.         global or scene script, will be executed.
  38.         -->
  39.         <key id="p">game.pause</key>
  40.         <!--
  41.         Pressing the space bar will execute def jump():
  42.         in the current scene's *.py script.
  43.        
  44.         global.jump could also be used for common actions
  45.        
  46.         global.assets.script.loading.skip could also be used
  47.         to skip the loading screen by executing def skip():
  48.         -->
  49.         <key id="space">scene.jump</key>
  50.         <!--
  51.         Buttons are stored as an array; this action
  52.         will find the currently selected button, chnage
  53.         selected to false, move to the next button in the
  54.         buttons array and then change selected to true.
  55.         This also switches to the over asset, if present.
  56.         -->
  57.         <key id="down">global.menu.buttons.selected.next</key>
  58.     </keys>
  59. </local>
  60. <global>
  61. <!--
  62. Everything that can be set inside of local
  63. can be set inside of global and will instead
  64. remain loaded on the event of a scene change
  65. unless overwritten by an item of the same ID.
  66. -->
  67.     <assets>
  68.         <!--
  69.         All external files to be loaded with scene
  70.         including images, sound, videos or maps
  71.         will be defined and ID'd in assets block.
  72.        
  73.         Loaded from: /assests/common
  74.         -->
  75.         <image id="loading_bar">loading_bar.png</image>
  76.         <image id="loading_overlay">loading_overlay.png</image>
  77.  
  78.         <sound id="loading_music">loading.ogg</sound>
  79.                
  80.         <script id="loading">loading.py</script>
  81.     </assets>
  82.     <menu>
  83.         <!--
  84.         menu block will be used to store an overlay menu.
  85.         Usually this will be done globally in the start scene,
  86.         however; it will be possible to define a new menu set
  87.         for each scene. This will allow for such things as
  88.         a pause menu when in a battle scene, but a status menu
  89.         when in a map scene. Scene block will be paused.
  90.         -->
  91.         <music>
  92.             <id>bg_music</id>
  93.             <loop>true</loop>
  94.             <!--
  95.             loopstart will allow you to specify a millisecond
  96.             coordinate in the audio file where to start playing
  97.             on the event of completing and restarting the loop.
  98.             -->
  99.             <loopstart>1000</loopstart>
  100.         </music>
  101.         <buttons>
  102.             <button>
  103.                 <!--
  104.                 id functions both as the reference to the image asset
  105.                 and as an id to
  106.                 -->
  107.                 <id>newgame</id>
  108.                 <!--
  109.                 assets refences mouse over and mouse out assets.
  110.                 -->
  111.                 <selected>true</selected>
  112.                 <images>
  113.                     <over>newgame_over</over>
  114.                     <out>newgame_out</out>
  115.                 </images>
  116.                 <action>
  117.                     <type>scene</type>
  118.                     <value>level1</value>
  119.                 </action>
  120.                 <valign>bottom</valign>
  121.                 <halign>left</halign>
  122.                 <x>100</x>
  123.                 <y>-200</y>
  124.             </button>
  125.             <button>
  126.                 <id>loadgame</id>
  127.                 <images>
  128.                     <over>loadgame_over</over>
  129.                     <out>loadgame_out</out>
  130.                 </images>
  131.                 <action>
  132.                     <type>scene</type>
  133.                     <value>load</value>
  134.                 </action>
  135.                 <action>Load</action>
  136.                 <valign>bottom</valign>
  137.                 <halign>left</halign>
  138.                 <x>100</x>
  139.                 <y>-175</y>
  140.             </button>
  141.             <button>
  142.                 <id>options</id>
  143.                 <images>
  144.                     <over>options_over</over>
  145.                     <out>options_out</out>
  146.                 </images>
  147.                 <action>
  148.                     <type>scene</type>
  149.                     <value>options</value>
  150.                 </action>
  151.                 <valign>bottom</valign>
  152.                 <halign>left</halign>
  153.                 <x>100</x>
  154.                 <y>-150</y>
  155.             </button>
  156.             <button>
  157.                 <id>exit</id>
  158.                 <images>
  159.                     <over>exit_over</over>
  160.                     <out>exit_out</out>
  161.                 </images>
  162.                 <image>exit.png</image>
  163.                 <action>
  164.                     <type>exit</type>
  165.                 </action>
  166.                 <valign>bottom</valign>
  167.                 <!--
  168.                 Some internal variables will be exposed to be used
  169.                 within scene files. Here you see a centered button.
  170.                 -->
  171.                 <x>game.screen.width/2+local.assets.image.exit.width/2</x>
  172.                 <y>-100</y>
  173.             </button>
  174.         </buttons>
  175.     </menu>
  176. </global>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement