コード例 #1
0
def animate_in(anim=True):
    """Fade in all the map actors."""
    for i in range(Gst.get_int('animation-steps') if anim else 1, 0, -1):
        for actor in (Crosshair, Box, Scale):
            actor.set_opacity(256 - i)
        Widgets.redraw_interface()
        sleep(0.01)
コード例 #2
0
ファイル: actor.py プロジェクト: TheNeuralBit/gottengeography
def animate_in(anim=True):
    """Fade in all the map actors."""
    for i in range(Gst.get_int('animation-steps') if anim else 1, 0, -1):
        for actor in (Crosshair, Box, Scale):
            actor.set_opacity(256 - i)
        Widgets.redraw_interface()
        sleep(0.01)
コード例 #3
0
ファイル: search.py プロジェクト: telkel/gottengeography
 def search_completed(self, entry, model, itr):
     """Go to the selected location."""
     self.last_search = itr.copy()
     MapView.emit('realize')
     MapView.set_zoom_level(MapView.get_max_zoom_level())
     Widgets.redraw_interface()
     MapView.center_on(*model.get(itr, LATITUDE, LONGITUDE))
     MapView.set_zoom_level(11)
コード例 #4
0
 def offset_handler(self, *ignore):
     """When the offset is changed, update the loaded photos."""
     for i, photo in enumerate(self.photos):
         if not i % 10:
             Widgets.redraw_interface()
         photo.calculate_timestamp(self.offset)
コード例 #5
0
 def offset_handler(self, *ignore):
     """When the offset is changed, update the loaded photos."""
     for i, photo in enumerate(self.photos):
         if not i % 10:
             Widgets.redraw_interface()
         photo.calculate_timestamp(self.offset)