示例#1
0
文件: main.py 项目: Somal/Trages
def main_menu():
        #Window.fullscreen=True
        Window.clearcolor=(1,140.0/255,15.0/255,0)
        Menu=BoxLayout(orientation='vertical')
        title = Label(
            text='Trages',
            markup=True,
            bold=True,
            color=(79.0/255,15.0/255,204.0/255,0),
            font_name='RAVIE.ttf',
            font_size='100dp',
            y=Window.height/2-25,
            x=-Window.width/2+100,
            size_hint=(1,0.3)
        )
        Menu.add_widget(title)
        
        root=Accordion(orientation='vertical')

        ButtonChildren=Button(text='Press here for children education',size_hint=(1,0.3))
        ButtonChildren.bind(on_press=go_children)

        s1='This version of software\n is a new method of \nteaching children.\n It allows one to make \nlearning process \nmore interactive and \nsimple due to gaming form.'
        LabelChildren=Label(text=s1, font_name='RAVIE.ttf',font_size='20dp',max_lines=4,shorten=True,color=(113.0/255,17.0/255,150.0/255,1))       
        BoxLayoutChildren=BoxLayout(orientation='horizontal')
        BoxLayoutChildren2=BoxLayout(orientation='vertical')
        BoxLayoutChildren2.add_widget(LabelChildren)
        BoxLayoutChildren2.add_widget(ButtonChildren)
        ImageChildren=Image(source='childeduc.bmp')
        BoxLayoutChildren.add_widget(ImageChildren)
        BoxLayoutChildren.add_widget(BoxLayoutChildren2)
        
        children=AccordionItem(title='Children Education')      
        children.add_widget(BoxLayoutChildren)
        
        ###
        ButtonGame=Button(text='Press here for testing',size_hint=(1,.3))
        ButtonGame.bind(on_press=go_game)
        s2='This version of software\n is a new method of \ntesting children.\n It allows one to make \ntesting process \nmore interactive and \nsimple due to gaming form.'
        LabelGame=Label(text=s2, font_name='RAVIE.ttf',font_size='20dp',max_lines=4,shorten=True,color=(113.0/255,17.0/255,150.0/255,1))       
        BoxLayoutGame=BoxLayout(orientation='horizontal')
        BoxLayoutGame2=BoxLayout(orientation='vertical')
        BoxLayoutGame2.add_widget(LabelGame)
        BoxLayoutGame2.add_widget(ButtonGame)
        ImageGame=Image(source='forgame.bmp')
        BoxLayoutGame.add_widget(ImageGame)
        BoxLayoutGame.add_widget(BoxLayoutGame2)
                                 
        game=AccordionItem(title='Game!')
        game.add_widget(BoxLayoutGame)
        ###     
        BoxLayoutInfo=BoxLayout(orientation='horizontal')
        ImageInfo=Image(source='command.jpg')
        BoxLayoutInfo.add_widget(ImageInfo)
        LabelInfo=Label(text='We are command from \nN.Novgorod,Russia.\nWe are Max and Anna.\nWe want to help \ndeaf-mute people,\nso we created\n this application.',font_size='25dp',font_name='RAVIE.ttf',color=(113.0/255,17.0/255,150.0/255,1))
        BoxLayoutInfo.add_widget(LabelInfo)
        info=AccordionItem(title='About us')
        info.add_widget(BoxLayoutInfo)

        ButtonExit=Button(text='Exit')
        ButtonExit.bind(on_press=go_exit)
        ButtonExit.size_hint=(1,.1)

        #rexit=AccordionItem(title='Exit')
        #rexit.add_widget(ButtonExit)
        
        root.add_widget(children)
        root.add_widget(game)
        root.add_widget(info)
        #root.add_widget(rexit)
        root.current=children
        Menu.add_widget(root)
        Menu.add_widget(ButtonExit)

        return Menu
示例#2
0
def main_menu():
    #Window.fullscreen=True
    Window.clearcolor = (1, 140.0 / 255, 15.0 / 255, 0)
    Menu = BoxLayout(orientation='vertical')
    title = Label(text='Trages',
                  markup=True,
                  bold=True,
                  color=(79.0 / 255, 15.0 / 255, 204.0 / 255, 0),
                  font_name='RAVIE.ttf',
                  font_size='100dp',
                  y=Window.height / 2 - 25,
                  x=-Window.width / 2 + 100,
                  size_hint=(1, 0.3))
    Menu.add_widget(title)

    root = Accordion(orientation='vertical')

    ButtonChildren = Button(text='Press here for children education',
                            size_hint=(1, 0.3))
    ButtonChildren.bind(on_press=go_children)

    s1 = 'This version of software\n is a new method of \nteaching children.\n It allows one to make \nlearning process \nmore interactive and \nsimple due to gaming form.'
    LabelChildren = Label(text=s1,
                          font_name='RAVIE.ttf',
                          font_size='20dp',
                          max_lines=4,
                          shorten=True,
                          color=(113.0 / 255, 17.0 / 255, 150.0 / 255, 1))
    BoxLayoutChildren = BoxLayout(orientation='horizontal')
    BoxLayoutChildren2 = BoxLayout(orientation='vertical')
    BoxLayoutChildren2.add_widget(LabelChildren)
    BoxLayoutChildren2.add_widget(ButtonChildren)
    ImageChildren = Image(source='childeduc.bmp')
    BoxLayoutChildren.add_widget(ImageChildren)
    BoxLayoutChildren.add_widget(BoxLayoutChildren2)

    children = AccordionItem(title='Children Education')
    children.add_widget(BoxLayoutChildren)

    ###
    ButtonGame = Button(text='Press here for testing', size_hint=(1, .3))
    ButtonGame.bind(on_press=go_game)
    s2 = 'This version of software\n is a new method of \ntesting children.\n It allows one to make \ntesting process \nmore interactive and \nsimple due to gaming form.'
    LabelGame = Label(text=s2,
                      font_name='RAVIE.ttf',
                      font_size='20dp',
                      max_lines=4,
                      shorten=True,
                      color=(113.0 / 255, 17.0 / 255, 150.0 / 255, 1))
    BoxLayoutGame = BoxLayout(orientation='horizontal')
    BoxLayoutGame2 = BoxLayout(orientation='vertical')
    BoxLayoutGame2.add_widget(LabelGame)
    BoxLayoutGame2.add_widget(ButtonGame)
    ImageGame = Image(source='forgame.bmp')
    BoxLayoutGame.add_widget(ImageGame)
    BoxLayoutGame.add_widget(BoxLayoutGame2)

    game = AccordionItem(title='Game!')
    game.add_widget(BoxLayoutGame)
    ###
    BoxLayoutInfo = BoxLayout(orientation='horizontal')
    ImageInfo = Image(source='command.jpg')
    BoxLayoutInfo.add_widget(ImageInfo)
    LabelInfo = Label(
        text=
        'We are command from \nN.Novgorod,Russia.\nWe are Max and Anna.\nWe want to help \ndeaf-mute people,\nso we created\n this application.',
        font_size='25dp',
        font_name='RAVIE.ttf',
        color=(113.0 / 255, 17.0 / 255, 150.0 / 255, 1))
    BoxLayoutInfo.add_widget(LabelInfo)
    info = AccordionItem(title='About us')
    info.add_widget(BoxLayoutInfo)

    ButtonExit = Button(text='Exit')
    ButtonExit.bind(on_press=go_exit)
    ButtonExit.size_hint = (1, .1)

    #rexit=AccordionItem(title='Exit')
    #rexit.add_widget(ButtonExit)

    root.add_widget(children)
    root.add_widget(game)
    root.add_widget(info)
    #root.add_widget(rexit)
    root.current = children
    Menu.add_widget(root)
    Menu.add_widget(ButtonExit)

    return Menu