xboxscene.org forums

Pages: [1] 2

Author Topic: Home Ip & Weather Display Update  (Read 152 times)

slumberpod77

  • Archived User
  • Hero Member
  • *
  • Posts: 523
Home Ip & Weather Display Update
« on: April 13, 2006, 02:13:00 AM »

i have updated the code i was using for my Home.xml file to use the same sort of animation as the other floating elements, and figured it would prove useful to someone to post the code here.
here's what it looks like:
(IMG:http://static.flickr.com/1/127822624_71899accee.jpg)
the weather displays in the top right & the IP address in the lower left. these displays fade in & out depending on network connection, meaning if you unplug your cable or lose connection they will fade out, and will fade in when you plug back in and XBMC gets a connection again. the new animation tags make the IP address slide the left offscreen (just like the rest of the buttons), and the weather conditions slide from the right.
put this code at the end of your HOME.XML file, before the </controls></window> tags.

CODE

    ip address label
    label
    0
    190
    503
    network.ipaddress
    right
    special12
    system.hasnetwork
    VisibleChange
    WindowOpen
    WindowClose



    Weather conditions
    image
    1
    633
    25
    45
    49
    Weather.Conditions
    98FFFFFFF
    system.hasnetwork
    VisibleChange
    WindowOpen
    WindowClose



    Weather Location
    label
    1
    625
    15
    Weather.Location
    special12
    right
    system.hasnetwork
    VisibleChange
    WindowOpen
    WindowClose



    Weather conditions
    label
    1
    585
    45
    130
    49
    right
    Weather.Conditions
    98FFFFFFF
    system.hasnetwork
    VisibleChange
    WindowOpen
    WindowClose



    Weather Temperature
    label
    1
    625
    45
    Weather.Temperature
    special12
    right
    system.hasnetwork
    VisibleChange
    WindowOpen
    WindowClose

Logged

mike315

  • Archived User
  • Full Member
  • *
  • Posts: 207
Home Ip & Weather Display Update
« Reply #1 on: April 13, 2006, 07:45:00 AM »

that IS useful...i was looking to get fade working...now i dont have to since you did...

thanks  (IMG:style_emoticons/default/love.gif)
Logged

imamafackinhokie

  • Archived User
  • Sr. Member
  • *
  • Posts: 327
Home Ip & Weather Display Update
« Reply #2 on: April 13, 2006, 10:13:00 AM »

great job, just which home.xml are you editing in the pmII folder? The one in the Pal or Pal 16x9 folders>?
Logged

slumberpod77

  • Archived User
  • Hero Member
  • *
  • Posts: 523
Home Ip & Weather Display Update
« Reply #3 on: April 13, 2006, 10:33:00 AM »

sorry, forgot to specify, it's the "regular" 4:3 PAL, not 16:9. if somebody has a 16:9 display to use, they could most likely just use my code & change the <posx> and <posy> tags to fix the element positions (IMG:style_emoticons/default/wink.gif) the new skin animations are the bomb, they impress everyone i show them to!
Logged

bconnolly

  • Archived User
  • Newbie
  • *
  • Posts: 10
Home Ip & Weather Display Update
« Reply #4 on: April 13, 2006, 11:02:00 AM »

Very cool if for no other reason than the code is useful for adding in elements with animation.  It looks a little bit cluttered, though.  That's not really anything you can help given the nature of a small tv display.
Logged

slumberpod77

  • Archived User
  • Hero Member
  • *
  • Posts: 523
Home Ip & Weather Display Update
« Reply #5 on: April 13, 2006, 01:05:00 PM »

i am happy with the weather, my positioning is set up mostly for my own TV, which is an old horrible CRT box, so the stuff goes right to the edge of my screen. i am not 100% happy with the IP address, but haven't figured out a better place for it yet...
Logged

bconnolly

  • Archived User
  • Newbie
  • *
  • Posts: 10
Home Ip & Weather Display Update
« Reply #6 on: April 13, 2006, 01:48:00 PM »

QUOTE(slumberpod77 @ Apr 13 2006, 11:36 AM) *

i am happy with the weather, my positioning is set up mostly for my own TV, which is an old horrible CRT box, so the stuff goes right to the edge of my screen. i am not 100% happy with the IP address, but haven't figured out a better place for it yet...


You know, it'd be cool if you could make a button control to toggle between weather and ip (have them both in the top right corner).  Hit the button control once and it switches them or once more to hide.  Not sure how you would implement this without interfering with the rest of XBMC's UI, though.  Are there any free buttons (or combinations of buttons) that could be used?
Logged

slumberpod77

  • Archived User
  • Hero Member
  • *
  • Posts: 523
Home Ip & Weather Display Update
« Reply #7 on: April 13, 2006, 02:40:00 PM »

wouldn't the white button be ok for this? currently they aren't using it in the Home page, and they just started using the black button to toggle vis on/off, so it would be very intuitive i think.
i'll have a look at the code and see if i can grasp the syntax.
-QuickEdit-
it appears that the Skin.HasSetting(HomeViewToggle) in the <visible> tag is where the black button toggle does its thing, so i will now try and hunt down more info on that...

-QuickEdit again-
there's an entry in the <Home> section of Keymap.xml where the toggle is set:
CODE

    
      XBMC.Skin.ToggleSetting(HomeViewToggle)
    


will try and get this working without breaking stuff (IMG:style_emoticons/default/wink.gif)

This post has been edited by slumberpod77: Apr 13 2006, 09:47 PM
Logged

slumberpod77

  • Archived User
  • Hero Member
  • *
  • Posts: 523
Home Ip & Weather Display Update
« Reply #8 on: April 13, 2006, 03:00:00 PM »

ok, got it working. as i suspected, you can simply add a function to the white button for the Home section of the Keymap.xml like this:
<white>XBMC.Skin.ToggleSetting(HomeViewToggle2)</white>
then, you can call that in the <visible> tag. i am using this:

<visible>system.hasnetwork + !Skin.HasSetting(HomeViewToggle2)</visible>

for the weather
and this:

<visible>system.hasnetwork + Skin.HasSetting(HomeViewToggle2)</visible>

for the IP display. that way it defaults to weather and then you can swap between the two with the white button.
before i put up the new code, i want to add a second line to the IP address part. right now it looks kinda stupid when you switch to it, because the weather is 2 lines of text + a graphic.
where would i find a list of the stuff i can get from the <info>network.[insert parameter here]</info> tag?
Logged

slumberpod77

  • Archived User
  • Hero Member
  • *
  • Posts: 523
Home Ip & Weather Display Update
« Reply #9 on: April 13, 2006, 04:47:00 PM »

found it here:
http://manual.xboxmediacenter.de/wakka.php...nfoLabels&v=1tj
unfortunately, the IP address is the ONLY network-related piece of information you can display (correct me if i'm wrong please). the only thing on the list that makes any sense to me to use as my second line for the network display is the Xbox's nickname. what do you folks think? other stuff on that list seem better? i know the XLink Kai Nick is on the list but i don't use Kai (IMG:style_emoticons/default/sad.gif).

This post has been edited by slumberpod77: Apr 13 2006, 11:52 PM
Logged

slumberpod77

  • Archived User
  • Hero Member
  • *
  • Posts: 523
Home Ip & Weather Display Update
« Reply #10 on: April 14, 2006, 03:03:00 PM »

OK.
i am basically "done" with the new version of this mod.
here's the alternate display:
(IMG:http://static.flickr.com/47/128528714_cb4223e5b2_o.png)
the mod displays that OR the weather (as seen above) when a network connection is detected. you switch between the two using the white button, and all tags use proper animation.

the Nick is your Xbox's nickname, which you can usually set in the Auto-Detect section of the Network Settings. it is used when you have more than one Xbox running XBMC on the same network (like we have data trading parties out here, and it's a great feature for that).
you must modify two XML files for this.

-in your Keymap.xml, find the <home> section. inside there you will see a controller section which looks like this:
CODE


      XBMC.Skin.ToggleSetting(HomeViewToggle)



add a line like so:
CODE


      XBMC.Skin.ToggleSetting(HomeViewToggle)
      XBMC.Skin.ToggleSetting(HomeViewToggle2)



-inside the Skins\PMIII\PAL directory you will see Home.xml.
inside of that, between the last <control> tag and the </controls> tag, add the following code:

CODE


    Nickname Label
    label
    0
    580
    15
    
    right
    special12
    system.hasnetwork + Skin.HasSetting(HomeViewToggle2)
    VisibleChange
    WindowOpen
    WindowClose




    Nickname Display
    label
    0
    585
    15
    System.XboxNickName
    left
    special12
    system.hasnetwork + Skin.HasSetting(HomeViewToggle2)
    VisibleChange
    WindowOpen
    WindowClose



    IP Address Label
    label
    0
    537
    45
    
    right
    special12
    system.hasnetwork + Skin.HasSetting(HomeViewToggle2)
    VisibleChange
    WindowOpen
    WindowClose



    IP Address Display
    label
    0
    666
    45
    Network.IPAddress
    right
    special12
    system.hasnetwork + Skin.HasSetting(HomeViewToggle2)
    VisibleChange
    WindowOpen
    WindowClose



    Weather conditions
    image
    1
    633
    25
    45
    49
    Weather.Conditions
    98FFFFFFF
    system.hasnetwork + !Skin.HasSetting(HomeViewToggle2)
    VisibleChange
    WindowOpen
    WindowClose



    Weather Location
    label
    1
    625
    15
    Weather.Location
    special12
    right
    system.hasnetwork + !Skin.HasSetting(HomeViewToggle2)
    VisibleChange
    WindowOpen
    WindowClose



    Weather conditions
    label
    1
    585
    45
    130
    49
    right
    Weather.Conditions
    98FFFFFFF
    system.hasnetwork + !Skin.HasSetting(HomeViewToggle2)
    VisibleChange
    WindowOpen
    WindowClose



    Weather Temperature
    label
    1
    625
    45
    Weather.Temperature
    special12
    right
    system.hasnetwork + !Skin.HasSetting(HomeViewToggle2)
    VisibleChange
    WindowOpen
    WindowClose



what do you guys think?
Logged

imamafackinhokie

  • Archived User
  • Sr. Member
  • *
  • Posts: 327
Home Ip & Weather Display Update
« Reply #11 on: April 19, 2006, 09:19:00 PM »

great job, could you edit the x y positions for widescreen?
Logged

anoobie

  • Archived User
  • Jr. Member
  • *
  • Posts: 57
Home Ip & Weather Display Update
« Reply #12 on: May 02, 2006, 04:55:00 PM »

Logged

autoxerFSP21

  • Archived User
  • Jr. Member
  • *
  • Posts: 63
Home Ip & Weather Display Update
« Reply #13 on: May 02, 2006, 05:25:00 PM »

I pasted the code in from the first post into my PAL 16X9 home.xml and the placement looks fine. Here's a screenshot at 1080i:

(IMG:http://plaza.ufl.edu/zachg432/screenshot.jpg)

Thanks a lot slumberpod!

This post has been edited by autoxerFSP21: May 3 2006, 12:27 AM
Logged

imamafackinhokie

  • Archived User
  • Sr. Member
  • *
  • Posts: 327
Home Ip & Weather Display Update
« Reply #14 on: May 02, 2006, 07:02:00 PM »

anoobie is that a belt buckel?

And I think its a bit too big.
Logged
Pages: [1] 2