constants.py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. Width = 320
  12. Height = 240
  13. icon_width = 80
  14. icon_height = 80
  15. icon_ext = ".sh"
  16. ICON_TYPES={"Commercial":8,"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. RUNSH = 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 ##
  28. POWEROPT = pygame.USEREVENT+6
  29. RESTARTUI = pygame.USEREVENT+7 ##restart launcher