NetTalk Central

The Rest Of NetTalk => The Rest - Ask For Help => Topic started by: Alberto on February 25, 2021, 06:23:37 AM

Title: NetMaps how to show a number over the icon.
Post by: Alberto on February 25, 2021, 06:23:37 AM
Hi Bruce, I need to show a number over each Icon.
Ive tried with

            x# = ((ppqc:Longitud - net.LongitudeX) / net.LongitudePerPixel)
            y# = ((net.LatitudeY - ppqc:Latitud) / net.LatitudePerPixel)
            b" = '1'
            !MESSAGE(net.LatitudeY&' '&net.LongitudeX&' '&x#&' '&y#&' '&clip(b"))
            net.draw.setPenWidth(3)
            net.draw.setPenColor(COLOR:Black)
            net.draw._ShowFull(x#,y#,clip(b"))   

HOw to do it?
Thanks

Title: Re: NetMaps how to show a number over the icon.
Post by: Alberto on March 22, 2021, 10:47:05 AM
Now Im using the IconIndex param to set the nuember and showing it using

      Compile('***',_DRAW_=1)
      if pIconIndex>10
          !MESSAGE('dibuja nr '&pIconIndex)
          self.draw.Show(px+10,py+20,clip(pIconIndex-10))
      END
      *** 

after the _DrawIcon parent call.

It works but it this safe?
Title: Re: NetMaps how to show a number over the icon.
Post by: Bruce on March 22, 2021, 11:35:58 PM
safe in what way? thread-safe?
Title: Re: NetMaps how to show a number over the icon.
Post by: Alberto on March 23, 2021, 03:24:46 AM
Safe in the way that pIconIndex is suppoused to be the icon number in the icon file... but its working ok this way.