home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 2002 October / JOY141_CD2.iso / Data / Sharewares / Audio / s2alpha_install_020828.exe / 39_file / index.mml next >
Text File  |  2002-06-04  |  15KB  |  398 lines

  1. <?mml version="0.5" ?>
  2. <mml>
  3.     <interface cosmetic_name="orange pill" unique_name="ians/orange/pill/1.0">
  4.         <exports>
  5.             <remote name="Pill" window="pill" />
  6.         </exports>
  7.         <FontStyle name="pill_display_font" face="Arial Bold" size="9" style="normal" />
  8.         <FontStyle name="track_display_font" type="raster" source="pill.psd|track_display_font" monochrome="true">
  9.             <glyphlist>0123456789</glyphlist>
  10.         </FontStyle>
  11.         <FontStyle name="time_display_font" type="raster" source="pill.psd|time_display_font" monochrome="true">
  12.             <glyphlist>0123456789:.&#e001;&#e000;&#e002;</glyphlist>
  13.         </FontStyle>
  14.  
  15.         <?macrodef "btnImageStyle3State"
  16.             <ImageStyle name="$(name)">
  17.                  <raster 
  18.                      source            ="pill.psd|$(norm)" 
  19.                      alignment        ="entire"
  20.                      blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  21.                      source_offset    ="pill.psd|$(norm) @ pill.psd|$(base)" 
  22.                     
  23.                 />
  24.                 <raster 
  25.                     state            ="HIT" 
  26.                     source            ="pill.psd|$(hit)" 
  27.                     source_offset    ="pill.psd|$(hit) @ pill.psd|$(base)" 
  28.                     alignment        ="entire"
  29.                     blendmode        ="COPY|RGB|ALPHA_SRCALPHA" 
  30.                     
  31.                 />
  32.                 <raster 
  33.                     state            ="Hover" 
  34.                     source            ="pill.psd|$(hover)" 
  35.                     source_offset    ="pill.psd|$(hover) @ pill.psd|$(base)" 
  36.                     alignment        ="entire"
  37.                     blendmode        ="COPY|RGB|ALPHA_SRCALPHA" 
  38.                 />                
  39.             </ImageStyle>
  40.         ?>
  41.  
  42.         <?macrodef "btnImageStyle2State"
  43.             <ImageStyle name="$(name)">
  44.                  <raster 
  45.                      source            ="pill.psd|$(norm)" 
  46.                      alignment        ="entire"
  47.                      blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  48.                      source_offset    ="pill.psd|$(norm) @ pill.psd|$(base)" 
  49.                     
  50.                 />
  51.                 <raster 
  52.                     state            ="HIT" 
  53.                     source            ="pill.psd|$(hit)" 
  54.                     source_offset    ="pill.psd|$(hit) @ pill.psd|$(base)" 
  55.                     alignment        ="entire"
  56.                     blendmode        ="COPY|RGB|ALPHA_SRCALPHA" 
  57.                 />            
  58.             </ImageStyle>
  59.         ?>
  60. <!--  This block should replace the next, in order to use OS transparency.  It's disabled because of our 95 & 98 users.  -->
  61. <!--    <window name="pill" default_size = "pill.psd" transparent="true" hitstyle="pillhitstyle">                      
  62.             <ImageStyle name="background">
  63.                 <raster
  64.                     source                = "pill.psd|shadow"
  65.                     source_offset        = "pill.psd|shadow"
  66.                     blendmode            = "BM_PIXELCOPY"
  67.                     alignment            = "entire"
  68.                 />
  69.                 <raster
  70.                     source                = "pill.psd|chassis"
  71.                     source_offset        = "pill.psd|chassis"
  72.                     alignment    = "entire"
  73.                     blendmode    = "ps_normal"
  74.                 />
  75.  
  76.             </ImageStyle>  
  77.                            -->
  78.  
  79. <!-- Without transparency use this:  -->
  80.         <window name="pill" default_size = "pill.psd" hitstyle="pillhitstyle" shape="pillshape">
  81.             <shape name="pillshape">
  82.                 <shape_raster source="pill.psd|chassis" source_offset="pill.psd|chassis"/>
  83.             </shape>
  84.             <ImageStyle name="background">
  85.                 <raster    source = "pill.psd|chassis" source_offset="pill.psd|chassis" />
  86.             </ImageStyle>
  87.             
  88. <!-- End of non-transparency specific block -->
  89.  
  90.             <dock_point type="slave" name="MonitorUL"     alignment="upperleft" offset="6,0" /> 
  91.             <dock_point type="slave" name="MonitorUR"     alignment="upperright" offset="-8,0"/> 
  92.             <dock_point type="slave" name="MonitorLL"     alignment="lowerleft" offset="6,-10" /> 
  93.             <dock_point type="slave" name="MonitorLR"     alignment="lowerright" offset="-8,-10"/> 
  94.             
  95.             <hitstyle name="pillhitstyle" default_hitcode="DRAG" >
  96.                 <hitcode type="INACTIVE">
  97.                     <shape>
  98.                         <shape_raster
  99.                                source ="pill.psd|door_region"
  100.                                offset ="pill.psd|door_region @ pill.psd"
  101.                         />
  102.                     </shape>
  103.                 </hitcode>
  104.             </hitstyle>
  105.  
  106.  
  107.             <script name="OnVolumeChanged">
  108.                 volume.SetRealPos( :sonique.players.default.GetVolume() );
  109.             </script>
  110.  
  111.             <script name="OnInit">
  112.                 SetDesiredFPS(45);
  113.                 :sonique.players.default.RegisterCallback("VolumeChanged","OnVolumeChanged()", this);
  114.                 OnVolumeChanged();
  115.             </script>
  116.  
  117.             <script name="OpenDoor" >
  118.                 door_frame.door_open(); 
  119.                 OpenDoor="";
  120.             </script>
  121.  
  122.             <window name="eep" type="Sonique2_StatusBar" offset="pill.psd|status_bg" shape="eepshape" >
  123.                 <shape name="eepshape" >
  124.                     <shape_raster source="pill.psd|status_bg" alignment="entire" />
  125.                 </shape>
  126.                 <ImageStyle name="background">
  127.                     <color_fill        color      = "0xFF3FBBEF"    alignment = "entire"     />
  128.                 </ImageStyle>
  129.  
  130.                 <ImageStyle name="progress_empty">
  131.                     <color_fill color="#7BCBFB" />
  132.                 </ImageStyle>
  133.                 <ImageStyle name="progress_fill">
  134.                     <color_fill color="#0074BB" />
  135.                 </ImageStyle>
  136.  
  137.                 <property 
  138.                         font_style="pill_display_font" 
  139.                         font_color="0xFF00537B" 
  140.                         font_justification="trim_pixels"
  141.                         scroll_mode="horizontal,pingpong"
  142.                         scroll_speed="100"
  143.                         pause_delay="500"
  144.                         whitespace="0"
  145.                         rect_status_offset="5,0,-15,0"
  146.                         rect_progress_offset="8,3,-8,-3"
  147.                 />
  148.             </window>
  149.             <window name="track_display" transparent="true" type="Sonique2_TrackDisplay" offset="pill.psd|track_box" >
  150.                 <property font_style="track_display_font" font_color="0xFF00537B" font_justification="v_center|right" hoverhint="Current track number" />
  151.             </window>
  152.             <window name="time_display" transparent="true" type="Sonique2_TimeDisplay" offset="pill.psd|time_box" hitstyle="ACTIVE" >
  153.                 <ImageStyle name="background"></ImageStyle>
  154.                 <property font_style="time_display_font" font_color="0xFFC2EBFE" font_justification="v_center" updateinterval="100" hovertext="true" />
  155.             </window>
  156.  
  157.             <window name="progress" transparent="true" type="Sonique2_Progress" offset="pill.psd|progress_bar" hitstyle="ACTIVE" >
  158.                 <ImageStyle name="background">
  159.                      <raster 
  160.                              source            ="pill.psd|progress_bar_background"
  161.                              alignment        ="entire"
  162.                              blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  163.                     />
  164.                 </ImageStyle>
  165.                 <ImageStyle name="barempty">
  166.                     <color_fill color="0xFF0179B3"
  167.                                blendmode     = "COPY|RGB"
  168.                                alignment = "entire"
  169.                     />
  170.                 </ImageStyle>
  171.                 <ImageStyle name="barfilled">
  172.                     <color_fill color="0xFF00537B"
  173.                                blendmode     = "COPY|RGB"
  174.                                alignment = "entire"
  175.                     />
  176.                 </ImageStyle>
  177.                 <Property type="LoadProgress"
  178.                           orientation="left_to_right"
  179.                           bar_offset_rect="2,2,-2,-2"
  180.                           bar_align_rect ="0,0,1,1" />
  181.             </window>
  182.             <window name="progress_handle" transparent="true" type="Sonique2_Progress" offset="pill.psd|progress_bar" hitstyle="ACTIVE" >
  183.                 <ImageStyle name="handle">
  184.                      <raster 
  185.                              source            ="pill.psd|progress_bar_handle"
  186.                              alignment        ="entire"
  187.                              blendmode        ="COPY|RGB"
  188.                     />
  189.                 </ImageStyle>
  190.                 <Property type="SongProgress"
  191.                           orientation="left_to_right"
  192.                           bar_offset_rect="1,0,-1,0"
  193.                           bar_align_rect ="0,0,1,1"
  194.                           outer_handle_offset_rect="-3,1,3,6"
  195.                           outer_handle_align_rect="0,0,0,0"
  196.                           hovertext="true" />
  197.             </window>
  198.             <window name="volume" transparent="true" type="fillbar" offset="pill.psd|volume_mask"  hitstyle="ACTIVE" >
  199.                 <script name="OnPosChange">
  200.                     :sonique.players.default.SetVolume( GetRealPos() );
  201.                 </script>
  202.  
  203.                 <ImageStyle name="barfilled">
  204.                      <raster 
  205.                              source            ="pill.psd|volume_bg"
  206.                              alignment        ="upperleft"
  207.                             offset            ="pill.psd|volume_mask@pill.psd|volume_mask"
  208.                              blendmode        ="COPY|ALPHA_SRCALPHA"
  209.                     />
  210.                 </ImageStyle>
  211.                 <ImageStyle name="barempty">
  212.                      <raster 
  213.                              source            ="pill.psd|volume_fg"
  214.                              alignment        ="lowerleft"
  215.                             offset            ="pill.psd|volume_mask@pill.psd|volume_mask"
  216.                              blendmode        ="COPY|ALPHA_SRCALPHA"
  217.                     />
  218.                 </ImageStyle>
  219.                 <Property orientation="bottom_to_top" relative="true"  />
  220.             </window>
  221.             
  222.             <?macrodef btn_start
  223.                 <window name="$(name)" type="button" transparent="true"  offset = "pill.psd|$(name)a" hitstyle="ACTIVE" >
  224.                     <property    default_delay    = "150"    hover="true" hoverhint="$(hint)" />
  225.                     <?macroins "btnImageStyle3State" name="state0" norm="$(name)a" hit="$(name)b" hover="$(name)ha" base="$(name)a" ?$>
  226.             ?>
  227.  
  228.             <?macrodef cornerbtn_start
  229.                 <window name="$(name)" type="button" transparent="true"  offset = "pill.psd|$(name)a" hitstyle="ACTIVE" >
  230.                     <property    default_delay= "150" hoverhint="$(hint)" />
  231.                     <?macroins "btnImageStyle2State" name="state0" norm="$(name)a" hit="$(name)b"  base="$(name)a" ?$>
  232.             ?>
  233.             
  234.             <?macrodef btn_end     </window> ?>
  235.         
  236.             
  237.             <?macroins btn_start name="b1" hint="Previous Track" ?>
  238.                 <script name="OnClick" > :sonique.players.default.Previous(); </script>
  239.             <?macroins btn_end ?>
  240.             <?macroins btn_start name="b2" hint="Play" ?>
  241.                 <script name="OnClick" > :sonique.players.default.Play(); </script>
  242.             <?macroins btn_end ?>
  243.             <?macroins btn_start name="b3" hint="Stop" ?> 
  244.                 <script name="OnClick" > :sonique.players.default.Stop(); </script>
  245.             <?macroins btn_end ?>
  246.             <?macroins btn_start name="b4" hint="Pause" ?>
  247.                 <script name="OnClick" > :sonique.players.default.TogglePause(); </script>
  248.             <?macroins btn_end ?>
  249.             <?macroins btn_start name="b5" hint="Next track" ?>
  250.                 <script name="OnClick" > 
  251.                     :sonique.players.default.Next();
  252.                 </script>
  253.             <?macroins btn_end ?>
  254.             <?macroins btn_start name="b6" hint="Cycle through repeat modes" ?>
  255.                 <script name="OnClick" > 
  256.                     $currentstate = :sonique.players.default.GetRepeat();
  257.                     :sonique.players.default.SetRepeat( { off: "one", one: "all", all: "off" }[$currentstate] ); 
  258.                 </script>
  259.                 <script name="OnInit">
  260.                     :sonique.players.default.RegisterCallback("RepeatChanged","OnRepeatChange()", this);
  261.                     OnRepeatChange();
  262.                 </script>
  263.                 <script name="OnRepeatChange">
  264.                     SetButtonState( { off: 0, one: 1, all: 2 }[:sonique.players.default.GetRepeat()] );
  265.                 </script>
  266.                 <?macroins "btnImageStyle3State" name="state1" norm="b6a_loop1" hit="b6b" hover="b6ha_loop1"    base="b6a" $?>
  267.                 <?macroins "btnImageStyle3State" name="state2" norm="b6a_loopall" hit="b6b" hover="b6ha_loopall" base="b6a" $?>
  268.             <?macroins btn_end ?>
  269.  
  270.             <?macroins btn_start name="b7" hint="Toggle shuffle" ?>
  271.                 <script name="OnInit">
  272.                     :sonique.players.default.RegisterCallback("ShuffleChanged","OnShuffleChange()", this);
  273.                     OnShuffleChange();
  274.                 </script>
  275.                 <script name="OnClick">
  276.                     $currentstate = :sonique.players.default.GetShuffle();
  277.                     :sonique.players.default.SetShuffle( { "false": "true", "true": "false" }[$currentstate] );
  278.                 </script>
  279.                 <script name="OnShuffleChange">
  280.                     SetButtonState( { "false": 0, "true": 1 }[:sonique.players.default.GetShuffle()] );
  281.                 </script>
  282.                 <?macroins "btnImageStyle3State" name="state1" norm="b7a_shuffleon" hit="b7b" hover="b7ha_shuffleon" base="b7a" $?>
  283.             <?macroins btn_end ?>
  284.  
  285.             <?macroins btn_start name="b8" hint="Open audio" ?>
  286.                 <script name="OnClick">
  287.                     :sonique.OpenFiles();
  288.                 </script>
  289.             <?macroins btn_end ?>
  290.             <?macroins cornerbtn_start name="b9" hint="Minimize window" ?>
  291.                 <script name="OnClick">
  292.                     parent.MinimizeWindow(1);
  293.                 </script>
  294.             <?macroins btn_end ?>
  295.             <?macroins cornerbtn_start name="b10" hint="Close window" ?>
  296.                 <script name="OnClick" >
  297.                     parent.DestroyWindow();
  298.                 </script>
  299.             <?macroins btn_end ?>
  300.             
  301.  
  302.  
  303.  
  304.             <window name="door_frame" transparent="true" alignment="upperleft" offset="pill.psd|door_region @ pill.psd" shape="doorshape" hitstyle="NONE" >
  305.                 <shape name="doorshape" > <shape_raster alignment="entire" source="pill.psd|door_region" threshold="255" />    </shape>
  306.  
  307.                 <script name="OnInit">
  308.                     left_door_pos         = left_door.GetOffset();
  309.                     left_door_shadow_pos = left_door_shadow.GetOffset();
  310.                     right_door_pos       = right_door.GetOffset();
  311.                 </script>
  312.                 <script name="door_open">
  313.                     left_door.SetOffset({-125,0,-125,0}+left_door_pos,0,1200,"linear_accel"); 
  314.                     left_door_shadow.SetOffset({-125,0,-125,0}+left_door_shadow_pos,0,1200,"linear_accel"); 
  315.                     right_door.SetOffset({125,0,125,0}+right_door_pos,0,1200,"linear_accel"); 
  316.                     left_door_cover.SetOffset({0,0,-125,0}+left_door_pos,0,1200,"linear_accel"); 
  317.                     right_door_cover.SetOffset({125,0,0,0}+right_door_pos,0,1200,"linear_accel");
  318.                 </script>        
  319.                 <script name="door_close">
  320.                     left_door.SetOffset(left_door_pos,0,1200,"linear_decel");
  321.                     left_door_shadow.SetOffset(left_door_shadow_pos,0,1200,"linear_decel"); 
  322.                     right_door.SetOffset(right_door_pos,0,1200,"linear_decel");
  323.                     left_door_cover.SetOffset(left_door_pos,0,1200,"linear_decel"); 
  324.                     right_door_cover.SetOffset(right_door_pos,0,1200,"linear_decel");
  325.                 </script>
  326.                 
  327.                 <window name="left_door_shadow" transparent="true" offset="pill.psd|left_door_shadow @ pill.psd|door_region">
  328.                     <ImageStyle name="background">
  329.                         <raster 
  330.                              source            ="pill.psd|left_door_shadow" 
  331.                              alignment        ="entire"
  332.                              blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  333.                              opacity            =".75" 
  334.                              />
  335.                     </ImageStyle>
  336.                 </window>
  337.                 
  338.                 <window name="left_door" transparent="false" offset="pill.psd|left_door @ pill.psd|door_region">
  339.                     <ImageStyle name="background">
  340.                         <raster 
  341.                              source            ="pill.psd|left_door" 
  342.                              alignment        ="entire"
  343.                              blendmode        ="COPY|PIXEL"
  344.                              source_offset    ="pill.psd|left_door @ pill.psd|left_door" 
  345.                              />
  346.                     </ImageStyle>
  347.                 </window>
  348.                 
  349.                 <window name="right_door" transparent="false" offset="pill.psd|right_door @ pill.psd|door_region">
  350.                     <ImageStyle name="background">
  351.                         <raster 
  352.                              source            ="pill.psd|right_door" 
  353.                              alignment        ="entire"
  354.                              blendmode        ="COPY|PIXEL"
  355.                              source_offset    ="pill.psd|right_door @ pill.psd|right_door" 
  356.                              />
  357.                     </ImageStyle>
  358.                 </window>
  359.                 
  360.                 <window name="left_door_cover" transparent="true" offset="pill.psd|left_door @ pill.psd|door_region" hitstyle="ACTIVE" >
  361.                     <ImageStyle name="background">
  362.                         <gradient_fourpoint
  363.                              color_ul        ="0x60000000"
  364.                              color_lr        ="0x60FFFFFF"
  365.                              color_ur        ="0x00000000"
  366.                              color_ll        ="0x00000000"
  367.                              alignment        ="upperleft"
  368.                              offset            ="pill.psd|door_region @ pill.psd|left_door"
  369.                              blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  370.                               
  371.                              />
  372.                     </ImageStyle>
  373.                     <script name="OnMouseOver">
  374.                         OpenDoor();
  375.                     </script>
  376.                 </window>
  377.                 
  378.                 <window name="right_door_cover" transparent="true" offset="pill.psd|right_door @ pill.psd|door_region" hitstyle="ACTIVE" >
  379.                     <ImageStyle name="background">
  380.                         <gradient_fourpoint
  381.                              color_ul        ="0x40653807"
  382.                              color_lr        ="0x40FFFFB7"
  383.                              color_ur        ="0x00000000"
  384.                              color_ll        ="0x00000000"
  385.                              alignment        ="upperright"
  386.                              offset            ="pill.psd|door_region @ pill.psd|right_door"
  387.                              blendmode        ="COPY|RGB|ALPHA_SRCALPHA"
  388.                          />
  389.                     </ImageStyle>
  390.                     <script name="OnMouseOver">
  391.                         OpenDoor();
  392.                     </script>
  393.                 </window>
  394.             </window>
  395.         </window>
  396.     </interface>
  397. </mml>
  398.