@ -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._Icons["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._Icons["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):
|
||||
|
||||
|
||||
@ -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._Icons["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._Icons["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,60 +51,83 @@ class StoragePage(Page):
|
||||
self._Width = self._Screen._Width
|
||||
self._Height = self._Screen._Height
|
||||
|
||||
self._BGpng = IconItem()
|
||||
self._BGpng._ImgSurf = MyIconPool._Icons["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("Eurostile12"))
|
||||
self._FreeLabel.SetColor(self._PctLabel._Color)
|
||||
|
||||
|
||||
def OnLoadCb(self):
|
||||
pass
|
||||
|
||||
def DrawCross(self,topleft,top):
|
||||
start_x = topleft
|
||||
start_y = top
|
||||
width = 2
|
||||
height = 10
|
||||
padding = 4
|
||||
|
||||
rect1 = pygame.Rect(start_x+padding,start_y,width,height)
|
||||
rect2 = pygame.Rect(start_x,start_y+padding,height,width)
|
||||
|
||||
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),rect1, 0)
|
||||
pygame.draw.rect(self._CanvasHWND,MySkinManager.GiveColor('Text'),rect2, 0)
|
||||
|
||||
|
||||
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):
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 198 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 875 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 316 B After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 562 B After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 1.8 KiB |
BIN
skin/default/truetype/EurostileMN-ExtendedBold.pfb.ttf
Normal file
BIN
skin/default/truetype/EurostileMN-Medium.pfb.ttf
Normal file
@ -100,7 +100,7 @@ class RomListPage(Page):
|
||||
_Selector=None
|
||||
_FootMsg = ["Nav","Del","Scan","Back","Run","AddFav"]
|
||||
_MyList = []
|
||||
_ListFont = MyLangManager.Tr("notosanscjk15")
|
||||
_ListFont = MyLangManager.TrFont("notosanscjk15")
|
||||
_MyStack = None
|
||||
_Emulator = None
|
||||
_Parent = None
|
||||
|
||||
@ -157,7 +157,7 @@ class Page(Widget):
|
||||
ps = PageSelector()
|
||||
ps._IconSurf = MyIconPool._Icons["blueselector"]
|
||||
ps._Parent = self
|
||||
ps.Init(start_x,start_y,92,92,128)
|
||||
ps.Init(start_x,start_y,MyIconPool._Sizes["blueselector"][0],MyIconPool._Sizes["blueselector"][1],128)
|
||||
|
||||
self._Ps = ps
|
||||
self._PsIndex = 0
|
||||
@ -209,7 +209,7 @@ class Page(Widget):
|
||||
ps = PageSelector()
|
||||
ps._IconSurf = MyIconPool._Icons["blueselector"]
|
||||
ps._Parent = self
|
||||
ps.Init(start_x,start_y,92,92,128)
|
||||
ps.Init(start_x,start_y,MyIconPool._Sizes["blueselector"][0],MyIconPool._Sizes["blueselector"][1],128)
|
||||
|
||||
self._Ps = ps
|
||||
self._PsIndex = 0
|
||||
@ -247,7 +247,7 @@ class Page(Widget):
|
||||
ps = PageSelector()
|
||||
ps._IconSurf = MyIconPool._Icons["blueselector"]
|
||||
ps._Parent = self
|
||||
ps.Init(icon_width/2,icon_height/2,92,92,128)
|
||||
ps.Init(icon_width/2,icon_height/2,MyIconPool._Sizes["blueselector"][0],MyIconPool._Sizes["blueselector"][1],128)
|
||||
self._Ps = ps
|
||||
self._PsIndex = 0
|
||||
self._OnShow = False
|
||||
@ -270,7 +270,7 @@ class Page(Widget):
|
||||
ps = PageSelector()
|
||||
ps._IconSurf = MyIconPool._Icons["blueselector"]
|
||||
ps._Parent = self
|
||||
ps.Init(start_x,start_y,92,92,128)
|
||||
ps.Init(start_x,start_y,MyIconPool._Sizes["blueselector"][0],MyIconPool._Sizes["blueselector"][1],128)
|
||||
self._Ps = ps
|
||||
self._PsIndex = 0
|
||||
self._OnShow = False
|
||||
@ -289,7 +289,7 @@ class Page(Widget):
|
||||
ps = PageSelector()
|
||||
ps._IconSurf = MyIconPool._Icons["blueselector"]
|
||||
ps._Parent = self
|
||||
ps.Init(start_x,start_y-self._SelectedIconTopOffset,92,92,128)
|
||||
ps.Init(start_x,start_y-self._SelectedIconTopOffset,MyIconPool._Sizes["blueselector"][0],MyIconPool._Sizes["blueselector"][1],128)
|
||||
|
||||
self._Ps = ps
|
||||
self._PsIndex = 0
|
||||
@ -325,7 +325,7 @@ class Page(Widget):
|
||||
ps = PageSelector()
|
||||
ps._IconSurf = MyIconPool._Icons["blueselector"]
|
||||
ps._Parent = self
|
||||
ps.Init(start_x,start_y,icon_width+4,icon_height+4,128)
|
||||
ps.Init(start_x,start_y,MyIconPool._Sizes["blueselector"][0]+4,MyIconPool._Sizes["blueselector"][1]+4,128)
|
||||
self._Ps = ps
|
||||
self._PsIndex = 0
|
||||
self._OnShow = False
|
||||
@ -648,6 +648,6 @@ class Page(Widget):
|
||||
def Draw(self):
|
||||
self.ClearCanvas()
|
||||
self.DrawIcons()
|
||||
self.DrawPageSelector()
|
||||
#self.DrawPageSelector()
|
||||
|
||||
|
||||
|
||||
@ -47,11 +47,22 @@ class SkinManager(object):
|
||||
skinpath = config.SKIN+"/truetype"
|
||||
fonts_path = {}
|
||||
fonts_path["varela"] = "%s/VarelaRound-Regular.ttf" % skinpath
|
||||
print(fonts_path["varela"])
|
||||
|
||||
fonts_path["veramono"] = "%s/VeraMono.ttf" % skinpath
|
||||
fonts_path["noto"] = "%s/NotoSansMono-Regular.ttf" % skinpath
|
||||
fonts_path["notocjk"] = "%s/NotoSansCJK-Regular.ttf" % skinpath
|
||||
|
||||
fonts_path["Eurostile"] = "%s/EurostileMN-Medium.pfb.ttf" %skinpath
|
||||
fonts_path["EurostileBold"] = "%s/EurostileMN-ExtendedBold.pfb.ttf" % skinpath
|
||||
|
||||
self._Fonts["Eurostile10"] = pygame.font.Font(fonts_path["Eurostile"],10)
|
||||
self._Fonts["Eurostile11"] = pygame.font.Font(fonts_path["Eurostile"],11)
|
||||
self._Fonts["Eurostile12"] = pygame.font.Font(fonts_path["Eurostile"],12)
|
||||
self._Fonts["Eurostile13"] = pygame.font.Font(fonts_path["Eurostile"],13)
|
||||
|
||||
self._Fonts["EurostileBold13"] = pygame.font.Font(fonts_path["EurostileBold"],13)
|
||||
|
||||
self._Fonts["EurostileBold30"] = pygame.font.Font(fonts_path["EurostileBold"],30)
|
||||
|
||||
for i in range(10,29):
|
||||
self._Fonts["varela%d"%i] = pygame.font.Font(fonts_path["varela"],i)
|
||||
|
||||
@ -73,15 +84,16 @@ class SkinManager(object):
|
||||
def SetColors(self):
|
||||
Colors = {}
|
||||
Colors["High"] = pygame.Color(51, 166, 255)
|
||||
Colors["Text"] = pygame.Color(83, 83, 83)
|
||||
Colors["Text"] = pygame.Color(42, 140, 121)
|
||||
Colors["ReadOnlyText"] = pygame.Color(130,130,130)
|
||||
Colors["Front"] = pygame.Color(131, 199, 219)
|
||||
Colors["URL"] = pygame.Color(51, 166, 255)
|
||||
Colors["Line"] = pygame.Color(169, 169, 169)
|
||||
Colors["TitleBg"] = pygame.Color(228, 228, 228)
|
||||
Colors["Line"] = pygame.Color(42, 140, 121)
|
||||
Colors["TitleBg"] = pygame.Color(11, 16, 22)
|
||||
Colors["Active"] = pygame.Color(175, 90, 0)
|
||||
Colors["Inactive"] = pygame.Color(27,78,72)
|
||||
Colors["Disabled"] = pygame.Color(204, 204, 204)
|
||||
Colors["White"] = pygame.Color(255, 255, 255)
|
||||
Colors["White"] = pygame.Color(11, 16, 22)
|
||||
Colors["Black"] = pygame.Color(0, 0, 0)
|
||||
|
||||
SkinManager._Colors = Colors
|
||||
|
||||
@ -12,7 +12,7 @@ MPD_socket = "/tmp/mpd.socket"
|
||||
|
||||
UPDATE_URL="https://raw.githubusercontent.com/clockworkpi/CPI/master/launcher_ver.json"
|
||||
|
||||
VERSION="stable 1.24"
|
||||
VERSION="gcores stable 1.0"
|
||||
|
||||
SKIN="../skin/default"
|
||||
|
||||
|
||||