screens.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Mobile-TetriNET 作者: Smug28 项目源码 文件源码
def __init__(self, **kwargs):   # inicializace
        super(PartylineScreen, self).__init__(**kwargs)
        self.root.insertStrings.append((self, "STR_PARTYLINE"))
        self.input = TextInput(size_hint=(.8, .07), pos_hint={'x':.08, 'y':.024})
        self.output = Label(markup=True, font_name='font/Roboto-Regular.ttf', font_size='16dp', size_hint_y = None)
        self.SLayout = GridLayout(size_hint_y = None, cols=1, spacing=0)
        self.SLayout.bind(minimum_height=self.SLayout.setter('height'))
        self.scroll = ScrollView(size_hint=(1,.9), pos_hint={'center_x': .58, 'y': .125}, scroll_timeout=10000)
        self.scroll.do_scroll_x = False
        self.scroll.add_widget(self.SLayout)
        self.SLayout.add_widget(self.output)
        self.layout = RelativeLayout(size_hint=(.75, .83), pos_hint={'center_x': .437, 'y': .02})
        self.send = DelButton(color=(1,1,1,0), text='SEND', size_hint=(None, .1), pos_hint={'x':.88, 'y':.022}, background_normal='crop/icons/send.png', background_down='crop/icons/send.png')
        self.send.bind(on_press=self.sendMsg)
        self.input.bind(focus=self.on_focus)
        self.layout.content.add_widget(self.scroll)
        self.layout.content.add_widget(self.input)
        self.layout.content.add_widget(self.send)
        self.add_widget(self.layout)
        if self.root.onAndroid():
            self.LayouFocusOn = Animation(size_hint_y=.5, pos_hint={'center_x': .437, 'y': .38}, duration=.2)
            self.LayouFocusOut = Animation(size_hint_y=.83, pos_hint={'center_x': .437, 'y': .02}, duration=.2)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号