Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #:import C kivy.utils.get_color_from_hex
- #: import FadeTransition kivy.uix.screenmanager.FadeTransition
- AppScreenManager:
- transition: FadeTransition()
- LoginScreen:
- ActivitySelectScreen:
- PaintApp:
- <LoginScreen>:
- name: "LoginScreen"
- BoxLayout:
- orientation: 'vertical'
- padding: [200,75,200,75]
- spacing: 20
- Label:
- text:"Username:"
- font_size:25
- TextInput:
- id:username
- font_size:35
- Label:
- text:"Password:"
- font_size:25
- TextInput:
- id:password
- font_size:35
- password:True
- BoxLayout:
- orientation: 'horizontal'
- Button:
- border: (3, 3, 3, 3)
- spacing: 20
- text:"Login"
- font_size:25
- bold: True
- on_release: root.autheciate()
- Button:
- text:"Create Account"
- border: (3, 3, 3, 3)
- font_size:25
- spacing: 20
- bold: True
- on_release: root.create_account()
- <ActivitySelectScreen>:
- name:"ActivitySelectScreen"
- BoxLayout:
- orientation: 'vertical'
- padding: [225,200,225,200]
- spacing: 10
- orientation: 'vertical'
- Button:
- border: (3, 3, 3, 3)
- text:"Start Server"
- font_size:25
- height: 70
- bold: True
- on_release: app.root.current= 'PaintApp';app.root.get_screen('PaintApp').ids.canvas_widget.start_server()
- Button:
- border: (3, 3, 3, 3)
- text:"Connect to Server"
- font_size:25
- height: 40
- bold: True
- on_release: app.root.current= 'PaintApp';app.root.get_screen('PaintApp').ids.canvas_widget.server_username_popup()
- Button:
- border: (3, 3, 3, 3)
- text:"Back"
- font_size:25
- height: 40
- bold: True
- on_release: app.root.current= 'LoginScreen'
- <RadioButton>
- border: (3, 3, 3, 3)
- <ColorButton@RadioButton>:
- group: 'color'
- background_normal: 'color_button_normal.png'
- background_down: 'color_button_down.png'
- <LineWidthButton@RadioButton>:
- group: 'line_width'
- <PaintApp>:
- name: "PaintApp"
- BoxLayout:
- orientation:'vertical'
- CanvasWidget:
- id: canvas_widget
- size_hint_y:.95
- BoxLayout:
- size_hint:(1,None)
- size_hint_y:.05
- orientation: 'horizontal'
- Button:
- text: 'Exit'
- on_release: canvas_widget.delete_server();app.stop()
- right: root.right -80
- top: root.top
- width: 80
- height: 40
- Button:
- text: 'Save'
- on_release: canvas_widget.save()
- right: root.right
- top: root.top
- width: 80
- height: 40
- LineWidthButton:
- text: 'Thin'
- on_release:canvas_widget.line_width=1
- LineWidthButton:
- text: 'Normal'
- state: 'down'
- on_release:canvas_widget.line_width=2
- LineWidthButton:
- text: 'Thick'
- on_release:canvas_widget.line_width=4
- ColorButton:
- background_color: C('#2980b9')
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#16a085')
- state: 'down'
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#27ae60')
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#f39c12')
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#d35400')
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#c0392b')
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#8e44ad')
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#bdc3c7')
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#7f8c8d')
- on_release: canvas_widget.set_color(self.background_color)
- ColorButton:
- background_color: C('#2c3e50')
- on_release: canvas_widget.set_color(self.background_color)
- Button:
- text: 'Delete'
- on_release: canvas_widget.clear_canvas()
- right: root.right
- top: root.top
- width: 80
- height: 40
Add Comment
Please, Sign In to add comment