File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,18 @@ def on_tracker_events(self, events: list[str]):
213213        if  events :
214214            self .ui .update_tracker_and_locations_table (update_highlights = True )
215215
216+     def  run_gui (self ):
217+         """Import kivy UI system from make_gui() and start running it as self.ui_task.""" 
218+         if  hasattr (SuperContext , "make_gui" ):
219+             # Call the real one if it exists 
220+             return  super ().run_gui ()
221+ 
222+         # This is a copy of 0.5.1's run_gui, because backporting is easier than the alternative. 
223+         # This entire function can be removed once 0.5.1 is the old enough. 
224+         ui_class  =  self .make_gui ()
225+         self .ui  =  ui_class (self )
226+         self .ui_task  =  asyncio .create_task (self .ui .async_run (), name = "UI" )
227+ 
216228    def  make_gui (self ) ->  typing .Type ["kvui.GameManager" ]:
217229        ui  =  super ().make_gui ()  # before the kivy imports so kvui gets loaded first 
218230
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments