예제 #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)
예제 #2
0
    def open_bubble_not_set(self, ti_not_set):

        float_lay = FloatLayout()
        float_lay.size_hint = None, None
        float_lay.width = 0
        float_lay.height = 0

        bubble_not_set = Bubble()
        bubble_not_set.size_hint = None, None
        bubble_not_set.width = 80
        bubble_not_set.height = 30
        bubble_not_set.center_x = ti_not_set.center_x
        bubble_not_set.center_y = ti_not_set.center_y - 30
        bubble_not_set.arrow_pos = 'top_mid'
        bubble_not_set.background_color = (1, 0, 0, 1)

        bt_not_set = BubbleButton()
        bt_not_set.font_size = 12

        bt_not_set.text = self.lang['Not_Set']

        bubble_not_set.add_widget(bt_not_set)

        float_lay.add_widget(bubble_not_set)

        #self.add_widget(bubble_not_set)
        self.lay_file_asc.add_widget(float_lay)
        parallel_close = threading.Thread(target=self.close_bubble_not_set,
                                          args=(float_lay, ))
        parallel_close.start()
예제 #3
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)
예제 #4
0
    def open_bubble_not_set(self, ti_not_set):

        float_lay = FloatLayout()
        float_lay.size_hint = None, None
        float_lay.width = 0
        float_lay.height = 0


        bubble_not_set = Bubble()
        bubble_not_set.size_hint = None, None
        bubble_not_set.width = 80
        bubble_not_set.height = 30
        bubble_not_set.center_x = ti_not_set.center_x
        bubble_not_set.center_y = ti_not_set.center_y - 30
        bubble_not_set.arrow_pos = 'top_mid'
        bubble_not_set.background_color = (1, 0, 0, 1)


        bt_not_set = BubbleButton()
        bt_not_set.font_size = 12

        bt_not_set.text = self.lang['Not_Set']

        bubble_not_set.add_widget(bt_not_set)

        float_lay.add_widget(bubble_not_set)

        #self.add_widget(bubble_not_set)
        self.lay_file_asc.add_widget(float_lay)
        parallel_close = threading.Thread(target=self.close_bubble_not_set, args=(float_lay,))
        parallel_close.start()
예제 #5
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