Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. #:import random random
  2. <CustButton@Button>:
  3. font_size: 32
  4.  
  5.  
  6. BoxLayout:
  7. orientation: 'horizontal'
  8.  
  9. BoxLayout:
  10. orientation: 'vertical'
  11.  
  12. Logo:
  13.  
  14. GridLayout:
  15. cols: 1
  16. rows: 4
  17.  
  18.  
  19. BoxLayout:
  20. orientation: 'vertial'
  21.  
  22. Header:
  23.  
  24. GridLayout:
  25. CalcGridLayout:
  26. canvas.before:
  27. Rectangle:
  28. source: 'lights.jpg'
  29. pos: self.pos
  30. size: self.size
  31.  
  32. id: calculator
  33. rows: 8
  34. padding: 0
  35. spacing: 0
  36.  
  37. BoxLayout:
  38. spacing: 0
  39. CustButton:
  40. on_press:
  41. self.background_down= random.choice(["images/track/horizontal.png","images/track/cross.png"])
  42. background_normal: "images/track/cross.png"
  43. background_color: (1,1,1,1)
  44. CustButton:
  45. on_press:
  46. self.background_down= random.choice(["images/track/horizontal.png","images/track/cross.png"])
  47. background_normal: "images/track/cross.png"
  48. background_color: (1,0,0,1)
  49. CustButton:
  50. on_press: progress_bar.value += 1
  51. CustButton:
  52. on_press: progress_bar.value += 1
  53.  
  54. BoxLayout:
  55. spacing: 0
  56. CustButton:
  57. on_press: entry.text += self.text
  58. Image:
  59. source: "images/track/vertical.png"
  60. y: self.parent.y + self.parent.height - 100
  61. x: self.parent.x
  62. size: 100, 100
  63. allow_stretch: True
  64. CustButton:
  65. on_press: progress_bar.value += 1
  66. CustButton:
  67. on_press: progress_bar.value += 1
  68. CustButton:
  69. on_press: progress_bar.value += 1
  70.  
  71. BoxLayout:
  72. spacing: 0
  73. CustButton:
  74. on_press: progress_bar.value += 1
  75. CustButton:
  76. on_press: progress_bar.value += 1
  77. CustButton:
  78. on_press: progress_bar.value += 1
  79. CustButton:
  80. on_press: progress_bar.value += 1
  81.  
  82. BoxLayout:
  83. spacing: 0
  84. CustButton:
  85. on_press: progress_bar.value += 1
  86. CustButton:
  87. on_press: progress_bar.value += 1
  88. CustButton:
  89. on_press: progress_bar.value += 1
  90. CustButton:
  91. on_press: progress_bar.value += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement