TodayPlus Boards v2

TodayPlus for the Pocket PC Forums => Help and Support => Topic started by: tonyaross on August 23, 2005, 03:24:24 PM

Title: center the radar image
Post by: tonyaross on August 23, 2005, 03:24:24 PM
Is there a way to adjust the where the radar image is on the screen? The image that I download from Accuweather is off to the left, leaving a gap on the right of the screen. It's kinda ugly.

Thx!

T
Title: center the radar image
Post by: DeftOne on August 23, 2005, 04:39:06 PM
The easy answer is to just use the arrows at the bottom of the screen to move the image, but I understand that it gets a bit tedious to have to do this everytime you look at your radar, and it would be nice for it to center it automatically.  So....

Shifting the x coordinate of your radar image would involve changing a variable in several locations inside your skin file.  The variable in question is var3.  The default setting for this variable is:

var3=-8

This variable first gets defined during the button click event when you choose the Satellite & Radar option in the Weather Menu popup or when you click on the little radar image on the main weather page.  It also gets defined again later when refreshing the radar images using the refresh button on the radar pages.  It may even be defined yet again in other locations, I'd have to look.

Modifying all instances of this variable to whatever you needed to make up the offset in your radar image would work fine IF AND ONLY IF all your radar images needed to be offset by the same amount.  If that's not the case, then you would need to add some if/then statements to test for which radar image you are dealing with each time a button is clicked and then adjust it accordingly.

I guess the short answer is, yes you can do it, but it looks to me like it would be pretty involved.  Especially if some of your radar images need offset and some don't, or they need offset by different amounts.
Title: Re: center the radar image
Post by: Timmy on August 24, 2005, 03:32:25 AM
Quote from: tonyarossIs there a way to adjust the where the radar image is on the screen? The image that I download from Accuweather is off to the left, leaving a gap on the right of the screen. It's kinda ugly.

Thx!

T
@Tonyaross,

I, myself, use the program that is mentioned here: http://forums.jhollin1138.com/viewtopic.php?t=1827&postdays=0&postorder=asc&start=0  With this program I have all my ten (!) downloaded pictures exactly on the wished places.

I don't know if this is something you can use?!?

Timmy
Title: center the radar image
Post by: tonyaross on August 24, 2005, 04:58:03 PM
Thx, guys.

Timmy, I downloaded the radar.exe, but for some reason, it does not make a difference. The image is still of to the left. Something is not working right. Here is the New York portion of my radar.txt, just in case you may think that there's something wrong with that.

QuoteSURL=http://sirocco.accuweather.com/nx_mosaic_234X175c/sir/inmsirNY_.gif
STOR=\Program Files\TodayPlus\Images\Radar\2.gif
FORM=

It looks OK, right? I really wish this could work, that would make the whole much simpler.

Deftone: I was actually looking at this part of the code before I got your message:



image,6,20,1.png
image,6,20,1.gif
image,6,20,1.jpg


since the path in radar.txt is set to radar/1.gif. Again, I now realize that I was looking in the wrong place :oops: . I was also actually experimenting with var3, because I saw the code here:
load,city,%var9%

image,%var3%,%var23%,%var9%.png
image,%var3%,%var23%,%var9%.jpg
image,%var3%,%var23%,%var9%.gif


I changed two places where var3=-8, but did seem to make a difference. I think you are right, I need to look at all the cases involving var3 and play with it. School will start soon, but I already got my home work, it seems.  :wink:

Thank you (both) again!!!!


T
Title: center the radar image
Post by: Timmy on August 24, 2005, 05:11:41 PM
Quote from: tonyarossThx, guys.

Timmy, I downloaded the radar.exe, but for some reason, it does not make a difference. The image is still of to the left. Something is not working right. Here is the New York portion of my radar.txt, just in case you may think that there's something wrong with that.

QuoteSURL=http://sirocco.accuweather.com/nx_mosaic_234X175c/sir/inmsirNY_.gif
STOR=\Program Files\TodayPlus\Images\Radar\2.gif
FORM=

It looks OK, right? I really wish this could work, that would make the whole much simpler.

T

@Tonyaross,

My first message was only the half answer, as I realise now...

I use Uk_skinners program ImageViewer. And with this little program you can place your radarpic to every place you want on your screen. Everything about ImageViewer you can find here: http://forums.jhollin1138.com/viewtopic.php?t=1705&postdays=0&postorder=asc&start=0

You have to study a bit, but is realy worth doing it! Wish you succes!

Timmy
________________________________________
BTW: Your radar.txt lines are right. But NOTE: after the very-last line follows one empty line, OK?
Title: center the radar image
Post by: uk_skinner on August 24, 2005, 05:16:47 PM
Quote from: tonyarossThx, guys.

Timmy, I downloaded the radar.exe, but for some reason, it does not make a difference. The image is still of to the left. Something is not working right. Here is the New York portion of my radar.txt, just in case you may think that there's something wrong with that.

QuoteSURL=http://sirocco.accuweather.com/nx_mosaic_234X175c/sir/inmsirNY_.gif
STOR=\Program Files\TodayPlus\Images\Radar\2.gif
FORM=

It looks OK, right? I really wish this could work, that would make the whole much simpler.

Deftone: I was actually looking at this part of the code before I got your message:



image,6,20,1.png
image,6,20,1.gif
image,6,20,1.jpg


since the path in radar.txt is set to radar/1.gif. Again, I now realize that I was looking in the wrong place :oops: . I was also actually experimenting with var3, because I saw the code here:
load,city,%var9%

image,%var3%,%var23%,%var9%.png
image,%var3%,%var23%,%var9%.jpg
image,%var3%,%var23%,%var9%.gif


I changed two places where var3=-8, but did seem to make a difference. I think you are right, I need to look at all the cases involving var3 and play with it. School will start soon, but I already got my home work, it seems.  :wink:

Thank you (both) again!!!!


T

I think you are on the right track.  The specific position of image can be assigned in the skin (easier way) or through the regsitry key (hard way).  You probably need to use if.else to change the (x,y) with your var9.  I think I did it before..Mumm, need to dig my memory..
Title: center the radar image
Post by: Wichtel on August 24, 2005, 05:39:03 PM
var3 and var23 is responsible for the position of the picture.

You find it here in Region 3

//===================================
//CURRENT WEATHER DATA
//===================================

calcvar,var20,weatherupdatetimediff

if,var,var20,,<,240
todayicon,5,70,,t
.
.
.
.

imagebutton,177,78,Radar.png,t,7,4,6,-1
button,177,78,32,32,-1,6,var3=-8,
button,177,78,32,32,-1,6,var23=18,
button,177,78,32,32,-1,6,var25=0,
button,177,78,32,32,3,4,999
button,177,78,32,32,1,4,999



and here in Region 7,6

//======================================
// Control arrows
//======================================

.
.
.


imagebutton,113,236,refresh.png,t,-1,6,var3=-8,7  //Reset Image Position
button,113,236,13,13,-1,6,var23=18,7  //Reset Image Position


and in Region 7,7

imagebutton,113,236,refresh.png,t,-1,6,var3=-8,7  //Reset Image Position
button,113,236,13,13,-1,6,var23=18,7  //Reset Image Position


also in Region 8,0


text,91,160,Satellite & Radar,l
imagebutton,87,158,wetter_auswahl_popup_button.png,t,7,4,7,-1
button,87,158,100,15,-1,6,var51=1
button,87,158,100,15,-1,6,var3=-8
button,87,158,100,15,-1,6,var23=18
button,87,158,100,15,-1,6,var25=0
button,87,158,100,15,1,4,999
button,87,158,100,15,3,4,999
button,87,158,100,15,8,4,999


Change the entry -8 and 18 for the new position of the picture
Title: center the radar image
Post by: DeftOne on August 24, 2005, 05:48:56 PM
You can change those two variables in all those locations and it will move your images, but you need to be aware of the fact that it will move ALL your images to this new location.  So if you've got different sized images that line up on your screen in different locations, you're going to have to add some if/then statements to test for which image you're dealing with at each button click event.  I mentioned this in my original post, and uk_skinner also made reference to this.  If all of your images are the same size and located in the exact same place, then you can change these two variables without the need for if/then statements.

It looks like the ImageViewer application by uk_skinner that Timmy referenced would be the easier route, especially if you'd need to add if/then statements to your skin.  I think I might give it a try myself.  Very nice looking app, uk!!

@Timmy,

Hi!  Long time, no see!!!   :wink:
Title: center the radar image
Post by: tonyaross on August 24, 2005, 10:50:28 PM
hi, guys.

@Timmy, I figured out why that modified radar.exe didn't work on my PDA: I did not delete the .gif pics in my radar folder. So, I cleared the buffer and the radar folders, then re-loaded, and updated. It worked pretty well.

@Deftone, UK, & Wichtel, thank you so much for the help with var3 & var23. Even though the radar.exe works well, I still have to tinker with it a little bit, using the suggestions you give me, decreasing x by about 100, and y about 9. Now, I'm finally able to do what I wanted: download large or medium radar images, and then have them automatically centered around my city. It's still a little low on the screen, but it looks much better than the small images from accuweather for pda.

Truly appreciate all of your help!!!

T