<reponame>taylorstjean/contact-trace
from kivy.app import App
from kivy.core.window import Window

__version__ = '1.4.1'

try:
    import functions
    import security
    import settings
    import gui
    import storage
except ModuleNotFoundError:
    raise Exception('Missing Critical Modules')


def main():
    functions.TableFunc().cleanup()
    Window.softinput_mode = 'below_target'
    Root().run()


class Root(App):

    def build(self):
        self.icon = './images/icon.png'

        Window.clearcolor = settings.BACKGROUND_COLOR
        return gui.MasterRoot()

    def on_pause(self):
        return True

    def on_start(self):
        from kivy.base import EventLoop
        EventLoop.window.bind(on_keyboard=self.hook_keyboard)

    def hook_keyboard(self, window, key, *largs):
        if key == 27:
            return True


if __name__ == '__main__':
    main()

from kivy.app import App
from kivy.core.window import Window

__version__ = '1.4.1'

try:
    import functions
    import security
    import settings
    import gui
    import storage
except ModuleNotFoundError:
    raise Exception('Missing Critical Modules')


def main():
    functions.TableFunc().cleanup()
    Window.softinput_mode = 'below_target'
    Root().run()


class Root(App):

    def build(self):
        self.icon = './images/icon.png'

        Window.clearcolor = settings.BACKGROUND_COLOR
        return gui.MasterRoot()

    def on_pause(self):
        return True

    def on_start(self):
        from kivy.base import EventLoop
        EventLoop.window.bind(on_keyboard=self.hook_keyboard)

    def hook_keyboard(self, window, key, *largs):
        if key == 27:
            return True


if __name__ == '__main__':
    main()