예제 #1
0
    def __init__(self):
        '''
        Constructor
        '''
        SogalForm.__init__(self, fading = True, fading_duration = 0.5, enableMask = True,backgroundColor= color_themes.ilia_bgColor)
        self.reparentTo(aspect2d,sort = 102)
        self.frame = DirectScrolledFrame(parent = self, canvasSize = SAVE_CANVAS_SIZE, 
                                         frameSize = FRAMESIZE, 
                                         autoHideScrollBars = AUTO_HIDE_SCROLLBARS,
                                         **color_themes.ilia_frame)

        self.labels = []
        self.labelDict = {}
        self.vbox = VLayout(parent = self.frame.getCanvas(), margin = vspacing)
        hbox = None
        self.__dumped = None
        for i in range(1,MAX_SAVE + 1):
            fname = 'save' + str(i)
            head = str(i)
            label = SaveLoadLabel(command = self.save, always_enable = True, fileName = fname, head = head,extraArgs = [fname],style = color_themes.ilia_button)
            self.labels.append(label)
            self.labelDict[label.getFileName()] = label
            if not hbox:
                hbox = HLayout(margin = hspacing)
                self.vbox.append(hbox)
                hbox.append(label)
            else:
                hbox.append(label)
                hbox = None
예제 #2
0
    def __init__(self):
        '''
        Constructor
        '''
        SogalForm.__init__(self,
                           fading=True,
                           fading_duration=0.5,
                           enableMask=True,
                           backgroundColor=color_themes.sirius_bgColor)
        self.reparentTo(aspect2d, sort=102)

        self.frame = DirectScrolledFrame(
            parent=self,
            canvasSize=LOAD_CANVAS_SIZE,
            frameSize=FRAMESIZE,
            autoHideScrollBars=AUTO_HIDE_SCROLLBARS,
            **color_themes.sirius_frame)

        self.labels = []
        self.labelDict = {}
        self.vbox = VLayout(parent=self.frame.getCanvas(), margin=vspacing)

        hbox = None
        self.__dumped = None

        pos2 = MAX_SAVE + runtime_data.MAX_QUICKSAVE
        pos3 = MAX_SAVE + runtime_data.MAX_QUICKSAVE + runtime_data.MAX_AUTOSAVE
        for i in range(1, pos3 + 1):
            if i <= MAX_SAVE:
                fname = 'save' + str(i)
                head = str(i)
            elif MAX_SAVE < i <= pos2:
                index = i - MAX_SAVE
                fname = 'quick_save' + str(index)
                head = 'Quick Save ' + str(index)
            elif pos2 < i <= pos3:
                index = i - pos2
                fname = 'auto_save' + str(index)
                head = 'Auto Save ' + str(index)

            label = SaveLoadLabel(command=self.load,
                                  always_enable=False,
                                  fileName=fname,
                                  head=head,
                                  extraArgs=[fname],
                                  style=color_themes.sirius_button)
            self.labels.append(label)
            self.labelDict[label.getFileName()] = label
            if not hbox:
                hbox = HLayout(margin=hspacing)
                self.vbox.append(hbox)
                hbox.append(label)
            else:
                hbox.append(label)
                hbox = None
예제 #3
0
    def __init__(self):
        '''
        Constructor
        '''
        SogalForm.__init__(self, fading = True, fading_duration = 0.5, enableMask = True,backgroundColor=color_themes.sirius_bgColor)
        self.reparentTo(aspect2d,sort = 102)

        self.frame = DirectScrolledFrame(parent = self, canvasSize = LOAD_CANVAS_SIZE, 
                                         frameSize = FRAMESIZE, 
                                         autoHideScrollBars = AUTO_HIDE_SCROLLBARS,
                                         **color_themes.sirius_frame)
 
        self.labels = []
        self.labelDict = {}
        self.vbox = VLayout(parent = self.frame.getCanvas(), margin = vspacing)
        
        hbox = None
        self.__dumped = None
        
        pos2 = MAX_SAVE + runtime_data.MAX_QUICKSAVE
        pos3 = MAX_SAVE + runtime_data.MAX_QUICKSAVE + runtime_data.MAX_AUTOSAVE
        for i in range(1,  pos3 + 1):
            if i <= MAX_SAVE:
                fname = 'save' + str(i)
                head = str(i)
            elif MAX_SAVE < i <= pos2:
                index = i - MAX_SAVE
                fname = 'quick_save' + str(index)
                head = 'Quick Save ' + str(index)
            elif pos2 < i <= pos3:
                index = i - pos2
                fname = 'auto_save' + str(index)
                head = 'Auto Save ' + str(index)
                
            label = SaveLoadLabel(command = self.load, always_enable = False,
                                  fileName = fname, head = head, extraArgs = [fname],style = color_themes.sirius_button)
            self.labels.append(label)
            self.labelDict[label.getFileName()] = label
            if not hbox:
                hbox = HLayout(margin = hspacing)
                self.vbox.append(hbox)
                hbox.append(label)
            else:
                hbox.append(label)
                hbox = None
예제 #4
0
    def __init__(self):
        '''
        Constructor
        '''
        SogalForm.__init__(self,
                           fading=True,
                           fading_duration=0.5,
                           enableMask=True,
                           backgroundColor=color_themes.ilia_bgColor)
        self.reparentTo(aspect2d, sort=102)
        self.frame = DirectScrolledFrame(
            parent=self,
            canvasSize=SAVE_CANVAS_SIZE,
            frameSize=FRAMESIZE,
            autoHideScrollBars=AUTO_HIDE_SCROLLBARS,
            **color_themes.ilia_frame)

        self.labels = []
        self.labelDict = {}
        self.vbox = VLayout(parent=self.frame.getCanvas(), margin=vspacing)
        hbox = None
        self.__dumped = None
        for i in range(1, MAX_SAVE + 1):
            fname = 'save' + str(i)
            head = str(i)
            label = SaveLoadLabel(command=self.save,
                                  always_enable=True,
                                  fileName=fname,
                                  head=head,
                                  extraArgs=[fname],
                                  style=color_themes.ilia_button)
            self.labels.append(label)
            self.labelDict[label.getFileName()] = label
            if not hbox:
                hbox = HLayout(margin=hspacing)
                self.vbox.append(hbox)
                hbox.append(label)
            else:
                hbox.append(label)
                hbox = None