コード例 #1
0
ファイル: text.py プロジェクト: dmaccarthy/sc8pr
 def config(self, **kwargs):
     keys = ("data", "color", "bg", "font", "fontSize", "fontStyle",
         "height", "width", "align", "padding", "spacing", "weight",
         "border", "promptColor")
     if hasAny(kwargs, keys): self.stale = True
     for a in kwargs:
         v = kwargs[a]
         if v and a in ("bg", "color", "border", "promptColor"): v = rgba(v)
         setattr(self, a, v)
     return self
コード例 #2
0
ファイル: text.py プロジェクト: TheVinhLuong102/sc8pr
 def config(self, **kwargs):
     keys = ("bg", "color", "border", "promptColor", "data", "font",
             "fontSize", "fontStyle", "height", "width", "align", "padding",
             "spacing", "weight")
     if hasAny(kwargs, keys): self.stale = True
     for a in kwargs:
         v = kwargs[a]
         if v and a in keys[:4]: v = rgba(v)
         setattr(self, a, v)
     return self
コード例 #3
0
 def config(self, **kwargs):
     keys = "fill", "stroke", "weight", "radius"
     if hasAny(kwargs, keys): self._srf = None
     return super().config(**kwargs)
コード例 #4
0
ファイル: shape.py プロジェクト: dmaccarthy/sc8pr
 def config(self, **kwargs):
     keys = "fill", "stroke", "weight", "radius"
     if hasAny(kwargs, keys): self._srf = None
     return super().config(**kwargs)