Code:
if not os.path.exists("czcionka/font.cfg"):
f = open("czcionka/font.cfg", "w")
f.write("Georgia:13|Georgia:13|Georgia:11")
f.close()
f = open("czcionka/font.cfg", "r+")
split = f.read().split("|")
UI_DEF_FONT = "" + split[0] + ""
UI_DEF_FONT_LARGE = "" + split[1] + ""
UI_DEF_FONT_SMALL = "" + split[2] + ""
f.close()
Code:
import os
import locale
Code:
elif Type == "podstawa":
parent.Children[Index] = ThinBoard_podstawa()
parent.Children[Index].SetParent(parent)
self.LoadElementThinBoard(parent.Children[Index], ElementValue, parent)
Code:
class ThinBoard_podstawa(Window):
CORNER_WIDTH = 16
CORNER_HEIGHT = 16
LINE_WIDTH = 16
LINE_HEIGHT = 16
BOARD_COLOR = grp.GenerateColor(0.0, 0.0, 0.0, 0.0)
LT = 0
LB = 1
RT = 2
RB = 3
L = 0
R = 1
T = 2
B = 3
def __init__(self, layer = "UI"):
Window.__init__(self, layer)
Base = Bar()
Base.SetParent(self)
Base.AddFlag("attach")
Base.AddFlag("not_pick")
Base.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT)
Base.SetColor(self.BOARD_COLOR)
Base.Show()
self.Base = Base
def __del__(self):
Window.__del__(self)
def SetSize(self, width, height):
width = max(self.CORNER_WIDTH*2, width)
height = max(self.CORNER_HEIGHT*2, height)
Window.SetSize(self, width, height)
verticalShowingPercentage = float((height - self.CORNER_HEIGHT*2) - self.LINE_HEIGHT) / self.LINE_HEIGHT
horizontalShowingPercentage = float((width - self.CORNER_WIDTH*2) - self.LINE_WIDTH) / self.LINE_WIDTH
self.Base.SetSize(width - self.CORNER_WIDTH*2, height - self.CORNER_HEIGHT*2)
def ShowInternal(self):
self.Base.Show()
def HideInternal(self):
self.Base.Hide()