Speedtest using python kivy

161 Views Asked by At

I wrote the back end of a speed test and now I am trying to make a graphical user interface that dynamically shows the fluctuations in a speed test on a gauge until it gets the speed. But I couldn't, I just made it in a static way for now. any suggestions to make it? and I want to make a loading effect too when the speed function is searching for the best server. any ideas?? enter image description here

1

There are 1 best solutions below

0
John Anderson On

You will need to put the speedometer needle in its own Image, then use Rotate to set its angle. Something like this:

Image:
    source: 'needle.png'                                                                                                                                       
    canvas.before:                                                                                                                                             
        PushMatrix                                                                                                                                             
        Rotate:                                                                                                                                                
            angle: root.angle                                                                                                                                  
            axis: (0, 0, 1)                                                                                                                                    
            origin: (0,0,0) # position of the center of rotation of the needle                                                                                                                            
    canvas.after:                                                                                                                                              
        PopMatrix