Ejemplo n.º 1
0
def test_save_load_window_position():
    x1 = Dice.roll()[0]
    y1 = Dice.roll()[0]
    prefs.save_window_position(playername, window_name, x1, y1)
    x2, y2 = prefs.load_window_position(playername, window_name)
    assert x2 == x1
    assert y2 == y1
Ejemplo n.º 2
0
 def cb_configure_event(self, event, unused):
     if self.playername:
         x, y = self.get_position()
         prefs.save_window_position(self.playername, self.__class__.__name__, x, y)
         width, height = self.get_size()
         prefs.save_window_size(self.playername, self.__class__.__name__, width, height)
     return False
Ejemplo n.º 3
0
def test_save_load_window_position():
    x1 = Dice.roll()[0]
    y1 = Dice.roll()[0]
    prefs.save_window_position(playername, window_name, x1, y1)
    x2, y2 = prefs.load_window_position(playername, window_name)
    assert x2 == x1
    assert y2 == y1
Ejemplo n.º 4
0
 def cb_configure_event(self, event, unused):
     if self.playername:
         x, y = self.get_position()
         prefs.save_window_position(self.playername,
                                    self.__class__.__name__, x, y)
         width, height = self.get_size()
         prefs.save_window_size(self.playername, self.__class__.__name__,
                                width, height)
     return False