Updating the clock hands.
open default.xip/hard_drive.xap
search for
control DEF theHardDriveMenuJoy Joystick
make it look like this
CODE
function OnActivate()
{
UpdateListClockHands();
CurrentViewpoint = theHardDriveMenuViewpoint;
CurrentAltViewpoint = AlternateHardDriveMenuViewpoint;
EnableAudio();
}
behavior
{
sleep 15;
UpdateListClockHands();
}
under this is a list of var's, add these 2 to it..
CODE
var nClockHour;
var nClockMinute;
goto the bottom of the file and add this
CODE
function UpdateListClockHands()
{
var c = theHardDriveMenu.children[0].children[0];
var d = new Date;
nClockHour = d.getHours();
nClockMinute = d.getMinutes();
c.ClockHourHand.SetRotation(0, 0, -1, (nClockHour + nClockMinute / 60) * 6.283 / 12);
c.ClockMinuteHand.SetRotation(0, 0, -1, (nClockMinute - 15) * 6.283 / 60);
}
think thats it...
oh yeah, like I said b4, for any other menu.. it should be the same (so for the mainmenu orb, def thebigclock (from the other post) needs to go into mainmenu.xip/default.xap, and the clockupdate from this file needs to go in the defaul.xip/default.xap. The differences are in
"theHardDriveMenu.children[0].children[0]; " and "DEF theHardDriveMenuJoy Joystick" havent done it yet, but I am pretty sure, when Ive got something (working) I will update this thread...