예제 #1
0
 def opt3_datas(self):
     p_lLines = {'text': "Background Music",
                 'color_val': "type_color_1"}
     try: self.m_oBGMClass
     except: self.m_oBGMClass = background_music()
     value = self.m_oBGMClass.check()
     p_lLines.update({'value': value})
     return p_lLines
예제 #2
0
 def opt4(self, p_iJoy = None, p_iLine = None):
     try: self.m_oBGMClass
     except: self.m_oBGMClass = background_music()
     p_lLines = {}
     if p_iJoy == None:
         return self.opt4_datas()
     if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT:
         list = self.m_lLines[p_iLine]['options']
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value, list)
         if new:
             new = int(new.replace("%", ''))
             vol = self.m_oBGMClass.change_volume(new)
             if vol == new: self.m_lLines[p_iLine]['value'] = str(new) + "%"
예제 #3
0
 def opt6_datas(self):
     try: self.m_oBGMClass
     except: self.m_oBGMClass = background_music()
     p_lLines = {'text': "Tracks",
                 'color_val': "type_color_7"}
     m_lOpt = []
     if self.m_oBGMClass.check():
         value = self.m_oBGMClass.get_tracks()
         if not value: value = 0
         if value == 1: value = str(value) + " File"
         else: value = str(value) + " Files"
     else:
         value = "--"
     p_lLines.update({'value': value})
     return p_lLines
예제 #4
0
 def opt6(self, p_iJoy = None, p_iLine = None):
     try: self.m_oBGMClass
     except: self.m_oBGMClass = background_music()
     p_lLines = {}
     if p_iJoy == None:
         return self.opt6_datas()
     if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT:
         list = self.m_lLines[p_iLine]['options']
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value, list)
         if new:
             self.info("Changing Folder", "icon_clock")
             self.m_oBGMClass.change_music(new)
             value = self.m_oBGMClass.get_active_folder()
             self.m_lLines[p_iLine]['value'] = value
             self.info()
예제 #5
0
 def opt4_datas(self):
     try: self.m_oBGMClass
     except: self.m_oBGMClass = background_music()
     p_lLines = {'text': "Music Volume",
                 'color_val': "type_color_1"}
     m_lOpt = []
     if self.m_oBGMClass.check():
         for i in range(10, 110, 10):
             m_lOpt.append(str(i) + "%")
         p_lLines.update({'options': m_lOpt})
         value = int(ini_get(CRT_UTILITY_FILE, "music_volume"))
         value = str(int(math.ceil(value / 10.0)) * 10) + "%"
     else:
         value = "--"
         p_lLines.update({'color_val': "type_color_7"})
     p_lLines.update({'value': value})
     return p_lLines
예제 #6
0
 def opt5_datas(self):
     try: self.m_oBGMClass
     except: self.m_oBGMClass = background_music()
     p_lLines = {'text': "Music Folder",
                 'color_val': "type_color_1"}
     m_lOpt = []
     if self.m_oBGMClass.check():
         list = self.m_oBGMClass.get_folders()
         value = self.m_oBGMClass.get_active_folder()
         if len(list) == 1:
             p_lLines.update({'color_val': "type_color_7"})
     else:
         value = "--"
         list = None
         p_lLines.update({'color_val': "type_color_7"})
     p_lLines.update({'value': value})
     p_lLines.update({'options': list})
     return p_lLines