Sol Reklam
Sağ Reklam
What's new

[Python]Shop Title like Ikarus

KONU YAZAR

Baba16

New member
Onaylı Üye
Apr
15
14
1
131490_21cee5ac084478355e2782a8f268a602.png

ui.py xxthinboard(window) change class

thx:metin2008


Python:


class ThinBoard(Window):
CORNER_WIDTH = 0
CORNER_HEIGHT = 0
BOARD_COLOR = grp.GenerateColor(0.0, 0.0, 0.0, 0.25)
BOARD_BASE_COLOR = grp.GenerateColor(0.0, 0.0, 0.0, 0.50)
def __init__(self):
Window.__init__(self)

Box = Box()
Box.SetParent(self)
Box.AddFlag("attach")
Box.AddFlag("not_pick")
Box.SetPosition(self.CORNER_WIDTH, self.CORNER_HEIGHT)
Box.SetColor(self.BOARD_BASE_COLOR)
Box.Show()
self.Box = Box

Base = Bar()
Base.SetParent(self.Box)
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=33):
width = max(self.CORNER_WIDTH*2, width-60)
height = max(self.CORNER_HEIGHT*2, height)
Window.SetSize(self, width, height)
self.Base.SetSize(width - self.CORNER_WIDTH*2, height - self.CORNER_HEIGHT*2)
self.Box.SetSize(width - self.CORNER_WIDTH*2, height - self.CORNER_HEIGHT*2)

def ShowInternal(self):
self.Base.Show()
self.Box.Show()

def HideInternal(self):
self.Base.Hide()
self.Box.Hide()​
 
Back
Top