91 Commits

Author SHA1 Message Date
cpi 975ce6a4a4 fix bug in title_bar auto redraw when in Low backlight 2019-09-03 13:20:50 +08:00
cpi 8f91cfe020 cores manager ps index out of range bug fix 2019-08-26 16:11:02 +08:00
GNU 228a771184 Merge pull request #289 from cuu/gcores
unzip with override
2019-08-22 21:18:02 +08:00
cpi e93fc99fcd unzip with override 2019-08-22 13:15:57 +00:00
GNU e59787d5cd Merge pull request #287 from cuu/gcores
Gcores
2019-08-22 16:31:55 +08:00
cpi cf7bcd615c alias list_item encode utf8 2019-08-22 08:25:42 +00:00
cpi 5a2d662ba2 ROM_SO bug fix 2019-08-22 08:21:35 +00:00
GNU 5313c26ea7 Merge pull request #285 from cuu/gcores
Correction of Translation
2019-08-19 17:47:44 +08:00
cuu 733fdbc55d Correction of Translation 2019-08-19 17:40:17 +08:00
cpi 7917aaaddc add Menu update before launcher 2019-08-16 14:59:27 +08:00
GNU 2dc6087950 Merge pull request #275 from cuu/gcores
add patch for mame2003plus
2019-08-07 21:43:07 +08:00
cuu dc4f61ee92 add patch for mame2003plus 2019-08-07 21:40:50 +08:00
cpi 277d3afdf9 update OPERATION.love 2019-07-18 19:51:36 +08:00
cpi b6f0e69573 update apps and wallpaper resources 2019-07-18 15:59:11 +08:00
cpi efd83802d3 update gcores MANUAL 2019-07-18 14:40:36 +08:00
GNU 66607a26b3 Merge pull request #266 from cuu/gcores
lima text revision
2019-07-18 10:39:36 +08:00
cuu 3ecd4fa349 lima text revision 2019-07-18 10:37:45 +08:00
GNU 6f90f8d3cd Merge pull request #263 from cuu/gcores
Gcores
2019-07-18 06:52:15 +08:00
cuu 3a38c26553 remove gitmodule 2019-07-18 06:51:20 +08:00
cuu 148c60330b TinyCloud airplay_name 2019-07-18 06:47:14 +08:00
GNU c5d8735b92 Merge pull request #262 from cuu/gcores
update lima
2019-07-18 06:08:59 +08:00
cuu b3879473b3 update lima 2019-07-18 06:08:17 +08:00
cpi 3a27edaa84 airplane customization 2019-07-17 20:04:20 +08:00
cpi f10cc77780 update gcores apps 2019-07-17 16:18:54 +08:00
cpi d54a85b82a about page fix 2019-07-17 15:47:43 +08:00
cpi 87943a7ac5 swap the orders of OPERATION and MANUAL 2019-07-17 15:00:02 +08:00
cpi 7d932ad590 update gcores apps 2019-07-17 14:51:58 +08:00
GNU 119cf5f2ad Merge pull request #259 from cuu/gcores
sync bluetooth_firmware.sh from master branch
2019-07-17 12:31:38 +08:00
cuu b2511e97c4 sync bluetooth_firmware.sh from master branch 2019-07-17 12:30:02 +08:00
GNU 615c9e0dfc Merge pull request #258 from cuu/gcores
Gcores
2019-07-17 12:25:30 +08:00
cuu ee71a91c0b wifi color restore 2019-07-17 12:24:46 +08:00
cuu 38e217ef49 update wifi 2019-07-17 12:21:11 +08:00
GNU f4cbaba80d Merge pull request #257 from cuu/gcores
update  settings->about
2019-07-16 20:48:02 +08:00
cuu 4f7fcc6433 update about 2019-07-16 20:45:13 +08:00
cpi eae8d4fae8 pico8 icon 2019-07-16 15:04:50 +08:00
cpi d8426c37f0 icons and apps 2019-07-16 14:45:46 +08:00
cpi 6458e9c425 remove 40_PLAY ,50_DEV from launcher to ~/apps/Menu 2019-07-16 03:32:49 +00:00
GNU 1d34a8b287 Merge pull request #256 from cuu/gcores
Update menu content items, icons and the order
2019-07-16 10:21:31 +08:00
cuu 925076fac7 Update menu content items, icons and the order 2019-07-16 09:10:42 +08:00
GNU 450680b2b3 Merge pull request #253 from cuu/gcores
skin update
2019-07-12 14:12:18 +08:00
cuu 66298985a4 skin update 2019-07-12 14:11:37 +08:00
GNU b36a750b3b Merge pull request #252 from cuu/gcores
Gcores Custom Modification
2019-07-12 14:03:42 +08:00
cuu ae279bda94 Gcores Custom Modification 2019-07-12 14:02:32 +08:00
GNU af8f80736e Merge pull request #251 from cuu/gcores
Gcores
2019-07-11 22:38:00 +08:00
cuu f90b45059d Merge branch 'gcores' of https://github.com/cuu/launcher into gcores 2019-07-11 22:25:25 +08:00
cuu 9208fccacd ignore dot file in main_screen ReadTheDirIntoPages 2019-07-11 22:24:06 +08:00
GNU 720152dfe6 Merge pull request #211 from cuu/gcores
skip UnicodeDecodeError in Emulator
2019-05-13 19:48:44 +08:00
cuu 108e2b6877 skip UnicodeDecodeError in Emulator 2019-05-13 19:47:04 +08:00
GNU d8bd6a1718 Merge pull request #209 from cuu/gcores
TinyCloud font improvement
2019-05-12 10:08:13 +08:00
cuu ba0c11bb4d TinyCloud font improvement 2019-05-12 10:07:05 +08:00
GNU b488b5d4f1 Merge pull request #208 from cuu/gcores
TrFont bug fix
2019-05-11 17:55:38 +08:00
cuu 99305de562 TrFont bug fix 2019-05-11 17:54:59 +08:00
GNU d76dd08bf5 Update LICENSE 2019-05-10 19:08:42 +08:00
GNU 2577d0b534 Merge pull request #206 from cuu/gcores
Gcores
2019-05-09 21:02:02 +08:00
cuu eab2724dc7 Merge branch 'gcores' of github.com:cuu/launcher into gcores 2019-05-09 20:58:48 +08:00
cuu 25b976d948 wifi_list bug fix 2019-05-09 20:58:31 +08:00
GNU 9e70c4a088 Merge pull request #203 from cuu/gcores
wifilist message box colors fix
2019-05-07 13:55:20 +08:00
cuu ecfe99bc49 wifilist message box colors fix 2019-05-07 13:53:44 +08:00
GNU f5ac2da976 Merge pull request #200 from cuu/gcores
bug fix download_process_page.py
2019-05-07 13:02:24 +08:00
cuu 534883ca1f bug fix 2019-05-07 13:01:11 +08:00
GNU ad540da0c0 Merge pull request #199 from cuu/gcores
mpd_spectrum_page.py
2019-05-05 19:15:07 +08:00
cuu bb66f3c8f0 mpd_spectrum_page.py
text colors
2019-05-05 19:14:24 +08:00
GNU 13aa69700a Merge pull request #198 from cuu/gcores
MsgBoxFont
2019-05-05 18:53:23 +08:00
cuu d919110d58 MsgBoxFont 2019-05-05 18:52:25 +08:00
GNU fcd978b615 Merge pull request #196 from cuu/gcores
add absolute path in .cpirc
2019-05-05 18:30:16 +08:00
cuu 4b26c692ee add absolute path in .cpirc 2019-05-05 18:29:16 +08:00
GNU f3948dfd71 Merge pull request #195 from cuu/gcores
main_screen msgbox color fix
2019-05-05 17:08:49 +08:00
cuu b9e890137c main_screen msgbox color fix 2019-05-05 17:06:57 +08:00
GNU a871da1b85 Merge pull request #194 from cuu/gcores
update Menu icons to be 80x80
2019-05-05 16:48:51 +08:00
cuu 8f55eea7cf update Menu icons to be 80x80 2019-05-05 16:48:12 +08:00
GNU 52c1d12029 Merge pull request #193 from cuu/gcores
Gcores  cursor color and icons
2019-05-05 16:08:59 +08:00
cuu ae589ac886 Merge branch 'gcores' of https://github.com/clockworkpi/launcher into gcores 2019-05-05 16:08:06 +08:00
cuu 6ef89ddbff cursor color and icons 2019-05-05 16:07:37 +08:00
GNU 90dcd1bd25 Merge pull request #191 from cuu/gcores
textarea gcores theme
2019-05-05 15:05:59 +08:00
cuu 0ead001f80 textarea gcores theme 2019-05-05 15:05:09 +08:00
GNU f58d8218c2 Merge pull request #190 from cuu/gcores
colors fix
2019-05-05 14:43:04 +08:00
cuu 3ec8a1a65b compkginfo add pico-8.zip 2019-05-05 14:41:59 +08:00
cuu 160ff76d6e colors fix 2019-05-05 14:37:26 +08:00
GNU 51f62ea575 Merge pull request #189 from cuu/gcores
...
2019-05-05 14:01:27 +08:00
cuu 3c88f42924 ... 2019-05-05 14:00:39 +08:00
GNU 40d705acb5 Merge pull request #188 from cuu/gcores
gcores theme update
2019-05-05 13:46:13 +08:00
cuu ee88a3170b gcores theme update 2019-05-05 13:45:16 +08:00
GNU c05da6de97 Merge pull request #187 from cuu/gcores
Gcores
2019-05-05 12:03:23 +08:00
cuu 423044f496 gcorse theme images update 2019-04-30 18:20:18 +08:00
cuu 5d93fda813 gcores brightness theme 2019-04-30 14:23:32 +08:00
cuu 63d1af1337 Line color 2019-04-29 21:30:28 +08:00
cuu bceb9a372e footbar,blank,page.py hide PageSelector 2019-04-29 20:08:55 +08:00
cuu 1d8d85812a gcores volume 2019-04-27 22:17:22 +08:00
cuu 8bca1166df storage theme 2019-04-27 16:46:13 +08:00
cuu e38521e9c7 change icons and color for gcores theme 2019-04-27 12:05:00 +08:00
cuu 0bb9ed9eda ... 2019-04-27 11:13:46 +08:00
224 changed files with 616 additions and 5838 deletions
-11
View File
@@ -12,14 +12,3 @@ sys.py/.lang
!**/Jobs/00_lowpower.sh
!**/Jobs/00_lowpower.alias
.done
bios
bios/*
screenshots
screenshots/*
.pcsx
.pcsx/*
*.log
.DS_Store
sys.py/.*
sys.py/*.db
launcher.sublime-workspace
-3
View File
@@ -1,3 +0,0 @@
[submodule "sys.py/pyaria2_rpc"]
path = sys.py/pyaria2_rpc
url = https://github.com/cuu/pyaria2_rpc.git
+1 -5
View File
@@ -2,18 +2,14 @@ session=${1:-gameshell}
case $session in
hdmi )
exec aria2c --conf-path=/home/cpi/launcher/aria2.conf &
feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/desktopbg.jpg
cd ~/launcher/sys.py/ ; python appinstaller.py > /tmp/appinstaller.log & cd ~/
exec ~/launcher/load.sh &
exec ~/launcher/sys.py/gsnotify/gsnotify-arm daemon &
#exec /usr/bin/twm -f ~/launcher/.twmrc
exec ~/launcher/dwm-mod
;;
gameshell )
exec aria2c --conf-path=/home/cpi/launcher/aria2.conf &
gameshell )
feh --bg-center ~/launcher/sys.py/gameshell/wallpaper/loading.png
cd ~/launcher/sys.py/ ; python appinstaller.py > /tmp/appinstaller.log & cd ~/
exec ~/launcher/load.sh &
exec ~/launcher/sys.py/gsnotify/gsnotify-arm &
#exec awesome -c ~/launcher/awesome/rc.lua
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
love MANUAL.love gameshell
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
love OPERATION.love gameshell
Binary file not shown.
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
love MAIL.love gameshell
@@ -1,55 +0,0 @@
# -*- coding: utf-8 -*-
import os
import pygame
#import math
#mport subprocess
#from beeprint import pp
from libs.roundrects import aa_round_rect
## local UI import
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.util_funcs import ArmSystem
from UI.lang_manager import MyLangManager
from UI.confirm_page import ConfirmPage
class SwitchToLauncherGoConfirmPage(ConfirmPage):
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self._Screen._MsgBox.SetText("Rebooting to LauncherGo")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
pygame.time.delay(300)
ArmSystem("sed -i s/launcher/launchergo/g ~/.bashrc" )
ArmSystem("sudo reboot")
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = SwitchToLauncherGoConfirmPage()
self._Page._Screen = main_screen
self._Page._Name ="Switch To LauncherGo"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -1,294 +0,0 @@
# -*- coding: utf-8 -*-
import os
import pygame
#import commands
import glob
#from beeprint import pp
from libs.roundrects import aa_round_rect
## local UI import
from UI.constants import Width,Height,ICON_TYPES,RESTARTUI
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect,FileExists
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multilabel import MultiLabel
from UI.skin_manager import MySkinManager
from UI.lang_manager import MyLangManager
from UI.info_page_list_item import InfoPageListItem
from UI.info_page_selector import InfoPageSelector
import config
class ListPageSelector(InfoPageSelector):
def Draw(self):
idx = self._Parent._PsIndex
if idx < len(self._Parent._MyList):
x = self._Parent._MyList[idx]._PosX+2 ## ++
y = self._Parent._MyList[idx]._PosY+1
h = self._Parent._MyList[idx]._Height -3
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
class PageListItem(InfoPageListItem):
_PosX = 0
_PosY = 0
_Width = 0
_Height = 30
_Labels = {}
_Icons = {}
_Fonts = {}
_LinkObj = None
_Active = False
_Value = ""
def Draw(self):
self._Labels["Text"]._PosY = self._PosY+ (self._Height- self._Labels["Text"]._Height)/2
if self._Active == True:
self._Parent._Icons["done"].NewCoord( self._Parent._Width-30,self._PosY+5)
self._Parent._Icons["done"].Draw()
self._Labels["Text"].Draw(self._Active)
if "Small" in self._Labels:
self._Labels["Small"]._PosX = self._Width - self._Labels["Small"]._Width -10
self._Labels["Small"]._PosY = self._PosY + (self._Height- self._Labels["Small"]._Height)/2
self._Labels["Small"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
class SkinsPage(Page):
_FootMsg = ["Nav","","Scan","Back","Select"]
_MyList = []
_ListFont = MyLangManager.TrFont("notosanscjk15")
_AList = {}
_Scrolled = 0
_BGwidth = 320
_BGheight = 240-24-20
_DrawOnce = False
_Scroller = None
_InfoPage = None
def __init__(self):
Page.__init__(self)
self._Icons = {}
def GenList(self):
self._MyList = []
start_x = 0
start_y = 0
last_height = 0
skins = [["../skin/default","Default"]]
files_path = glob.glob("/home/cpi/skins/*")
for i ,v in enumerate(files_path):
if os.path.isdir(v):
bname = os.path.basename(v)
print(v,bname)
skins.append([v,bname])
for i,u in enumerate( skins ):
#print(i,u)
li = PageListItem()
li._Parent = self
li._PosX = start_x
li._PosY = start_y + last_height
li._Width = Width
li._Fonts["normal"] = self._ListFont
li._Active = False
li._Value = u[0]
li.Init( u[1] )
last_height += li._Height
self._MyList.append(li)
def Init(self):
if self._Screen != None:
if self._Screen._CanvasHWND != None and self._CanvasHWND == None:
self._HWND = self._Screen._CanvasHWND
self._CanvasHWND = pygame.Surface( (self._Screen._Width,self._BGheight) )
self._PosX = self._Index*self._Screen._Width
self._Width = self._Screen._Width ## equal to screen width
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
ps = ListPageSelector()
ps._Parent = self
self._Ps = ps
self._PsIndex = 0
self.GenList()
self._Scroller = ListScroller()
self._Scroller._Parent = self
self._Scroller._PosX = self._Width - 10
self._Scroller._PosY = 2
self._Scroller.Init()
self._Scroller.SetCanvasHWND(self._HWND)
def Click(self):
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
if cur_li._Active == True:
return
print(cur_li._Value)
for i in self._MyList:
i._Active = False
cur_li._Active = True
self._Screen._MsgBox.SetText("Applying")
self._Screen._MsgBox.Draw()
self._Screen.SwapAndShow()
if "../skin/default" in cur_li._Value:
os.system("rm %s/.gameshell_skin" % os.path.expanduser('~') )
else:
os.system("echo %s > %s/.gameshell_skin" % (cur_li._Value,os.path.expanduser('~') ))
pygame.time.delay(700)
pygame.event.post( pygame.event.Event(RESTARTUI, message=""))
def OnLoadCb(self):
self._Scrolled = 0
self._PosY = 0
self._DrawOnce = False
for i in self._MyList:
i._Active = False
for i in self._MyList:
if config.SKIN in i._Value:
i._Active = True
def OnReturnBackCb(self):
pass
"""
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
"""
def KeyDown(self,event):
if IsKeyMenuOrB(event.key):
self.ReturnToUpLevelPage()
self._Screen.Draw()
self._Screen.SwapAndShow()
if IsKeyStartOrA(event.key):
self.Click()
if event.key == CurKeys["Up"]:
self.ScrollUp()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["Down"]:
self.ScrollDown()
self._Screen.Draw()
self._Screen.SwapAndShow()
if event.key == CurKeys["X"]:
self.GenList()
for i in self._MyList:
i._Active = False
for i in self._MyList:
if config.SKIN in i._Value:
i._Active = True
self._Screen.Draw()
self._Screen.SwapAndShow()
def Draw(self):
self.ClearCanvas()
if len(self._MyList) == 0:
return
else:
if len(self._MyList) * PageListItem._Height > self._Height:
self._Ps._Width = self._Width - 11
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
self._Scroller.UpdateSize( len(self._MyList)*PageListItem._Height, self._PsIndex*PageListItem._Height)
self._Scroller.Draw()
else:
self._Ps._Width = self._Width
self._Ps.Draw()
for i in self._MyList:
if i._PosY > self._Height + self._Height/2:
break
if i._PosY < 0:
continue
i.Draw()
if self._HWND != None:
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
self._Page = SkinsPage()
self._Page._Screen = main_screen
self._Page._Name ="Skin selection"
self._Page.Init()
def API(self,main_screen):
if main_screen !=None:
main_screen.PushPage(self._Page)
main_screen.Draw()
main_screen.SwapAndShow()
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
File diff suppressed because it is too large Load Diff
-2
View File
@@ -1,2 +0,0 @@
#!/bin/bash
retroarch
-2
View File
@@ -1,2 +0,0 @@
#!/bin/bash
retroarch -L /home/cpi/apps/emulators/nxengine_libretro.so /home/cpi/games/nxengine/cavestory/data
-6
View File
@@ -1,6 +0,0 @@
ROM=/home/cpi/games/ChocoDM
ROM_SO=
EXT=wad
LAUNCHER=chocolate-doom -iwad
TITLE=ChocoDM
SO_URL=
@@ -136,26 +136,26 @@ class MPDSpectrumPage(Page):
"""
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("sheep_bg")
self._BGpng._ImgSurf = MyIconPool._Icons["sheep_bg"]
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._SheepHead = IconItem()
self._SheepHead._ImgSurf = MyIconPool.GiveIconSurface("sheep_head")
self._SheepHead._ImgSurf = MyIconPool._Icons["sheep_head"]
self._SheepHead._MyType = ICON_TYPES["STAT"]
self._SheepHead._Parent = self
self._SheepHead.Adjust(0,0,self._SheepHeadW,self._SheepHeadH,0)
self._SheepBody = IconItem()
self._SheepBody._ImgSurf = MyIconPool.GiveIconSurface("sheep_body")
self._SheepBody._ImgSurf = MyIconPool._Icons["sheep_body"]
self._SheepBody._MyType = ICON_TYPES["STAT"]
self._SheepBody._Parent = self
self._SheepBody.Adjust(0,0,self._SheepBodyW,self._SheepBodyH,0)
"""
self._cwp_png = IconItem()
self._cwp_png._ImgSurf = MyIconPool.GiveIconSurface("tape")
self._cwp_png._ImgSurf = MyIconPool._Icons["tape"]
self._cwp_png._MyType = ICON_TYPES["STAT"]
self._cwp_png._Parent = self
self._cwp_png.Adjust(0,0,79,79,0)
@@ -163,22 +163,22 @@ class MPDSpectrumPage(Page):
self._song_title = Label()
self._song_title.SetCanvasHWND(self._RollCanvas)
self._song_title.Init("Untitled",self._SongFont,MySkinManager.GiveColor('White'))
self._song_title.Init("Untitled",self._SongFont,MySkinManager.GiveColor('Text'))
self._title = Label()
self._title.SetCanvasHWND(self._CanvasHWND)
self._title.Init("Title:",self._ListFont,MySkinManager.GiveColor('White'))
self._title.Init("Title:",self._ListFont,MySkinManager.GiveColor('Text'))
self._time = Label()
self._time.SetCanvasHWND(self._CanvasHWND)
self._time.Init("Time:",self._ListFont,MySkinManager.GiveColor('White'))
self._time.Init("Time:",self._ListFont,MySkinManager.GiveColor('Text'))
self._time2 = Label()
self._time2.SetCanvasHWND(self._CanvasHWND)
self._time2.Init("00:00-00:00", self._ListFont,
MySkinManager.GiveColor('White'))
MySkinManager.GiveColor('Text'))
self.Start()
@@ -336,7 +336,7 @@ class MPDSpectrumPage(Page):
if self._RollCanvas != None:
# self._RollCanvas.fill((111,22,33))
self._RollCanvas.fill(MySkinManager.GiveColor('Black'))
self._RollCanvas.fill(MySkinManager.GiveColor('White'))
if self._song_title._Width > self._RollW:
if (self._song_title._PosX + self._song_title._Width) > self._RollW and self._frames % 30 == 0:
self._song_title._PosX -= 1
@@ -410,9 +410,9 @@ class MPDSpectrumPage(Page):
else:
self._capYPositionArray[i] = value
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(i*(bw+gap)+margin_left,self._Height-gap-self._capYPositionArray[i]-margin_bottom,bw,gap),0)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),(i*(bw+gap)+margin_left,self._Height-gap-self._capYPositionArray[i]-margin_bottom,bw,gap),0)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(i*(bw+gap)+margin_left,self._Height-value-gap-margin_bottom,bw,value+gap),0)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),(i*(bw+gap)+margin_left,self._Height-value-gap-margin_bottom,bw,value+gap),0)
self._vis_values[i] -= 2
@@ -2,7 +2,7 @@
import os
import pygame
from libs.roundrects import aa_round_rect
#from libs.roundrects import aa_round_rect
## local UI import
from UI.constants import Width,Height,ICON_TYPES
@@ -49,7 +49,7 @@ class MusicLibStack:
return len(self.stack)
class ListPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
_BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self):
self._PosX = 0
@@ -72,9 +72,9 @@ class ListPageSelector(PageSelector):
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
#aa_round_rect(self._Parent._CanvasHWND,
# (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h),0)
class MusicLibListPage(Page):
@@ -172,7 +172,7 @@ class MusicLibListPage(Page):
self.SyncList("/")
icon_for_list = MultiIconItem()
icon_for_list._ImgSurf = MyIconPool.GiveIconSurface("sys")
icon_for_list._ImgSurf = MyIconPool._Icons["sys"]
icon_for_list._MyType = ICON_TYPES["STAT"]
icon_for_list._Parent = self
@@ -181,11 +181,11 @@ class MusicLibListPage(Page):
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("empty")
self._BGpng._ImgSurf = MyIconPool._Icons["empty"]
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela22"))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Disabled'))
self._BGpng.AddLabel(MyLangManager.Tr("Please upload data over Wi-Fi"), MyLangManager.TrFont("varela18"))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Text'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -196,7 +196,6 @@ class MusicLibListPage(Page):
self._Scroller.Init()
def Click(self):
self.RefreshPsIndex()
if len(self._MyList) == 0:
return
@@ -3,7 +3,7 @@ import os
import pygame
import gobject
from libs.roundrects import aa_round_rect
#from libs.roundrects import aa_round_rect
## local UI import
from UI.constants import Width,Height,ICON_TYPES
@@ -23,7 +23,7 @@ from list_item import ListItem
import myvars
class ListPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
_BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self):
self._PosX = 0
@@ -51,9 +51,9 @@ class ListPageSelector(PageSelector):
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
#aa_round_rect(self._Parent._CanvasHWND,
# (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h),0)
class PlayListPage(Page):
@@ -180,11 +180,11 @@ class PlayListPage(Page):
gobject.timeout_add(850,self.GObjectInterval)
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("heart")
self._BGpng._ImgSurf = MyIconPool._Icons["heart"]
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel(MyLangManager.Tr("my favorite music"), MyLangManager.TrFont("varela18"))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Disabled'))
self._BGpng.SetLableColor(MySkinManager.GiveColor('Text'))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._Scroller = ListScroller()
@@ -235,10 +235,9 @@ class PlayListPage(Page):
self._MyList[i]._PosY += self._Scrolled * self._MyList[i]._Height
def Click(self):
self.RefreshPsIndex()
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
play_pos_id = myvars.Poller.play(self._PsIndex)
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash
cd /home/cpi/games/PICO-8/pico-8 || exit
SDL_VIDEODRIVER=x11 DISPLAY=:0 ./pico8_dyn -splore -draw_rect 32,0,256,240
-11
View File
@@ -1,11 +0,0 @@
#!/bin/bash
mkdir ~/.lexaloffle
cp -rf pico-8 ~/.lexaloffle
mkdir ~/.lexaloffle/pico-8/carts
ln -s ~/.lexaloffle/pico-8/carts/ ~/games/PICO-8/carts
touch .done
-19
View File
@@ -1,19 +0,0 @@
{
"GameDir": "/home/cpi/games/PICO-8/",
"InstallDir": "pico-8",
"NotFoundMsg": [
"Please purchase the PICO-8 \n|None|varela16",
"and copy it to the \"~/games/PICO-8\"|None|varela16"
],
"MD5": {
"pico-8_0.2.2_raspi.zip": "e2dba152bf507d337459e9316061411d",
"pico-8_0.1.11g_raspi.zip": "a3f2995cf117499f880bd964d6a0e1f2",
"pico-8_0.1.11g_amd64.zip": "6726141c784afd4a41be6b7414c1b932",
"pico-8_0.1.12_raspi.zip": "08eda95570e63089a2b9f5531503431e",
"pico-8_0.1.12c_raspi.zip": "1a62b0d7d4e4be65f89f23ec9757cb66",
"pico-8_0.1.12c2_raspi.zip": "7a878795472fa39304e9a10128c1f712",
"pico-8_0.2.0e_raspi.zip": "085edfecd111c2b195b878b2197afe7a",
"pico-8.zip": "whatever it takes"
},
"Post-Up": "bash Post-Up.sh"
}
@@ -1,99 +0,0 @@
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Configuration for pico-8
//
// config.txt is read on startup and saved on exit.
// To generate the default config.txt, delete this file.
//
// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// :: Video Settings
window_size 0 0 // window width, height
screen_size 0 0 // screen width, height (stretched to window)
show_fps 0 // Draw frames per second in the corner
// :: Window Settings
windowed 0 // 1 to start up in windowed mode
window_position -1 -1 // x and y position of window, or -1, -1 to let the window manager decide
frameless 0 // 1 to use a window with no frame
fullscreen_method 0 // 0 maximized window (linux) 1 borderless desktop-sized window 2 fullscreen
// :: System Settings
foreground_sleep_ms 1 // number of milliseconds to sleep each frame. Try 10 to conserve battery power
background_sleep_ms 20 // number of milliseconds to sleep each frame when running in the background
sessions 4 // number of times program has been run
// (scancode) hold this key down and left-click to simulate right-click
rmb_key 0 // 0 for none 226 for LALT
// 0:off 1: ignore SDL_TEXTINPUT and use SDL_GetKeyboardState instead (mapped to a US layout)
emulate_textinput 1
// Desktop for saving screenshots etc. Defaults to $HOME/Desktop
desktop_path
// :: Audio Settings
sound_volume 256 // 0..256
music_volume 256 // 0..256
mix_buffer_size 1024 // usually 1024. Try 2048 if you get choppy sound
// ::
version 0.1.11g
// Location of pico-8's root folder
root_path /home/cpi/.lexaloffle/pico-8/carts/
// Location of cartridge save data
cdata_path /home/cpi/.lexaloffle/pico-8/cdata/
// Specify which player index joystick control begins at (0..7)
joystick_index 0
// Custom keyboard scancodes for buttons. player0 0..6, player1 0..5
button_keys 0 0 0 0 13 14 0 0 0 0 0 0 0
// Play notes as they are plotted in frequency mode
live_notes 0
// iff 1: when using keyboard cursor, snap to closest pixel / map cel
cursor_snap 0
// maximum length of gif in seconds (1..120, default 8)
gif_len 8
// 0 classic 1 dark blue background in code editor
gui_theme 0
// scale of screenshots and gifs // 2 means 256x256
screenshot_scale 3
gif_scale 2
// when 1 can enter glyphs using shift-A..Z
shift_glyphs 1
// 0 for off. 1 to notify whenever unsaved changes are backed up
show_backup_messages 1
// 0 for off. 1 to allow control of a cart's framerate due to host machine's cpu capacity (recommended)
host_framerate_control 1
// filter splore content
// 0 for no filter (18+) 1 medium (13+) 2 maximum (kid-friendly)
content_filter 1
-90
View File
@@ -1,90 +0,0 @@
codo_init
platform: Linux
Found config.txt
01 window_size 0 0 // window width, height
02 screen_size 0 0 // screen width, height (stretched to window)
03 show_fps 0 // Draw frames per second in the corner
04 windowed 0 // 1 to start up in windowed mode
05 window_position -1 -1 // x and y position of window, or -1, -1 to let the window manager decide
new window position: -1, -1
06 frameless 0 // 1 to use a window with no frame
07 fullscreen_method 1 // 0 maximized window (linux) 1 borderless desktop-sized window 2 fullscreen
08 foreground_sleep_ms 1 // number of milliseconds to sleep each frame. Try 10 to conserve battery power
09 background_sleep_ms 20 // number of milliseconds to sleep each frame when running in the background
10 sessions 3 // number of times program has been run
11 rmb_key 0 // 0 for none 226 for LALT
12 emulate_textinput 1
13 desktop_path
14 sound_volume 256 // 0..256
15 music_volume 256 // 0..256
16 mix_buffer_size 1024 // usually 1024. Try 2048 if you get choppy sound
17 version 0.1.11g
18 root_path /home/cpi/.lexaloffle/pico-8/carts/
19 cdata_path /home/cpi/.lexaloffle/pico-8/cdata/
20 joystick_index 0
21 button_keys 0 0 0 0 0 0 0 0 0 0 0 0 0
22 live_notes 0
23 cursor_snap 0
24 gif_len 8
25 gui_theme 0
26 screenshot_scale 3
27 gif_scale 2
28 shift_glyphs 1
29 show_backup_messages 1
30 host_framerate_control 1
31 content_filter 1
codo_system_init
Compiled against SDL version: 2.0.7
Linked against SDL version: 2.0.5
Built-in video drivers: 0 x11 1 wayland 2 dummy
Current video driver: x11
Built-in render drivers:
Renderer opengl:
Flags: 0x0000000E ( | | )
Texture formats (1): ARGB8888
Renderer opengles2:
Flags: 0x0000000E ( | | )
Texture formats (4): ARGB8888, ABGR8888, RGB888, BGR888
Renderer software:
Flags: 0x00000009 ( | )
Texture formats (8): ARGB8888, ABGR8888, RGBA8888, BGRA8888, RGB888, BGR888, RGB565, RGB555
codo_reset_timer
codo_gui_init
codo_keys_init
codo_text_init
codo_video_init
codo_mouse_init
codo_joystick_init
Reading controller mappings: /home/cpi/.lexaloffle/pico-8/sdl_controllers.txt
searching for joysticks
found 0 joysticks
ok
ok
codo_load_pod: /home/cpi/apps/Menu/50_PICO-8/pico8.dat ok
codo_set_screen 128 128 8 100
set pixel_perfect 1
window size: 640 480
codo_plat_pi: forcing fullscreen mode
Current renderer:
Renderer opengl:
Flags: 0x0000000A ( | )
Texture formats (5): ARGB8888, YV12, IYUV, 0x3231564e, 0x3132564e
Max Texture Size: 8192x8192
codo_sound_init mix_buffer_size: 1024
codo_sound_init
SDL_INIT_AUDIO ok
SDL_OpenAudio ok
Built-in audio drivers: 0 pulseaudio 1 alsa 2 sndio 3 dsp 4 disk 5 dummy
Current audio driver: alsa
codo_exit
cmusic_stop
codo_main_exit
codo_config_save
codo_sound_exit
codo_video_exit
codo_joystick_exit
codo_system_exit
codo_items_created: 1023
ok
@@ -1 +0,0 @@
// add SDL2 game controller mappings to this file
@@ -19,8 +19,9 @@ class TinyCloudPage(Page):
_FootMsg = ["Nav","","","Back",""]
_MyList = []
_ListFontObj = MyLangManager.TrFont("varela13")
_ListFontObj = MyLangManager.TrFont("veramono13")
_ListLabelFontObj = MyLangManager.TrFont("varela13")
_AList = {}
_Labels = {}
@@ -120,19 +121,23 @@ class TinyCloudPage(Page):
hostname = commands.getstatusoutput("hostname")[1]
if hostname == "":
hostname = "clockworkpi"
labels = \
[["forssh","For ssh and scp:",self._ListFontObj,self._TextColor],
[["forssh","For ssh and scp:",self._ListLabelFontObj,self._TextColor],
["ssh_addr","ssh cpi@%s" % self._IP, self._ListFontObj,self._URLColor],
["forwin", "For Windows network:", self._ListFontObj, self._TextColor],
["forwin", "For Windows network:", self._ListLabelFontObj, self._TextColor],
["samba_games", "\\\\%s\games" % self._IP, self._ListFontObj,self._URLColor],
["samba_music", "\\\\%s\music" % self._IP, self._ListFontObj,self._URLColor],
["forID", "ID:", self._ListFontObj, self._TextColor],
["forKey", "Key:", self._ListFontObj, self._TextColor],
["forID", "ID:", self._ListLabelFontObj, self._TextColor],
["forKey", "Key:", self._ListLabelFontObj, self._TextColor],
["key_and_pass", "cpi", self._ListFontObj, self._URLColor],
["for_airplay", "Airplay:", self._ListFontObj, self._TextColor],
["for_airplay", "Airplay:", self._ListLabelFontObj, self._TextColor],
["airplay_name",hostname, self._ListFontObj, self._URLColor],
["for-usb-eth","USB-Ethernet:", self._ListFontObj, self._TextColor],
["for-usb-eth","USB-Ethernet:", self._ListLabelFontObj, self._TextColor],
["usb-eth-addr","192.168.10.1", self._ListFontObj, self._URLColor]]
for i in labels:
@@ -157,24 +162,25 @@ class TinyCloudPage(Page):
self._Height = self._Screen._Height
self._PngSize["bg"] = (253,114)
self._PngSize["online"] = (75,122)
#self._PngSize["online"] = (75,122)
bgpng = IconItem()
bgpng._ImgSurf = MyIconPool.GiveIconSurface("needwifi_bg")
bgpng._ImgSurf = MyIconPool._Icons["needwifi_bg"]
bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self
bgpng.Adjust(0,0,self._PngSize["bg"][0],self._PngSize["bg"][1],0)
self._Icons["bg"] = bgpng
"""
onlinepng = IconItem()
onlinepng._ImgSurf = MyIconPool.GiveIconSurface("online")
onlinepng._ImgSurf = MyIconPool._Icons["online"]
onlinepng._MyType = ICON_TYPES["STAT"]
onlinepng._Parent = self
onlinepng.Adjust(0,0,self._PngSize["online"][0], self._PngSize["online"][1],0)
self._Icons["online"] = onlinepng
"""
self.SetLabels()
def KeyDown(self,event):
@@ -189,8 +195,8 @@ class TinyCloudPage(Page):
if is_wifi_connected_now():
self._Icons["online"].NewCoord(self._Coords["online"].x, self._Coords["online"].y)
self._Icons["online"].Draw()
#self._Icons["online"].NewCoord(self._Coords["online"].x, self._Coords["online"].y)
#self._Icons["online"].Draw()
self.SetLabels()
@@ -229,7 +235,7 @@ class APIOBJ(object):
def Init(self,main_screen):
self._Page = TinyCloudPage()
self._Page._Screen = main_screen
self._Page._Name ="Tiny cloud"
self._Page._Name ="CONNECT"
self._Page.Init()
def API(self,main_screen):
@@ -266,7 +266,7 @@ class AboutPage(Page):
li.SetSmallText( self._AList[u]["value"] )
last_height += li._Height
last_height += li._Height+2 ## fix offset for long line text covered on the right background png
self._MyList.append(li)
@@ -19,7 +19,7 @@ from UI.icon_pool import MyIconPool
from UI.icon_item import IconItem
from UI.multi_icon_item import MultiIconItem
from UI.lang_manager import MyLangManager
from UI.skin_manager import MySkinManager
from UI.multilabel import MultiLabel
class AirplanePage(Page):
@@ -63,34 +63,35 @@ class AirplanePage(Page):
self._Height = self._Screen._Height
"""
airwire = IconItem()
airwire._ImgSurf = MyIconPool.GiveIconSurface("airwire")
airwire._ImgSurf = MyIconPool._Icons["airwire"]
airwire._MyType = ICON_TYPES["STAT"]
airwire._Parent = self
airwire.Adjust(0,0,5,43,0)
self._Icons["airwire"] = airwire
GS = IconItem()
GS._ImgSurf = MyIconPool.GiveIconSurface("GS")
GS._ImgSurf = MyIconPool._Icons["GS"]
GS._MyType = ICON_TYPES["STAT"]
GS._Parent = self
GS.Adjust(0,0,72,95,0)
self._Icons["GS"] = GS
"""
DialogBoxs = MultiIconItem()
DialogBoxs._ImgSurf = MyIconPool.GiveIconSurface("DialogBoxs")
DialogBoxs._ImgSurf = MyIconPool._Icons["DialogBoxs"]
DialogBoxs._MyType = ICON_TYPES["STAT"]
DialogBoxs._Parent = self
DialogBoxs._IconWidth = 134
DialogBoxs._IconHeight = 93
DialogBoxs.Adjust(0,0,134,372,0)
DialogBoxs._IconWidth = 180
DialogBoxs._IconHeight = 80
DialogBoxs.Adjust(0,0,180,320,0)
self._Icons["DialogBoxs"] = DialogBoxs
"""
bgpng = MultiIconItem()
bgpng._ImgSurf = MyIconPool.GiveIconSurface("about_bg")
bgpng._ImgSurf = MyIconPool._Icons["about_bg"]
bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self
bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
@@ -231,19 +232,24 @@ class AirplanePage(Page):
def Draw(self):
self.ClearCanvas()
self._Icons["DialogBoxs"].NewCoord(145,23)
self._Icons["airwire"].NewCoord(80,self._airwire_y)
self._Icons["DialogBoxs"].NewCoord(70,58)
#self._Icons["airwire"].NewCoord(80,self._airwire_y)
self._Icons["DialogBoxs"]._IconIndex = self._dialog_index
self._Icons["DialogBoxs"].DrawTopLeft()
self._Icons["airwire"].Draw()
#self._Icons["airwire"].Draw()
self._Icons["GS"].NewCoord(98,118)
self._Icons["GS"].Draw()
#self._Icons["GS"].NewCoord(98,118)
#self._Icons["GS"].Draw()
self.DrawCross(10,10)
self.DrawCross(self._Screen._Width-20,10)
self.DrawCross(10,self._Screen._Height-20)
self.DrawCross(self._Screen._Width-20,self._Screen._Height-20)
if self._HWND != None:
self._HWND.fill((255,255,255))
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
@@ -71,7 +71,7 @@ class BleForgetConfirmPage(ConfirmPage):
class BleInfoPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
_BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self):
self._PosX = 0
@@ -92,8 +92,9 @@ class BleInfoPageSelector(PageSelector):
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
#aa_round_rect(self._Parent._CanvasHWND,
# (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h),0)
class BleInfoPage(Page):
_FootMsg = ["Nav","Forget","Disconnect","Back",""]
@@ -315,7 +316,7 @@ class BleInfoPage(Page):
class BleListSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
_BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self):
self._PosX = 0
@@ -336,8 +337,9 @@ class BleListSelector(PageSelector):
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
#aa_round_rect(self._Parent._CanvasHWND,
# (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor, (x,y,self._Width-4,h),0 )
class BleListMessageBox(Label):
_Parent = None
@@ -351,7 +353,7 @@ class BleListMessageBox(Label):
padding = 10
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(x-padding,y-padding, w+padding*2,h+padding*2))
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Black'),(x-padding,y-padding, w+padding*2,h+padding*2),1)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),(x-padding,y-padding, w+padding*2,h+padding*2),1)
self._CanvasHWND.blit(my_text,(x,y,w,h))
@@ -98,7 +98,7 @@ class NetItem(object):
self._Labels["mac_addr"] = name_label
done_icon = NetItemIcon()
done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
done_icon._ImgSurf = MyIconPool._Icons["done"]
done_icon._CanvasHWND = self._Parent._CanvasHWND
done_icon._Parent = self
@@ -15,19 +15,18 @@ from UI.keys_def import CurKeys, IsKeyMenuOrB
from UI.slider import Slider
from UI.icon_pool import MyIconPool
from UI.multi_icon_item import MultiIconItem
from UI.skin_manager import MySkinManager
from config import BackLight
import myvars
class BSlider(Slider):
OnChangeCB = None
_BGpng = None
_BGwidth = 179
_BGheight = 153
_NeedleSurf = None
_Scale = None
_Parent = None
_Icons = {}
@@ -38,22 +37,11 @@ class BSlider(Slider):
self._Width = self._Parent._Width
self._Height = self._Parent._Height
bgpng = IconItem()
bgpng._ImgSurf = MyIconPool.GiveIconSurface("light")
bgpng._MyType = ICON_TYPES["STAT"]
bgpng._Parent = self
bgpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._Icons["bg"] = bgpng
##self._NeedleSurf = pygame.Surface( (38,12),pygame.SRCALPHA )
self._BrightnessLabel = Label()
self._BrightnessLabel.SetCanvasHWND(self._CanvasHWND)
self._BrightnessLabel.Init("BRIGHT",MySkinManager.GiveFont("EurostileBold13"))
self._BrightnessLabel.SetColor(MySkinManager.GiveColor('Text'))
scale = MultiIconItem()
scale._MyType = ICON_TYPES["STAT"]
scale._Parent = self
scale._ImgSurf = MyIconPool.GiveIconSurface("scale")
scale._IconWidth = 82
scale._IconHeight = 63
scale.Adjust(0,0,82,63,0)
self._Icons["scale"] = scale
def SetValue(self,brt):
self._Value = brt
@@ -78,27 +66,40 @@ class BSlider(Slider):
self.OnChangeCB(self._Value)
def Draw(self):
start_x = 82
start_y = self._Parent._Screen._Height/2-5
height = 30
width = 4
padding = 15
seg = self._Value-1
self._Icons["bg"].NewCoord(self._Width/2,self._Height/2 +11 )
self._Icons["bg"].Draw()
for i in range(0,9):
rect = pygame.Rect(start_x+i*(width+padding),start_y,width,height)
if i > seg:
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),rect, 1)
#aa_round_rect(self._CanvasHWND,rect, MySkinManager.GiveColor('Text'),1,1, MySkinManager.GiveColor('White'))
else:
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),rect, 0)
#aa_round_rect(self._CanvasHWND,rect, MySkinManager.GiveColor('Text'),1,0, MySkinManager.GiveColor('White'))
self._BrightnessLabel.NewCoord(118,self._Parent._Screen._Height/2-30)
self._BrightnessLabel.Draw(True)
minus_box_rect = pygame.Rect(start_x- (4+6)*4,start_y,6*4,30)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),minus_box_rect, 0)
minus_rect = pygame.Rect(start_x-8*4,start_y+14,2*4,2)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),minus_rect, 0)
plus_box_rect = pygame.Rect(start_x + 39*4 +4*4,start_y,6*4,30)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),plus_box_rect, 0)
cross1_rect = pygame.Rect(start_x+39*4+4*4+2*4,start_y+14,2*4,2)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),cross1_rect, 0)
cross2_rect = pygame.Rect(start_x+39*4+4*4+2*4+3,start_y+14-3,2,2*4)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),cross2_rect, 0)
self._Icons["scale"].NewCoord(self._Width/2,self._Height/2 )
icon_idx = self._Value - 1
if icon_idx < 0:
icon_idx = 0
self._Icons["scale"]._IconIndex = icon_idx
self._Icons["scale"].Draw()
"""
pygame.draw.line(self._CanvasHWND,(255,0,0), (posx,self._PosY),(self._Width,self._PosY),3) ## range line
pygame.draw.line(self._CanvasHWND,(0,0,255), (self._PosX,self._PosY),(posx,self._PosY),3) ## range line
pygame.draw.circle(self._CanvasHWND,(255,255,255),( posx, self._PosY),7,0)
pygame.draw.circle(self._CanvasHWND,(0,0,0) ,( posx, self._PosY),7,1)## outer border
"""
class BrightnessPage(Page):
@@ -153,7 +153,7 @@ class ButtonsLayoutPage(Page):
self._Height = self._Screen._Height
DialogBoxs = MultiIconItem()
DialogBoxs._ImgSurf = MyIconPool.GiveIconSurface("buttonslayout")
DialogBoxs._ImgSurf = MyIconPool._Icons["buttonslayout"]
DialogBoxs._MyType = ICON_TYPES["STAT"]
DialogBoxs._Parent = self
DialogBoxs._IconWidth = 300
@@ -213,9 +213,9 @@ class CoresPage(Page):
def Draw(self):
self.ClearCanvas()
self._Ps.Draw()
if len(self._MyList) > 0:
self._Ps.Draw()
for i in self._MyList:
i.Draw()
@@ -38,8 +38,9 @@ class ListPageSelector(InfoPageSelector):
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
#aa_round_rect(self._Parent._CanvasHWND,
# (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h) ,0)
class PageListItem(InfoPageListItem):
@@ -133,7 +134,7 @@ class GateWayPage(Page):
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._ImgSurf = MyIconPool._Icons["done"]
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
@@ -318,7 +319,7 @@ class GateWayPage(Page):
i.Draw()
if self._HWND != None:
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.fill((255,255,255))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
@@ -37,9 +37,9 @@ class ListPageSelector(InfoPageSelector):
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
#aa_round_rect(self._Parent._CanvasHWND,
# (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h) ,0)
class PageListItem(InfoPageListItem):
_PosX = 0
@@ -133,7 +133,7 @@ class LanguagesPage(Page):
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._ImgSurf = MyIconPool._Icons["done"]
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
@@ -278,7 +278,7 @@ class LanguagesPage(Page):
i.Draw()
if self._HWND != None:
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.fill((255,255,255))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
import os
import pygame
#import math
#mport subprocess
import platform
#from beeprint import pp
from libs.roundrects import aa_round_rect
## local UI import
from UI.lang_manager import MyLangManager
class APIOBJ(object):
_Page = None
def __init__(self):
pass
def Init(self,main_screen):
pass
def API(self,main_screen):
if main_screen !=None:
main_screen._MsgBox.SetText("Rebooting to LauncherGo")
main_screen._MsgBox.Draw()
main_screen.SwapAndShow()
pygame.time.delay(300)
if "arm" in platform.machine():
os.system("sed -i s/launcher/launchergo/g ~/.bashrc" )
os.system("sudo reboot")
OBJ = APIOBJ()
def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)
@@ -152,7 +152,7 @@ class GPUDriverPage(Page):
self._Scroller.SetCanvasHWND(self._HWND)
def Click(self):
if self._PsIndex > len(self._MyList) -1:
if len(self._MyList) == 0:
return
cur_li = self._MyList[self._PsIndex]
@@ -44,7 +44,7 @@ class NotifyJobListItem(InfoPageListItem):
self._Labels["Text"] = l
done_icon = IconItem()
done_icon._ImgSurf = MyIconPool.GiveIconSurface("done")
done_icon._ImgSurf = MyIconPool._Icons["done"]
done_icon._CanvasHWND = self._Parent._CanvasHWND
done_icon._Parent = self
@@ -7,8 +7,6 @@ from UI.constants import RUNSYS
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.confirm_page import ConfirmPage
from UI.lang_manager import MyLangManager
from UI.skin_manager import MySkinManager
import config
class PowerOffConfirmPage(ConfirmPage):
@@ -50,9 +48,9 @@ class PowerOffConfirmPage(ConfirmPage):
if IsKeyStartOrA(event.key):
if self.CheckBattery() < 20:
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("gameover.png")
cmdpath = "feh --bg-center gameshell/wallpaper/gameover.png;"
else:
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
cmdpath += "sleep 3;"
@@ -24,7 +24,7 @@ from UI.lang_manager import MyLangManager
import config
class ListPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
_BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self):
self._PosX = 0
@@ -47,9 +47,9 @@ class ListPageSelector(PageSelector):
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
#aa_round_rect(self._Parent._CanvasHWND,
# (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h),0 )
class PageListItem(object):
_PosX = 0
@@ -378,7 +378,7 @@ class PowerOptionsPage(Page):
self._Height = self._Screen._Height
done = IconItem()
done._ImgSurf = MyIconPool.GiveIconSurface("done")
done._ImgSurf = MyIconPool._Icons["done"]
done._MyType = ICON_TYPES["STAT"]
done._Parent = self
self._Icons["done"] = done
@@ -521,7 +521,7 @@ class PowerOptionsPage(Page):
i.Draw()
if self._HWND != None:
self._HWND.fill(MySkinManager.GiveColor("White"))
self._HWND.fill((255,255,255))
self._HWND.blit(self._CanvasHWND,(self._PosX,self._PosY,self._Width, self._Height ) )
@@ -7,7 +7,7 @@ import myvars
def InitSoundPage(main_screen):
myvars.SoundPage = SoundPage()
myvars.SoundPage._Screen = main_screen
myvars.SoundPage._Name = "Sound Volume"
myvars.SoundPage._Name = "Sound volume"
myvars.SoundPage.Init()
@@ -15,25 +15,19 @@ from UI.util_funcs import midRect
from UI.keys_def import CurKeys, IsKeyMenuOrB
from UI.slider import Slider
from UI.multi_icon_item import MultiIconItem
from UI.skin_manager import MySkinManager
from UI.icon_pool import MyIconPool
from libs.roundrects import aa_round_rect
import myvars
class SoundSlider(Slider):
OnChangeCB = None
_BGpng = None
_BGwidth = 192
_BGheight = 173
_NeedleSurf = None
_Scale = None
_Parent = None
snd_segs = [ [0,20],[21,40],[41,50],[51,60],[61,70],[71,85],[86,90],[91,95],[96,100] ]
_VolumeLabel =None
def __init__(self):
Slider.__init__(self)
@@ -42,64 +36,67 @@ class SoundSlider(Slider):
self._Width = self._Parent._Width
self._Height = self._Parent._Height
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("vol")
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
##self._NeedleSurf = pygame.Surface( (38,12),pygame.SRCALPHA )
self._Scale = MultiIconItem()
self._Scale._MyType = ICON_TYPES["STAT"]
self._Scale._Parent = self
self._Scale._ImgSurf = MyIconPool.GiveIconSurface("scale")
self._Scale._IconWidth = 82
self._Scale._IconHeight = 63
self._Scale.Adjust(0,0,82,63,0)
self._VolumeLabel = Label()
self._VolumeLabel.SetCanvasHWND(self._CanvasHWND)
self._VolumeLabel.Init("VOLUME",MySkinManager.GiveFont("EurostileBold13"))
self._VolumeLabel.SetColor(MySkinManager.GiveColor('Text'))
def SetValue(self,vol):#pct 0-100
for i,v in enumerate(self.snd_segs):
if vol >= v[0] and vol <= v[1]:
self._Value = i # self._Value : 0 - 8
break
if vol >= 0 and vol <= 100:
self._Value = vol
def Further(self):
self._Value+=1
self._Value+=5
if self._Value > len(self.snd_segs)-1:
self._Value = len(self.snd_segs) -1
vol = self.snd_segs[self._Value][0] + (self.snd_segs[self._Value][1] - self.snd_segs[self._Value][0])/2
if self._Value > 100:
self._Value = 100
if self.OnChangeCB != None:
if callable(self.OnChangeCB):
self.OnChangeCB( vol )
self.OnChangeCB( self._Value )
def StepBack(self):
self._Value-=1
self._Value-=5
if self._Value < 0:
self._Value = 0
vol = self.snd_segs[self._Value][0] + (self.snd_segs[self._Value][1] - self.snd_segs[self._Value][0])/2
if self.OnChangeCB != None:
if callable(self.OnChangeCB):
self.OnChangeCB( vol )
self.OnChangeCB( self._Value )
def Draw(self):
self._BGpng.NewCoord(self._Width/2,self._Height/2 )
self._BGpng.Draw()
start_x = 82
start_y = self._Parent._Screen._Height/2-5
height = 30
width = 4
seg = self._Value / 5
self._Scale.NewCoord(self._Width/2,self._Height/2)
self._Scale._IconIndex = self._Value
for i in range(0, 20):
rect = pygame.Rect(start_x+i*(width*2),start_y,width,height)
if i > seg:
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),rect, 1)
#aa_round_rect(self._CanvasHWND,rect, MySkinManager.GiveColor('Text'),1,1, MySkinManager.GiveColor('White'))
else:
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),rect, 0)
#aa_round_rect(self._CanvasHWND,rect, MySkinManager.GiveColor('Text'),1,0, MySkinManager.GiveColor('White'))
self._Scale.Draw()
self._VolumeLabel.NewCoord(118,self._Parent._Screen._Height/2-30)
self._VolumeLabel.Draw(True)
minus_box_rect = pygame.Rect(start_x- (4+6)*4,start_y,6*4,30)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),minus_box_rect, 0)
minus_rect = pygame.Rect(start_x-8*4,start_y+14,2*4,2)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),minus_rect, 0)
plus_box_rect = pygame.Rect(start_x + 39*4 +4*4,start_y,6*4,30)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),plus_box_rect, 0)
cross1_rect = pygame.Rect(start_x+39*4+4*4+2*4,start_y+14,2*4,2)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),cross1_rect, 0)
cross2_rect = pygame.Rect(start_x+39*4+4*4+2*4+3,start_y+14-3,2,2*4)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),cross2_rect, 0)
class SoundPage(Page):
@@ -13,8 +13,6 @@ from UI.icon_pool import MyIconPool
from UI.label import Label
from UI.util_funcs import midRect
from libs.roundrects import aa_round_rect
class StoragePage(Page):
_Icons = {}
@@ -24,10 +22,10 @@ class StoragePage(Page):
_BGlabel = None
_FreeLabel = None
_BGmsg = "%.1fGB of %.1fGB Used"
_GBmsg = "%.1fGB of %.1fGB Used"
_DskUsg = None
_HighColor = MySkinManager.GiveColor('High')
_TextColor = MySkinManager.GiveColor('Text')
_FootMsg = ["Nav.","","","Back",""]
def __init__(self):
@@ -53,27 +51,24 @@ class StoragePage(Page):
self._Width = self._Screen._Width
self._Height = self._Screen._Height
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("icon_sd")
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._GBLabel = Label()
self._GBLabel.SetCanvasHWND(self._CanvasHWND)
self._GBLabel.Init(self._GBmsg % (self._DskUsg[1]-self._DskUsg[0], self._DskUsg[1]),MySkinManager.GiveFont("varela11") )
self._GBLabel.SetColor(self._TextColor)
self._BGpng.AddLabel(self._BGmsg % (self._DskUsg[1]-self._DskUsg[0], self._DskUsg[1]), MySkinManager.GiveFont("varela15"))
self._BGpng.Adjust(0,0,self._BGwidth,self._BGheight,0)
self._BGlabel = Label()
self._BGlabel.SetCanvasHWND(self._CanvasHWND)
self._PctLabel = Label()
self._PctLabel.SetCanvasHWND(self._CanvasHWND)
usage_percent = (self._DskUsg[0]/self._DskUsg[1] )*100.0
self._BGlabel.Init("%d%%"% int(usage_percent),MySkinManager.GiveFont("varela25"))
self._BGlabel.SetColor( self._HighColor )
self._PctLabel.Init("%d%%"% int(usage_percent),MySkinManager.GiveFont("EurostileBold30"))
self._PctLabel.SetColor( self._TextColor )
self._FreeLabel = Label()
self._FreeLabel.SetCanvasHWND(self._CanvasHWND)
self._FreeLabel.Init("Free",MySkinManager.GiveFont("varela13"))
self._FreeLabel.SetColor(self._BGlabel._Color)
self._FreeLabel.Init("FREE",MySkinManager.GiveFont("varela12"))
self._FreeLabel.SetColor(self._PctLabel._Color)
def OnLoadCb(self):
@@ -82,31 +77,43 @@ class StoragePage(Page):
def Draw(self):
self.ClearCanvas()
self._BGpng.NewCoord(self._Width/2,self._Height/2-10)
self._BGpng.Draw()
self._BGlabel.NewCoord(self._Width/2-28,self._Height/2-30)
self._BGlabel.Draw()
self._PctLabel.NewCoord(32,102- 33)
self._PctLabel.Draw()
self._FreeLabel.NewCoord(self._BGlabel._PosX+10 ,self._Height/2)
self._FreeLabel.NewCoord(33 ,130-25)
self._FreeLabel.Draw()
self._GBLabel.NewCoord(145,103-29)
self._GBLabel.Draw()
#bgcolor = (238,238,238), fgcolor = (126,206,244)
#aa_round_rect
usage_percent = (self._DskUsg[0]/self._DskUsg[1] )
if usage_percent < 0.1:
usage_percent = 0.1
rect_ = midRect(self._Width/2,self._Height-30,170,17, Width,Height)
rect_ = pygame.Rect(144,118-25, 283-144,139-117)
aa_round_rect(self._CanvasHWND, rect_, MySkinManager.GiveColor('Line'), 5, 0, MySkinManager.GiveColor('Line'))
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'), rect_, 1)
rect2 = midRect(self._Width/2,self._Height-30,int(170*(1.0-usage_percent)),17, Width,Height)
rect2 = pygame.Rect(144,118-25,int((283-144)*(1.0-usage_percent)),139-117)
rect2.left = rect_.left
rect2.top = rect_.top
aa_round_rect(self._CanvasHWND,rect2, MySkinManager.GiveColor('Front'),5,0,MySkinManager.GiveColor('Front'))
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),rect2, 0)
sep_rect = pygame.Rect(129,99-25,2,42)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Inactive'),sep_rect, 0)
##4 cross
self.DrawCross(10,10)
self.DrawCross(self._Screen._Width-20,10)
self.DrawCross(10,self._Screen._Height-20)
self.DrawCross(self._Screen._Width-20,self._Screen._Height-20)
class APIOBJ(object):
@@ -50,7 +50,7 @@ class TimeLibStack:
return len(self.stack)
class ListPageSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
_BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self):
self._PosX = 0
@@ -73,9 +73,9 @@ class ListPageSelector(PageSelector):
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
#aa_round_rect(self._Parent._CanvasHWND,
# (x,y,self._Width-4,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width-4,h),0)
class TimezoneListPage(Page):
@@ -176,7 +176,7 @@ class TimezoneListPage(Page):
self.SyncList("/usr/share/zoneinfo/posix")
icon_for_list = MultiIconItem()
icon_for_list._ImgSurf = MyIconPool.GiveIconSurface("sys")
icon_for_list._ImgSurf = MyIconPool._Icons["sys"]
icon_for_list._MyType = ICON_TYPES["STAT"]
icon_for_list._Parent = self
@@ -185,7 +185,7 @@ class TimezoneListPage(Page):
self._BGpng = IconItem()
self._BGpng._ImgSurf = MyIconPool.GiveIconSurface("empty")
self._BGpng._ImgSurf = MyIconPool._Icons["empty"]
self._BGpng._MyType = ICON_TYPES["STAT"]
self._BGpng._Parent = self
self._BGpng.AddLabel("No timezones found on system!", MyLangManager.TrFont("varela22"))
@@ -314,7 +314,7 @@ class APIOBJ(object):
self._UpdatePage = UpdatePage()
self._UpdatePage._Screen = main_screen
self._UpdatePage._Name = "Update Launcher"
self._UpdatePage._Name = "Update"
self._UpdatePage.Init()
def API(self,main_screen):
@@ -10,7 +10,7 @@ from wicd import misc
from UI.constants import Width,Height
from UI.page import Page,PageSelector
from UI.label import Label
from UI.util_funcs import midRect,SwapAndShow,FileExists,ReadTheFileContent
from UI.util_funcs import midRect,SwapAndShow
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.scroller import ListScroller
from UI.confirm_page import ConfirmPage
@@ -82,11 +82,7 @@ class WifiInfoPage(Page):
self._AList["ip"]["value"] = ip
self._AList["bssid"]["value"] = self._Wireless.GetWirelessProperty(self._NetworkId,"bssid")
if FileExists("/sys/class/net/wlan0/address"):
self._AList["mac_addr"]["value"] = ReadTheFileContent("/sys/class/net/wlan0/address").strip().upper()
else:
self._AList["mac_addr"]["value"] = ""
start_x = 0
start_y = 0
@@ -134,16 +130,10 @@ class WifiInfoPage(Page):
bssid["key"] = "bssid"
bssid["label"] = "BSSID"
bssid["value"] = ""
mac_addr = {}
mac_addr["key"] = "mac_addr"
mac_addr["label"] = "MAC ADDR"
mac_addr["value"] = ""
self._AList["ip"] = ip
self._AList["bssid"] = bssid
self._AList["mac_addr"] = mac_addr
self.GenList()
self._DisconnectConfirmPage = WifiDisconnectConfirmPage()
@@ -212,7 +202,7 @@ class WifiInfoPage(Page):
class WifiListSelector(PageSelector):
_BackgroundColor = MySkinManager.GiveColor('Front')
_BackgroundColor = MySkinManager.GiveColor('Line')
def __init__(self):
pass
@@ -231,9 +221,8 @@ class WifiListSelector(PageSelector):
self._PosX = x
self._PosY = y
self._Height = h
aa_round_rect(self._Parent._CanvasHWND,
(x,y,self._Width,h),self._BackgroundColor,4,0,self._BackgroundColor)
pygame.draw.rect(self._Parent._CanvasHWND,self._BackgroundColor,(x,y,self._Width,h),0)
class WifiListMessageBox(Label):
@@ -248,7 +237,7 @@ class WifiListMessageBox(Label):
padding = 10
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('White'),(x-padding,y-padding, w+padding*2,h+padding*2))
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Black'),(x-padding,y-padding, w+padding*2,h+padding*2),1)
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),(x-padding,y-padding, w+padding*2,h+padding*2),1)
self._CanvasHWND.blit(my_text,(x,y,w,h))
@@ -8,6 +8,8 @@ import pygame
from UI.page import Page
from UI.label import Label
from UI.lang_manager import MyLangManager
from UI.skin_manager import MySkinManager
# a item for List
# - - - - - - - - - - - --
# | Icon Text..... > |
@@ -50,6 +52,6 @@ class ListItem(object):
self._Labels["Text"]._PosY = self._PosY + (self._Height - self._Labels["Text"]._Height)/2
self._Labels["Text"].Draw()
pygame.draw.line(self._Parent._CanvasHWND,(169,169,169),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
pygame.draw.line(self._Parent._CanvasHWND,MySkinManager.GiveColor('Line'),(self._PosX,self._PosY+self._Height-1),(self._PosX+self._Width,self._PosY+self._Height-1),1)
@@ -49,7 +49,7 @@ class ListPage(Page):
ps._PosX = 2
self._Ps = ps
self._PsIndex = 0
# "" pkgname, label
alist = [["","Airplane","Airplane Mode"],
["","PowerOptions","Power Options"],
@@ -61,15 +61,14 @@ class ListPage(Page):
["","Time","Timezone"],
["","Languages","Languages"],
["","Notification","Notification"],
["","Update", "Update Launcher"],
["","Update", ""],
["","Cores", "Retroarch cores manager"],
["","About", "About"],
["","PowerOFF","Power OFF"],
["","ButtonsLayout","Buttons Layout"],
["","Skins","Theme Manager"],
["","LauncherGo","Switch to LauncherGo"],
#["","LauncherGo","Switch to LauncherGo"],
["","Lima","GPU Driver Switch"],
["","GateWay","Network gateway switch"]]
["","GateWay","Network Gateway Switch"]]
start_x = 0
start_y = 0
@@ -7,7 +7,6 @@ from UI.constants import RUNSYS
from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB
from UI.confirm_page import ConfirmPage
from UI.lang_manager import MyLangManager
from UI.skin_manager import MySkinManager
import config
@@ -50,9 +49,9 @@ class PowerOffConfirmPage(ConfirmPage):
if IsKeyStartOrA(event.key):
if self.CheckBattery() < 20:
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("gameover.png")
cmdpath = "feh --bg-center gameshell/wallpaper/gameover.png;"
else:
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
cmdpath += "sleep 3;"
@@ -62,7 +61,7 @@ class PowerOffConfirmPage(ConfirmPage):
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
if event.key == CurKeys["X"]:
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
cmdpath = "feh --bg-center gameshell/wallpaper/seeyou.png;"
cmdpath += "sleep 3;"
cmdpath += "sudo reboot"
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
@@ -77,7 +76,7 @@ class APIOBJ(object):
self._Page = PowerOffConfirmPage()
self._Page._Screen = main_screen
self._Page._Name ="Power OFF"
self._Page._Name ="SHUTDOWN"
self._Page.Init()
+1 -10
View File
@@ -46,14 +46,7 @@ sudo apt-get -y install mpd ncmpcpp git libuser
sudo apt-get -y install python-wicd wicd wicd-curses python-pycurl python-alsaaudio python-pygame python-gobject python-xlib
sudo apt-get -y install python-pip
sudo pip install validators numpy requests python-mpd2 beeprint
```
### With pip install and virtualenv
```
mkvirtualenv launcher
pip install -r requirements.txt
sudo pip install validators numpy requests python-mpd2
```
# Create “.mpd_cpi.conf” config
@@ -90,5 +83,3 @@ audio_output {
filesystem_charset "UTF-8"
```
-18
View File
@@ -1,18 +0,0 @@
max-connection-per-server=5
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
log-level=error
log=/tmp/aria.log
dir=/home/cpi/aria2download
daemon=true
allow-overwrite=true
split=1
max-concurrent-downloads=100
disk-cache=15M
timeout=600
retry-wait=30
max-tries=50
save-session-interval=10
disable-ipv6=true
save-session=/home/cpi/aria2download/aria.session.txt
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash
FIRM=$(cat /proc/driver/brcmf_fw)
FIRM=`cat /proc/driver/brcmf_fw`
if [[ $FIRM =~ .*a0.* ]]
then
-9
View File
@@ -1,9 +0,0 @@
{
"folders":
[
{
"path": ".",
"name": "GameShell launcher"
}
],
}
+13 -2
View File
@@ -1,7 +1,18 @@
#!/bin/bash
BASENAME=$(dirname "$0")
BASENAME=`dirname "$0"`
cd "$BASENAME"/sys.py || exit
cd $BASENAME/sys.py
if [ ! -f ~/.apps_menu_updated ]
then
cd ~/apps/Menu && git pull origin gcores
if [ $? -eq 0 ]; then
touch ~/.apps_menu_updated
fi
cd -
fi
python run.py
-10
View File
@@ -1,10 +0,0 @@
pycurl
pygame
#gobject
xlib
pyalsaaudio
dbus-python
#wicd - not pip installable yet
#beeprint - causes bugs
validators
python-mpd
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Some files were not shown because too many files have changed in this diff Show More