constants.py 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. Width = 320
  11. Height = 240
  12. bg_color = pygame.Color(255,255,255)
  13. icon_width = 80
  14. icon_height = 80
  15. icon_ext = ".sh"
  16. 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
  17. ## H=horizontal ,V=vertical S=Single Line
  18. #SLeft start from left, single line
  19. #SCenter star from center ,single line
  20. ALIGN = {"HLeft":0,"HCenter":1,"HRight":2,"VMiddle":3,"SLeft":4,"VCenter":5,"SCenter":6}
  21. DT = pygame.time.Clock().tick(30) # fps in ms,eg:50
  22. GMEVT = pygame.USEREVENT+1
  23. update_titlebar_event = pygame.event.Event(GMEVT, message="titlebar")
  24. RUNEVT = pygame.USEREVENT+2
  25. RUNSYS = pygame.USEREVENT+3
  26. LOWLIGHT = pygame.USEREVENT+4 ## when dim screen backlight
  27. FOOTMSG = pygame.USEREVENT+5 ## when dim screen backlight