Esempio n. 1
0
 def close(self):
     """
     Closes the popup. Also switches to the main menu
     :return:
     """
     self.dismiss()
     screenmanager.change_to('main_menu')
Esempio n. 2
0
 def start_game(self):
     """
     Starts the game by switching to the ingame screen
     :return:
     """
     screenmanager.change_to('ingame')
Esempio n. 3
0
File: main.py Progetto: ohaz/Colours
# Multitouch emulation creates red dots on the screen. We don't need multitouch, so we disable it
Config.set('input', 'mouse', 'mouse,disable_multitouch')

# ---------------------
# Local initialisations
# ---------------------

# Initialise the screen manager (screens/screenmanager.py)
screenmanager.init()

# Add the two screens to it
screenmanager.set_screens([MainScreen(name='main_menu'), IngameScreen(name='ingame')])

# Start with the main menu screen
screenmanager.change_to('main_menu')


class ColoursApp(App):
    """
    The main Class.
    Only needed for the build function.
    """
    def build(self):
        """
        Method to build the app.
        :return: the screenmanager
        """
        return screenmanager.get_sm()

# Create the app and run it