CommonClient: Expand on make_gui docstring (#4449)
* adds docstring to make_gui describing what things you might want to change without dealing with kivy/kvui directly (there are better places to document those) * Update CommonClient.py Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com> * Update CommonClient.py Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com> --------- Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									96b941ed35
								
							
						
					
					
						commit
						90417e0022
					
				| 
						 | 
				
			
			@ -709,8 +709,16 @@ class CommonContext:
 | 
			
		|||
        logger.exception(msg, exc_info=exc_info, extra={'compact_gui': True})
 | 
			
		||||
        self._messagebox_connection_loss = self.gui_error(msg, exc_info[1])
 | 
			
		||||
 | 
			
		||||
    def make_gui(self) -> typing.Type["kvui.GameManager"]:
 | 
			
		||||
        """To return the Kivy App class needed for run_gui so it can be overridden before being built"""
 | 
			
		||||
    def make_gui(self) -> "type[kvui.GameManager]":
 | 
			
		||||
        """
 | 
			
		||||
        To return the Kivy `App` class needed for `run_gui` so it can be overridden before being built
 | 
			
		||||
 | 
			
		||||
        Common changes are changing `base_title` to update the window title of the client and
 | 
			
		||||
        updating `logging_pairs` to automatically make new tabs that can be filled with their respective logger.
 | 
			
		||||
 | 
			
		||||
        ex. `logging_pairs.append(("Foo", "Bar"))`
 | 
			
		||||
        will add a "Bar" tab which follows the logger returned from `logging.getLogger("Foo")`
 | 
			
		||||
        """
 | 
			
		||||
        from kvui import GameManager
 | 
			
		||||
 | 
			
		||||
        class TextManager(GameManager):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue