info_page_selector.py 896 B

1234567891011121314151617181920212223242526272829
  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._Width = Width
  12. def AnimateDraw(self,x2,y2):
  13. pass
  14. def Draw(self):
  15. idx = self._Parent._PsIndex
  16. if idx >= 0 and idx < len(self._Parent._MyList):
  17. y = self._Parent._MyList[idx]._PosY+1
  18. h = self._Parent._MyList[idx]._Height -3
  19. self._PosY = y
  20. self._Height = h
  21. aa_round_rect(self._Parent._CanvasHWND,
  22. (self._PosX,self._PosY,self._Width-4,self._Height),self._BackgroundColor,4,0,self._BackgroundColor)