info_page_selector.py 954 B

1234567891011121314151617181920212223242526272829303132
  1. # -*- coding: utf-8 -*-
  2. import pygame
  3. from libs.roundrects import aa_round_rect
  4. ## local UI import
  5. from UI.constants import Width,Height
  6. from UI.page import Page,PageSelector
  7. from UI.skin_manager import MySkinManager
  8. class InfoPageSelector(PageSelector):
  9. _BackgroundColor = MySkinManager.GiveColor('Front')
  10. def __init__(self):
  11. self._PosX = 0
  12. self._PosY = 0
  13. self._Height = 0
  14. self._Width = Width
  15. def AnimateDraw(self,x2,y2):
  16. pass
  17. def Draw(self):
  18. idx = self._Parent._PsIndex
  19. if idx < len(self._Parent._MyList):
  20. y = self._Parent._MyList[idx]._PosY+1
  21. h = self._Parent._MyList[idx]._Height -3
  22. self._PosY = y
  23. self._Height = h
  24. aa_round_rect(self._Parent._CanvasHWND,
  25. (self._PosX,self._PosY,self._Width-4,self._Height),self._BackgroundColor,4,0,self._BackgroundColor)