constants.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # -*- coding: utf-8 -*-
  2. import pygame
  3. from pygame.locals import *
  4. from sys import exit
  5. import os
  6. import sys
  7. from datetime import datetime
  8. import base64
  9. from beeprint import pp
  10. #UI lib
  11. from skin_manager import MySkinManager
  12. Width = 320
  13. Height = 240
  14. bg_color = MySkinManager.GiveColor('White')
  15. icon_width = 80
  16. icon_height = 80
  17. icon_ext = ".sh"
  18. ICON_TYPES={"Emulator":7,"FILE":6,"STAT":5,"NAV":4,"LETTER":3,"FUNC":2,"DIR":1,"EXE":0,"None":-1} # FUNC is like UI widget's function,DIR contains child page,EXE just execute a binary
  19. ## H=horizontal ,V=vertical S=Single Line
  20. #SLeft start from left, single line
  21. #SCenter star from center ,single line
  22. ALIGN = {"HLeft":0,"HCenter":1,"HRight":2,"VMiddle":3,"SLeft":4,"VCenter":5,"SCenter":6}
  23. DT = pygame.time.Clock().tick(30) # fps in ms,eg:50
  24. GMEVT = pygame.USEREVENT+1
  25. update_titlebar_event = pygame.event.Event(GMEVT, message="titlebar")
  26. RUNEVT = pygame.USEREVENT+2
  27. RUNSYS = pygame.USEREVENT+3
  28. LOWLIGHT = pygame.USEREVENT+4 ## when dim screen backlight
  29. FOOTMSG = pygame.USEREVENT+5 ##
  30. POWEROPT = pygame.USEREVENT+6