Beispiel #1
0
    def __init__(self, **kwargs):
        super(UiowaScreen, self).__init__(**kwargs)

        layout = FloatLayout()
        layout.width = Window.width
        layout.height = Window.height
        layout.x = Window.width / 2 - layout.width / 2
        layout.y = Window.height / 2 - layout.height / 2
        self.add_widget(layout)

        img = Image(source=self.uiowaImage)
        img.size = (Window.width * 1.0, Window.height * 1.0)
        img.pos = (-Window.width * 0.0, -Window.height * 0.0)
        img.opacity = 0.4
        self.add_widget(img)

        aboutText = Label(text='UIOWA INFO HERE')
        aboutText.pos = (.25, .25)
        self.add_widget(aboutText)

        backBtn = MyButton(text='BACK')  #start button
        backBtn.size_hint = (.1, .1)
        backBtn.pos_hint = {'x': 0, 'y': .9}
        backBtn.background_color = [.4, .4, .4, 1]
        backBtn.bind(
            on_release=self.backButton
        )  #when the button is released the backButton function is called
        layout.add_widget(backBtn)
Beispiel #2
0
    def __init__(self, **kwargs):
        super(AboutScreen, self).__init__(**kwargs)

        layout = FloatLayout()
        layout.width = Window.width
        layout.height = Window.height
        layout.x = Window.width / 2 - layout.width / 2
        layout.y = Window.height / 2 - layout.height / 2
        self.add_widget(layout)

        img = Image(source=self.aboutImage)
        img.size = (Window.width * 1.0, Window.height * 1.0)
        img.pos = (-Window.width * 0.0, -Window.height * 0.0)
        img.opacity = 0.4
        self.add_widget(img)

        aboutText = Label(
            text=
            'GravBox is the interface application for the Augmented Reality (AR) Sandbox for gravitational dynamics simulations designed and built\nby Dr. Hai Fu\'s Introduction to Astrophysics class during the 2016-2017 academic year and beyond.\nGravBox itself was designed by Zachary Luppen, Erin Maier, and Mason Reed.\n\nAR Sandbox is the result of an NSF-funded project on informal science education for freshwater lake and watershed science developed by the\nUC Davis\' W.M. Keck Center for Active Visualization in the Earth Sciences (KeckCAVES),\ntogether with the UC Davis Tahoe Environmental Research Center, Lawrence Hall of Science, and ECHO Lake Aquarium and Science Center.',
            halign='center',
            valign='center')
        aboutText.pos = (.25, .25)
        self.add_widget(aboutText)

        backBtn = MyButton(text='BACK')  # back button
        backBtn.size_hint = (.1, .1)
        backBtn.pos_hint = {'x': 0, 'y': .90}
        backBtn.background_color = [.4, .4, .4, 1]
        backBtn.bind(
            on_release=self.backButton
        )  #when the button is released the callback function is called
        self.add_widget(backBtn)
Beispiel #3
0
    def __init__(self, **kwargs):
        super(WelcomeScreen, self).__init__(**kwargs)

        layout = FloatLayout(
        )  #Float Layout for positioning buttons and image anywhere on the screen
        layout.width = Window.width  #the float layout is the size of the window
        layout.height = Window.height
        layout.x = Window.width / 2 - layout.width / 2  #sets the x position of the layout to 0
        layout.y = Window.height / 2 - layout.height / 2  #sets the y position of the layout to 0
        self.add_widget(layout)  #adds the layout to the screen

        img = Image(source=self.welcomeImage)  #BACKGROUND IMAGE
        img.size = (Window.width * 1.0, Window.height * 1.0)
        img.pos = (-Window.width * 0.0, -Window.height * 0.0)
        img.opacity = 1.0  #alpha value between 0.0 - 1.0
        self.add_widget(img)  #adds the image to the screen

        startBtn = MyButton(text='')  #start button
        startBtn.size_hint = (.21, .09)
        startBtn.pos_hint = {'x': .395, 'y': .24}
        startBtn.background_color = [
            .306, .325, .4196, .4
        ]  #backgroundcolor of the button (this is grayish)
        startBtn.bind(
            on_release=self.changer
        )  #when the button is released the changer function is called
        self.add_widget(
            startBtn)  #adds the button called startButton to the floatlayout

        aboutBtn = MyButton(text='')  #about button
        aboutBtn.size_hint = (.08, .095)
        aboutBtn.pos_hint = {'x': .618, 'y': 0}
        aboutBtn.background_color = [.4, .4, .4, .4]
        aboutBtn.bind(
            on_release=self.about
        )  #when the button is released the about function is called
        self.add_widget(
            aboutBtn)  #adds the button called aboutBtn to the floatlayout

        uiowaBtn = MyButton(text='')  #uiowa button
        uiowaBtn.size_hint = (.08, .095)
        uiowaBtn.pos_hint = {'x': .7, 'y': 0}
        uiowaBtn.background_color = [.4, .4, .4, .4]
        uiowaBtn.bind(
            on_release=self.uiowa
        )  #when the button is released the uiowa function is called
        self.add_widget(
            uiowaBtn)  #adds the button called uiowaBtn to the floatlayout