def opt3(self, p_iJoy=None, p_iLine=None):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     p_lLines = {}
     if p_iJoy == None:
         return self.opt3_datas()
     if p_iJoy & CRT_OK:
         if not self.m_oNETClass.status():
             self.info("Enable Netplay", "icon_info")
             time.sleep(2)
             self.info()
         return
     if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT:
         if not self.m_oNETClass.status(): return
         list = self.m_lLines[p_iLine]['options']
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value, list)
         if new and new == self.m_oNETClass.mode(new).title():
             self.m_lLines[p_iLine]['value'] = new
             if new.lower() == "host":
                 self.info([
                     "Check your router", "has configured port",
                     "NAT to your raspberry"
                 ], "icon_info")
                 time.sleep(2)
                 self.info()
 def opt5(self, p_iJoy=None, p_iLine=None):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     if p_iJoy == None:
         return self.opt5_datas()
     if p_iJoy & CRT_OK:
         if not self.m_oNETClass.status():
             self.info("Enable Netplay", "icon_info")
             time.sleep(2)
             self.info()
             return
         elif self.m_oNETClass.get_mode() == "host":
             self.info("You are in HOST mode", "icon_info")
             time.sleep(2)
             self.info()
             return
         value = self.m_lLines[p_iLine]['value']
         new = self._launch_kbd(value)
         if new and new == self.m_oNETClass.host(new):
             self.m_lLines[p_iLine]['value'] = new
         else:
             self.info("Wrong IP", "icon_info")
             time.sleep(2)
             self.info()
 def opt1_datas(self):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     p_lLines = {'text': "Enable Netplay", 'icon': None}
     value = self.m_oNETClass.status()
     p_lLines.update({'value': value})
     return p_lLines
 def opt2_datas(self):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     p_lLines = {'text': "Ask before play", 'icon': None}
     if not self.m_oNETClass.status():
         p_lLines.update({'value': "--"})
         p_lLines.update({'color_val': "type_color_7"})
         return p_lLines
     value = self.m_oNETClass.get_ask()
     p_lLines.update({'value': value})
     return p_lLines
 def opt4_datas(self):
     try: self.m_oNETClass
     except: self.m_oNETClass = netplay()
     p_lLines = {'text': "Stateless Mode",
                 'color_val': "type_color_1",
                 'icon': None}
     if not self.m_oNETClass.status():
         value = "--"
         p_lLines.update({'color_val': "type_color_7"})
     else:
         value = self.m_oNETClass.get_stateless()
     p_lLines.update({'value': value})
     return p_lLines
 def opt1(self, p_iJoy=None, p_iLine=None):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     if p_iJoy == None:
         return self.opt1_datas()
     if p_iJoy & CRT_OK:
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value)
         if new: cfg = self.m_oNETClass.enable()
         else: cfg = self.m_oNETClass.disable()
         self.m_lLines[p_iLine]['value'] = cfg
 def opt3_datas(self):
     try: self.m_oNETClass
     except: self.m_oNETClass = netplay()
     p_lLines = {'text': "Netplay Public Announce",
                 'color_val': "type_color_1",
                 'icon': None}
     if not self.m_oNETClass.status():
         value = "--"
         p_lLines.update({'color_val': "type_color_7"})
     elif self.m_oNETClass.get_mode().lower() == "client":
         value = "N/A"
         p_lLines.update({'color_val': "type_color_7"})
     else: value = self.m_oNETClass.get_lobby()
     p_lLines.update({'value': value})
     return p_lLines
 def opt4(self, p_iJoy = None, p_iLine = None):
     try: self.m_oNETClass
     except: self.m_oNETClass = netplay()
     if p_iJoy == None:
         return self.opt4_datas()
     if p_iJoy & CRT_OK:
         if not self.m_oNETClass.status():
             self.info("Enable Netplay", "icon_info")
             time.sleep(2)
             self.info()
             return
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value)
         if new: cfg = self.m_oNETClass.stateless_enable()
         else: cfg = self.m_oNETClass.stateless_disable()
         self.m_lLines[p_iLine]['value'] = cfg
 def opt6_datas(self):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     p_lLines = {
         'text': "Port",
         'color_val': "type_color_1",
         'icon': "icon_edit"
     }
     if not self.m_oNETClass.status():
         p_lLines.update({'value': "--"})
         p_lLines.update({'color_val': "type_color_7"})
         return p_lLines
     value = self.m_oNETClass.get_port()
     p_lLines.update({'value': value})
     return p_lLines
 def opt4(self, p_iJoy=None, p_iLine=None):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     if p_iJoy == None:
         return self.opt4_datas()
     if p_iJoy & CRT_OK:
         if not self.m_oNETClass.status():
             self.info("Enable Netplay", "icon_info")
             time.sleep(2)
             self.info()
             return
         value = self.m_lLines[p_iLine]['value']
         new = self._launch_kbd(value).strip()
         if new and new == self.m_oNETClass.nick(new):
             self.m_lLines[p_iLine]['value'] = new
 def opt3(self, p_iJoy = None, p_iLine = None):
     try: self.m_oNETClass
     except: self.m_oNETClass = netplay()
     if p_iJoy == None:
         return self.opt3_datas()
     if p_iJoy & CRT_OK:
         if not self.m_oNETClass.status():
             self.info("Enable Netplay", "icon_info")
             time.sleep(2)
             self.info()
             return
         if self.m_oNETClass.get_mode().lower() == "client": return
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value)
         if new: cfg = self.m_oNETClass.lobby_enable()
         else: cfg = self.m_oNETClass.lobby_disable()
         self.m_lLines[p_iLine]['value'] = cfg
 def opt3_datas(self):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     p_lLines = {
         'text': "Connect Mode",
         'color_val': "type_color_1",
         'icon': None
     }
     if not self.m_oNETClass.status():
         p_lLines.update({'value': "--"})
         p_lLines.update({'color_val': "type_color_7"})
         return p_lLines
     value = self.m_oNETClass.get_mode().title()
     p_lLines.update({'options': ["Host", "Client"]})
     p_lLines.update({'value': value})
     return p_lLines
 def opt1_datas(self):
     try: self.m_oNETClass
     except: self.m_oNETClass = netplay()
     p_lLines = {'text': "Latency Frames",
                 'color_val': "type_color_1",
                 'icon': None}
     if not self.m_oNETClass.status():
         value = "--"
         p_lLines.update({'color_val': "type_color_7"})
         options = None
     else:
         p_lOpt = []
         for i in range(1, 16): p_lOpt.append(i)
         options = p_lOpt
         value = self.m_oNETClass.get_lframes()
     p_lLines.update({'options': options})
     p_lLines.update({'value': value})
     return p_lLines
 def opt5_datas(self):
     try:
         self.m_oNETClass
     except:
         self.m_oNETClass = netplay()
     p_lLines = {
         'text': "Remote Host",
         'color_val': "type_color_1",
         'icon': "icon_edit"
     }
     if not self.m_oNETClass.status():
         value = "--"
         p_lLines.update({'color_val': "type_color_7"})
     elif self.m_oNETClass.get_mode() == "host":
         value = "N/A"
         p_lLines.update({'color_val': "type_color_7"})
     else:
         value = self.m_oNETClass.get_host()
     p_lLines.update({'value': value})
     return p_lLines
 def opt1(self, p_iJoy = None, p_iLine = None):
     try: self.m_oNETClass
     except: self.m_oNETClass = netplay()
     p_lLines = {}
     if p_iJoy == None:
         return self.opt1_datas()
     if p_iJoy & CRT_OK:
         if not self.m_oNETClass.status():
             self.info("Enable Netplay", "icon_info")
             time.sleep(2)
             self.info()
         return
     if p_iJoy & CRT_LEFT or p_iJoy & CRT_RIGHT:
         if not self.m_oNETClass.status(): return
         list = self.m_lLines[p_iLine]['options']
         value = self.m_lLines[p_iLine]['value']
         new = explore_list(p_iJoy, value, list)
         if new:
             value = self.m_oNETClass.lframes(new)
             if value == new:
                 self.m_lLines[p_iLine]['value'] = new