xboxscene.org forums

Pages: [1] 2

Author Topic: Animation Help Required.  (Read 170 times)

Broads

  • Archived User
  • Full Member
  • *
  • Posts: 137
Animation Help Required.
« on: April 29, 2007, 05:25:00 AM »

Guys, I am playing with an idea at the moment,  but I dont know if it is possible.

I have a control as below, which I would like to animate based on different events,  but I dont know if it is even possible to do.

I want to be able to animate an object that has already been rendered from where its current oriantation is.

<control type="image">
      <description>KnobFront</description>
      <posx>46</posx>
      <posy>342</posy>
      <width>155</width>
      <height>155</height>
      <animation effect="rotate" end="360" center="121,425" time="800">WindowOpen</animation>
      <animation effect="rotate" end="75" center="121,425" time="800">[Control.HasFocus(1) + Buttonscroller.HasFocus(103)]</animation>
      <texture>fqKnob_front.png</texture>
    </control>

Is there a way to do this or shall i give up now?

also can you rotate backwards?

Thanks for any help..

Logged

CHI3f

  • Archived User
  • Hero Member
  • *
  • Posts: 607
Animation Help Required.
« Reply #1 on: April 29, 2007, 07:13:00 AM »

You should change this:

 <animation effect="rotate" end="75" center="121,425" time="800">[Control.HasFocus(1) + Buttonscroller.HasFocus(103)]</animation>

To this:

 <animation effect="rotate" end="75" center="121,425" time="800" condition="[Control.HasFocus(1) + Buttonscroller.HasFocus(103)]">Conditional</animation>


Also visibility conditions for buttonscrollers go like this:

Buttonscroller(buttonscrollers id).HasFocus(buttons id)
Logged

Broads

  • Archived User
  • Full Member
  • *
  • Posts: 137
Animation Help Required.
« Reply #2 on: April 29, 2007, 12:43:00 PM »

biggrin.gif  Thanks CHI3f works like a charm!  

next up how do you work out the color codes?  are they hex?
Logged

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
Animation Help Required.
« Reply #3 on: April 29, 2007, 02:52:00 PM »

QUOTE(Broads @ Apr 30 2007, 05:19 AM) View Post

biggrin.gif  Thanks CHI3f works like a charm!  

next up how do you work out the color codes?  are they hex?

Its easy they Break up like this
ff808080

Red is how transperant the color is in hex FF being fully visable and 00 being full transperant (you can't see it)

Blue bit is just a hex html color value that most modern graphic programs or web building programs will give you check out this page for some examples http://www.pagetutor...akapage/picker/
Logged

Broads

  • Archived User
  • Full Member
  • *
  • Posts: 137
Animation Help Required.
« Reply #4 on: April 30, 2007, 01:58:00 AM »

AWSOME ! biggrin.gif

It was the FF that was having me confuse the color code with hex.  on with the show !.. smile.gif
Logged

Broads

  • Archived User
  • Full Member
  • *
  • Posts: 137
Animation Help Required.
« Reply #5 on: May 12, 2007, 07:17:00 AM »

Sorry me again,  tongue.gif

But is there a way I can do a visible condition for a containers folder thumb?

   <visible condition="container.folderthumb">conditional</visible>

Some thing like that?
Logged

nuka1195

  • Archived User
  • Sr. Member
  • *
  • Posts: 290
Animation Help Required.
« Reply #6 on: May 12, 2007, 01:02:00 PM »

you mean if it has a thumb?

found this in guiinfomanager.cpp "container.hasthumb", I don't know if the manual is updated.

http://www.xboxmediacenter.com/wiki/index....itle=InfoLabels

feel free to update it if you like.
Logged

CHI3f

  • Archived User
  • Hero Member
  • *
  • Posts: 607
Animation Help Required.
« Reply #7 on: May 12, 2007, 12:59:00 PM »

Container.HasThumb is in the manual. It is in the list of boolean conditions page.

http://xboxmediacent...lean_Conditions
Logged

nuka1195

  • Archived User
  • Sr. Member
  • *
  • Posts: 290
Animation Help Required.
« Reply #8 on: May 12, 2007, 02:05:00 PM »

Arg, I don't know why I always confuse those. I knew what I meant (IMG:style_emoticons/default/tongue.gif)
Logged

Broads

  • Archived User
  • Full Member
  • *
  • Posts: 137
Animation Help Required.
« Reply #9 on: May 12, 2007, 01:53:00 PM »

biggrin.gif   Cheers you mean theres a manual  tongue.gif     why didnt someone tell me wink.gif


Thanks chaps..
Logged

Broads

  • Archived User
  • Full Member
  • *
  • Posts: 137
Animation Help Required.
« Reply #10 on: May 23, 2007, 01:20:00 PM »

Hi All,

This is the last bit to fix before I release an alpha,  so if anyone can tell me what Im missing.?

The control is the OSD Visuals for the video player.

 <control id="200">
        <visible allowhiddenfocus="true">Control.HasFocus(200)</visible>
        <type>button</type>
        <id>200</id>
        <posx>150</posx>
        <posy>485</posy>
        <width>400</width>
        <height>75</height>
        <label>29</label>
        <font>font12</font>
        <texturefocus>OSD-rw_off.png</texturefocus>
        <texturenofocus>OSD-rw_on.png</texturenofocus>
        <onfocus>-</onfocus>
        <onclick>XBMC.PlayerControl(Rewind)</onclick>
        <onleft>200</onleft>
        <onright>201</onright>
        <onup>200</onup>
        <ondown>200</ondown>
      </control>
     
However using this I get no images,   I have a way around this by doing this in conjuntion with the above.

<control type="image">
      <width>400</width>
      <height>75</height>
      <texture>OSD-rw_on.png</texture>
      <visible>Control.HasFocus(200)</visible>
    </control>
    <control type="image">
      <width>400</width>
      <height>75</height>
      <texture>OSD-rw_off.png</texture>
      <visible>!Control.HasFocus(200)</visible>
    </control>


But I'm sure I shouldn't have to do this.
What am I missing?

Logged

jmarshall

  • Archived User
  • Hero Member
  • *
  • Posts: 541
Animation Help Required.
« Reply #11 on: May 23, 2007, 02:40:00 PM »

What's this for:

<visible allowhiddenfocus="true">Control.HasFocus(200)</visible>

Cheers,
Jonathan
Logged

xboxbox451

  • Archived User
  • Hero Member
  • *
  • Posts: 808
Animation Help Required.
« Reply #12 on: May 23, 2007, 02:59:00 PM »

QUOTE(jmarshall @ May 23 2007, 05:16 PM) View Post

What's this for:

<visible allowhiddenfocus="true">Control.HasFocus(200)</visible>

Cheers,
Jonathan


Ya, thats confusing me a bit too. Anyhow, heres something that might help.

If your using .pngs for an animation, you'll need to put the .png frames (images) in a folder then put the folder in your skins media folder. Place the name of that folder in the multi image controls <imagepath> tag, . Then create a multi-image control that will appear when your button control has focus.

I modified your posted code with an example, that may work.

CODE


150
485
400
75

font12

OSD-rw_off.png
-
XBMC.PlayerControl(Rewind)
200
201
200
200




multi-image control
150
485
400
75
name_of_folder_PNGs_are_stored
Control.HasFocus(200)
60
Logged

Broads

  • Archived User
  • Full Member
  • *
  • Posts: 137
Animation Help Required.
« Reply #13 on: May 23, 2007, 03:28:00 PM »

Er to be honest not really sure,  as I copied it from another usage else where.

Either way it doesnt work with or without it.. sad.gif

So my full code looks like this..
CODE

  200
    Fade_Dialog_OpenClose_Animation
    
    
    
    180
      485

    
        
            Media Overlay Image
            400
            75
            osd-player.png
        

        
        
      310
      -85
            Media Overlay Image
            75
            94
            osd-popup.png
      control.HasFocus(206) | control.HasFocus(207)
    



  
      400
      75
      OSD-rw_on.png
      Control.HasFocus(200)
    

    
      400
      75
      OSD-rw_off.png
      !Control.HasFocus(200)
    


    
      400
      75
      OSD-rwSkip_on.png
      Control.HasFocus(201)
    

    
      400
      75
      OSD-rwSkip_off.png
      !Control.HasFocus(201)
    


    
      400
      75
      OSD-pause_on.png
      Control.HasFocus(202)
    

    
      400
      75
      OSD-pause_off.png
      !Control.HasFocus(202)
    

    
      400
      75
      OSD-play_on.png
      Player.Paused
    




    
      400
      75
      OSD-stop_on.png
      Control.HasFocus(203)
    

    
      400
      75
      OSD-stop_off.png
      !Control.HasFocus(203)
    

    
      400
      75
      OSD-ffSkip_on.png
      Control.HasFocus(204)
    

    
      400
      75
      OSD-ffskip_off.png
      !Control.HasFocus(204)
    

    
      400
      75
      OSD-ff_on.png
      Control.HasFocus(205)
    

    
      400
      75
      OSD-ff_off.png
      !Control.HasFocus(205)
    

    
      400
      75
      OSD-options_on.png
      Control.HasFocus(206) | Control.HasFocus(207)
    

    
      400
      75
      OSD-options_off.png
      !Control.HasFocus(206) + !Control.HasFocus(207)
    



    
    
        true
            button
        200
        150
        485
        400
        75
        OSD-rw_off.png
        OSD-rw_on.png
        -
        XBMC.PlayerControls(Rewind)
        200
        201
        200
        200
      

      
      
          button
        201
        150
        485
        400
        75
        OSD-rwSkip_off.png
        OSD-rwSkip_on.png
        -
        XBMC.PlayerControls(Previous)
        200
        202
        201
        201
      

      
      
            button
        202
        150
        485
        400
        75
        OSD-pause_off.png
        OSD-pause_on.png
        -
        XBMC.PlayerControls(Pause)
        201
        203
        202
        202
      

      
      
            button
        203
        150
        485
        400
        75
        OSD-stop_off.png
        OSD-stop_on.png
        -
        XBMC.PlayerControls(Stop)
        202
        204
        203
        203
      


    
            button
        204
        150
        485
        400
        75
        OSD-ffSkip_off.png
        OSD-ffSkip_on.png
        -
        XBMC.PlayerControls(Next)
        203
        205
        204
        204
      

      
      
            button
        205
        150
        485
        400
        75
        OSD-ff_off.png
        OSD-ff_on.png
        -
        XBMC.PlayerControls(Forward)
        204
        206
        205
        205
      

      
      
          button
        206
        150
        485
        400
        75
        OSD-options_off.png
        OSD-options_on.png
        -
        205
        206
        207
        206
      

    
    
      
      control.HasFocus(206) | control.HasFocus(207)
      315
      -75
        Player Buttons control
                font12
                textcolor-grey
                ff009933
                205
                207
                5
                14
                vertical
                4
                0
                1
                false
                true
                
                    
                    
                    
                    
                    
                    
                
      
            

 
        

    



As you can see I am having to use the images for the controls,  rather than the texture on / offs I dont quite know what I have done that isnt working.. sad.gif    

End result it works,  but I think it could be tidier..

Logged

Jezz_X

  • Archived User
  • Hero Member
  • *
  • Posts: 2893
Animation Help Required.
« Reply #14 on: May 23, 2007, 04:19:00 PM »

easy
you got the group at <posy> of 485
and the buttons at posy of 485 which means they are getting drawn at pos y of 970 which is off the screen

QUOTE
   <controls>
    <control type="group">
    <posx>180</posx>
      <posy>485</posy>



and

QUOTE
   <control id="200">
        <visible>true</visible>
            <type>button</type>
        <id>200</id>
        <posx>150</posx>
        <posy>485</posy>
        <width>400</width>
        <height>75</height>
        <texturefocus>OSD-rw_off.png</texturefocus>
        <texturenofocus>OSD-rw_on.png</texturenofocus>
        <onfocus>-</onfocus>
        <onclick>XBMC.PlayerControls(Rewind)</onclick>
        <onleft>200</onleft>
        <onright>201</onright>
        <onup>200</onup>
        <ondown>200</ondown>
      </control>


and when you add yor work around it has no posy in it so it gets drawn at 485 + 0
QUOTE
However using this I get no images, I have a way around this by doing this in conjuntion with the above.

<control type="image">
<width>400</width>
<height>75</height>
<texture>OSD-rw_on.png</texture>
<visible>Control.HasFocus(200)</visible>
</control>
<control type="image">
<width>400</width>
<height>75</height>
<texture>OSD-rw_off.png</texture>
<visible>!Control.HasFocus(200)</visible>
</control>


This post has been edited by Jezz_X: May 23 2007, 11:19 PM
Logged
Pages: [1] 2