add socket server thread to receive remote call,and try add skin design on it
@@ -1,6 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
## local UI import
|
||||
import pages
|
||||
import myvars
|
||||
@@ -10,11 +9,8 @@ try:
|
||||
except:
|
||||
print("No icons package")
|
||||
"""
|
||||
from icons import preload
|
||||
|
||||
def Init(main_screen):
|
||||
|
||||
preload.load_icons()
|
||||
pages.InitPasswordPage(main_screen)
|
||||
pages.InitScanPage(main_screen)
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 306 B |
|
Before Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 335 B |
@@ -1,21 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import pygame
|
||||
from pygame.locals import *
|
||||
from sys import exit
|
||||
import os
|
||||
import sys
|
||||
|
||||
from beeprint import pp
|
||||
|
||||
ICONS_PRELOAD={}
|
||||
|
||||
|
||||
def load_icons():
|
||||
basepath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
files = os.listdir(basepath)
|
||||
for i in files:
|
||||
if os.path.isfile(basepath+"/"+i) and i.endswith(".png"):
|
||||
keyname = i.split(".")[0]
|
||||
ICONS_PRELOAD[keyname] = pygame.image.load(basepath+"/"+i).convert_alpha()
|
||||
@@ -12,12 +12,12 @@ from UI.fonts import fonts
|
||||
from UI.util_funcs import midRect
|
||||
from UI.keys_def import CurKeys
|
||||
from UI.icon_item import IconItem
|
||||
from UI.icon_pool import MyIconPool
|
||||
|
||||
from libs.roundrects import aa_round_rect
|
||||
|
||||
from textarea import Textarea
|
||||
from text_item import TextItem
|
||||
from icons import preload
|
||||
|
||||
import myvars
|
||||
|
||||
@@ -135,7 +135,7 @@ class Keyboard(Page):
|
||||
|
||||
if val == "_L" or val == "_R":
|
||||
it = KeyboardIcon()
|
||||
it._ImgSurf = preload.ICONS_PRELOAD[val]
|
||||
it._ImgSurf = MyIconPool._Icons[val]
|
||||
it._Parent = self
|
||||
it._Str = val
|
||||
it.Init(start_x+it._ImgSurf.get_width()/2 ,start_y,it._ImgSurf.get_width(),it._ImgSurf.get_height(),0)
|
||||
|
||||
@@ -8,8 +8,8 @@ from UI.label import Label
|
||||
from UI.fonts import fonts
|
||||
from UI.icon_item import IconItem
|
||||
from UI.multi_icon_item import MultiIconItem
|
||||
from UI.icon_pool import MyIconPool
|
||||
|
||||
from icons import preload
|
||||
|
||||
class NetItemMultiIcon(MultiIconItem):
|
||||
_CanvasHWND = None
|
||||
@@ -140,13 +140,13 @@ class NetItem(object):
|
||||
|
||||
|
||||
lock_icon = NetItemIcon()
|
||||
lock_icon._ImgSurf = preload.ICONS_PRELOAD["lock"]
|
||||
lock_icon._ImgSurf = MyIconPool._Icons["lock"]
|
||||
lock_icon._CanvasHWND = self._Parent._CanvasHWND
|
||||
lock_icon._Parent = self
|
||||
self._Icons["lock"] = lock_icon
|
||||
|
||||
done_icon = NetItemIcon()
|
||||
done_icon._ImgSurf = preload.ICONS_PRELOAD["done"]
|
||||
done_icon._ImgSurf = MyIconPool._Icons["done"]
|
||||
done_icon._CanvasHWND = self._Parent._CanvasHWND
|
||||
done_icon._Parent = self
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
@@ -1,26 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import pygame
|
||||
from pygame.locals import *
|
||||
from sys import exit
|
||||
import os
|
||||
import sys
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
import base64
|
||||
from beeprint import pp
|
||||
|
||||
|
||||
## local UI import
|
||||
import pages
|
||||
import myvars
|
||||
from icons import preload
|
||||
|
||||
def Init(main_screen):
|
||||
pages.InitPoller()
|
||||
|
||||
preload.load_icons()
|
||||
pages.InitListPage(main_screen)
|
||||
pages.InitMusicLibPage(main_screen)
|
||||
pages.InitSpectrumPage(main_screen)
|
||||
|
||||
|
Before Width: | Height: | Size: 198 B |
@@ -1,21 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import pygame
|
||||
from pygame.locals import *
|
||||
from sys import exit
|
||||
import os
|
||||
import sys
|
||||
|
||||
from beeprint import pp
|
||||
|
||||
ICONS_PRELOAD={}
|
||||
|
||||
|
||||
def load_icons():
|
||||
basepath = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
files = os.listdir(basepath)
|
||||
for i in files:
|
||||
if os.path.isfile(basepath+"/"+i) and i.endswith(".png"):
|
||||
keyname = i.split(".")[0]
|
||||
ICONS_PRELOAD[keyname] = pygame.image.load(basepath+"/"+i).convert_alpha()
|
||||
@@ -17,7 +17,6 @@ from UI.util_funcs import midRect
|
||||
# ------------------------
|
||||
|
||||
import myvars # icons_path
|
||||
from icons import preload
|
||||
|
||||
class ListItemIcon(IconItem):
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |