main_screen.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import pygame
  2. import config_manager as config
  3. import skin_manager as SkinManager
  4. import GdUI as UI
  5. from . import top_bar
  6. from . import screen_corners
  7. from . import foot_bar
  8. class MainScreen(UI.Container):
  9. def __init__(self, width, height):
  10. super().__init__(x=0, y=0, width=width, height=height)
  11. self._TitleBar = top_bar.TopBar(width, height)
  12. self._FootBar = foot_bar.FootBar(width, height)
  13. self._ScreenCorners = screen_corners.ScreenCorners(width, height)
  14. self._AppletContainer = UI.Container(x=0, y=25, width=width, height=height-25-20,
  15. bg_color=SkinManager.get_color("bgcolor"))
  16. self.add_child(self._AppletContainer)
  17. self.add_child(self._TitleBar)
  18. self.add_child(self._FootBar)
  19. self.add_child(self._ScreenCorners)
  20. # Border are not supported for now
  21. # self._FootBar.set_border(self._FootBar.borderTop, (255, 0, 0))
  22. self._TitleBar.set_title("GameShell")
  23. def reload(self):
  24. # Do nothing for now, later reload info from skinmanager
  25. pass
  26. def Draw(self):
  27. super().Draw()