Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. from kivy.app import App
  2. from kivy.clock import Clock
  3. from functools import partial
  4. from kivy.uix.floatlayout import FloatLayout
  5. from kivy.config import Config
  6. from kivy.core.window import Window
  7. from kivy.core.window import WindowBase
  8. from kivy.lang import Builder
  9. from kivy.uix.label import Label
  10. from kivy.uix.screenmanager import ScreenManager, Screen
  11.  
  12. class Labels(Label):
  13. pass
  14.  
  15.  
  16. def info(WindowType: Screen, InfoOne: str, InfoTwo: str, InfoThree: str, InfoFour: str):
  17. for i in range(len(InfoOne)):
  18. lbl = Labels()
  19. lbl.text = str(f'''{InfoOne[i]}\n\n{InfoTwo[i]}\n{InfoThree[i]}\n\n{InfoFour[i]}''')
  20. lbl.text_size = 500, None
  21. lbl.halign = 'center'
  22. lbl.size = (10, 10)
  23. lbl.pos = -250, (200 - (200 * i))
  24. lbl.font_size = 16
  25. WindowType.add_widget(lbl, 0)
  26.  
  27. class SortieScreen(Screen):
  28.  
  29. def __init__(self, **kw):
  30. super(SortieScreen, self).__init__(**kw)
  31. layout = FloatLayout()
  32. self.add_widget(layout)
  33. info(self, "Hello", "Hello", "Hello", "Hello")
  34.  
  35.  
  36. class ScreenManagement(ScreenManager):
  37. pass
  38.  
  39.  
  40. class WarframeInfo(App):
  41. def build(self):
  42. self.icon = 'Assets/icon.png'
  43. self.title = "Warframe Info"
  44. return Builder.load_file('warframeinfo.kv')
  45.  
  46.  
  47. WarframeInfo().run()
  48.  
  49.  
  50. ############### KV FILE ###########################
  51. #: import FadeTransition kivy.uix.screenmanager.FadeTransition
  52.  
  53. ScreenManagement:
  54. transition: FadeTransition()
  55. MainScreen:
  56. CetusScreen:
  57. VallisScreen:
  58. SortieScreen:
  59. BaroScreen:
  60. NightwaveScreen:
  61.  
  62.  
  63. <SortieScreen>:
  64. name: 'sortie'
  65. canvas:
  66. Rectangle:
  67. source: 'Assets/sortie.png'
  68. size: self.size
  69. pos: self.pos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement