TodayPlus Boards v2

TodayPlus for the Pocket PC Forums => Help and Support => Topic started by: joelw135 on January 11, 2004, 11:22:43 AM

Title: Changing color
Post by: joelw135 on January 11, 2004, 11:22:43 AM
I wanted to change the high temp to red and the low to green.  The low temp color change works, but the high temp two days don't change to red. Please look at code below and tell me why. Thanks.

   //=================================================
   // REGION 3 - PAGE 0
   //   Weather forecast
   //   Vars used: 1
   //=================================================
      region,3,0,-1
      
      initvar,var0,1      
      
      if,var,var0,,>,%var29%
         storevar,var0=1
      else
      endif
            
      load,city,%var0%

         calcvar,var20,firstvalidforecastday
         
         if,var,var20,,<,6
            forecasticon,%var20%,8,11,,t
            button,5,0,46,54,3,4,200,1
            button,5,0,46,54,-1,6,var1=%var20%
            forecast,date_ddd,%var20%,22,0,,,c
color,font,255_0_0
            forecast,high,%var20%,51,16,,,r
color,font,0_255_0
            forecast,low,%var20%,51,28,,,r
color,font,-1_4_-1
            forecast,precipitation,%var20%,23,40,R: ,%,c
            addvar,var20,1
         else
            image,8,11,none.png,t
         endif
         
         if,var,var20,,<,6
            forecasticon,%var20%,54,11,,t
            button,51,0,46,54,3,4,200,1
            button,51,0,46,54,-1,6,var1=%var20%
            forecast,date_ddd,%var20%,69,0,,,c
color,font,255_0_0            
            forecast,high,%var20%,97,16,,,r
color,font,0_255_0
            forecast,low,%var20%,97,28,,,r
color,font,-1_4_-1
            forecast,precipitation,%var20%,74,40,R: ,%,c            
            addvar,var20,1
         else
            image,54,11,none.png,t
         endif
         
         if,var,var20,,<,6
            forecasticon,%var20%,100,11,,t
            button,97,0,46,54,3,4,200,1
            button,97,0,46,54,-1,6,var1=%var20%
            forecast,date_ddd,%var20%,115,0,,,c         

color,font,255_0_0
            forecast,high,%var20%,143,16,,,r
color,font,0_255_0
            forecast,low,%var20%,143,28,,,r
color,font,-1_4_-1
            forecast,precipitation,%var20%,120,40,R: ,%,c            
            addvar,var20,1
         else
            image,100,11,none.png,t
         endif
         
         if,var,var20,,<,6
            forecasticon,%var20%,146,11,,t
            button,143,0,46,54,3,4,200,1
            button,143,0,46,54,-1,6,var1=%var20%
            forecast,date_ddd,%var20%,161,0,,,c
color,font,255_0_0            
            forecast,high,%var20%,189,16,,,r
color,font,0_255_0
            forecast,low,%var20%,189,28,,,r
color,font,-1_4_-1
            forecast,precipitation,%var20%,166,40,R: ,%,c
            addvar,var20,1
         else
            image,146,11,none.png,t
         endif
         
         if,var,var20,,<,6
            forecasticon,%var20%,192,11,,t
            button,189,12,46,42,3,4,200,1
            button,189,12,46,42,-1,6,var1=%var20%
            button,189,0,36,12,3,4,200,1
            button,189,0,36,54,-1,6,var1=%var20%
            forecast,date_ddd,%var20%,207,0,,,c
color,font,255_0_0   
            forecast,high,%var20%,235,16,,,r
color,font,0_255_0
            forecast,low,%var20%,235,28,,,r
color,font,-1_4_-1
            forecast,precipitation,%var20%,212,40,R: ,%,c
            addvar,var20,1
         else
            image,192,11,none.png,t
         endif
         
      endif
      
         
      offsetadd,0,54
      endregion,3,0
Title: Changing color
Post by: Blazingwolf on January 11, 2004, 06:19:36 PM
joelw135, That works for me just like you have it. Not sure why you would be having a problem.