Visible alarm countdown and/or warning after set duration.
#1
I'm using the stable Atlantis build for the Xbox.

I like the 30, 60, 120 and Custom settings of the Shutdown timer but I want to add a set of warnings before the system shuts down, in case I want to cancel or check how much time is left. I would like to try implementing it myself; just need some pointers on how to do it.

Here are some pictures so you can get an idea of what I'm trying to achieve:

Image
Fig. 1: Home screen: This is my modified version of PM3.HD for standard definition. Notice warning sign in top right.

Image
Fig. 2: Fullscreen video: Same warning. I want to add a ticking countdown so you can check the time remaining with the CodecInfo or View Mode button.

Image
Fig. 3: Fullscreen video: A window in the same style as the skin's shutdown menu that stays up for the minutes of the timer countdown.

I've had trouble finding out which string holds the countdown timer and how to get it to display onscreen (The strings.xml file refers to it as %im%is). I've tried looking for it within the Online Manual with no success. It's probably something really simple. I know you can make an OSD display this because when you cancel a shutdown timer it tells you "Cancelled with xxx left". I just need to know how to recall that string so I can edit it into the skin XML files.

Thanks!
Reply
#2
there is system.hasalarm() for visibility conditions, and system.alarmpos for position. i'm not entirely sure that they work since nobody has ever used them afaik.
Reply
#3
spiff Wrote:there is system.hasalarm() for visibility conditions, and system.alarmpos for position. i'm not entirely sure that they work since nobody has ever used them afaik.

I tried them and they do work! I had to play around with the settings for a while to get the desired effect. Here's the code I've added to VideoFullScreen.xml so you can check the time with CodecInfo or View Mode dialogues. I've made it so an extra line of text and background appears when you have the shutdown timer set.

Quote: <control type="image">
<description>shutdown timer bg</description>
<visible>System.HasAlarm(shutdowntimer) + [Control.IsVisible(10) - Window.IsVisible(142)]</visible>
<posx>0</posx>
<posy>110</posy>
<width>1280</width>
<height>30</height>
<texture>black-back.png</texture>
</control>
<control type="label" id="15">
<visible>System.HasAlarm(shutdowntimer) + [Control.IsVisible(10) - Window.IsVisible(142)]</visible>
<description>Shutdown Timer label</description>
<posx>430</posx>
<posy>100</posy>
<label>System will power off in $INFO[System.Alarmpos].</label>
<font>font12</font>
</control>

The only thing I can't figure out, after several hours of trying, is how to use Boolean conditions to make the same dialogue (that would only appear when the CodecInfo or ViewMode dialogues are visible) permanently appear on the screen when there is only, say, five minutes remaining until the timer runs out.
Reply
#4
This is what my little modification did, and I also made some minor modifications to the DialogFullScreenInfo.xml file as well, to add more IMDb data to movies and TV shows.

Image
Reply
#5
zackpliskin Wrote:The only thing I can't figure out, after several hours of trying, is how to use Boolean conditions to make the same dialogue (that would only appear when the CodecInfo or ViewMode dialogues are visible) permanently appear on the screen when there is only, say, five minutes remaining until the timer runs out.

I may be wrong here, but couldn't you create an include with your desired code and then include it in the bottom of every window.
Maybe copy the notification dialog....
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#6
watzen Wrote:I may be wrong here, but couldn't you create an include with your desired code and then include it in the bottom of every window.
Maybe copy the notification dialog....

I see what you mean but that would affix the timer permanently whenever it was on. I just want it to stay up when there's only 5 minutes left. As it's not been done before I don't know if it can be.
Reply
#7
I have added a patch on the trac with a new visibilitycondition.
system.alarmlessorequal([timername],[seconds])

normally the skin sets the shutdown alarm to be called "shutdowntimer". So when the shutdowntimer has less or equal to 3 minutes this will return true:
system.alarmlessorequal(shutdowntimer,180)

http://www.xbmc.org/trac/ticket/5561
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#8
It's in the svn with r17118

Usage:
http://www.xbmc.org/wiki/?title=List_of_...Conditions
  • Livingroom - C2D E8400, P5N7A-VM on a Samsung 46" LE46M86 FullHD via HDMI
  • Kitchen - ASRock 330 HT Displayed on a Samsung Lapfit 22" dual touch screen LD220Z
  • Bedroom - LG Laptop on a 32" tv
Reply
#9
Watzen, I'd buy you a pint if I could. Now I have a reason to upgrade to the latest build of XBMC - to test out this new feature.

You know technically this means you can use the Xbox as a cooking timer or similar. Is there nothing it can't do?
Reply

Logout Mark Read Team Forum Stats Members Help
Visible alarm countdown and/or warning after set duration.0