Пример #1
0
def make_text(text, font_size=style.FONT_SIZE, font_color=style.FONT_COLOR):
    params = {"font_color":font_color, "font_size":font_size}
    button = Element(text, normal_params=params)
    if not "\n" in text:
        button.set_style("text")
    button.finish()
    if "\n" in text:
        button.scale_to_title()
        button.set_main_color((0,0,0,0))
    return button
def make_text(text, font_size=None, font_color=None):
    if font_size is None: font_size = style.FONT_SIZE
    if font_color is None: font_color = style.FONT_COLOR
    params = {"font_color": font_color, "font_size": font_size}
    button = Element(text, normal_params=params, finish=False)
    if not "\n" in text:
        button.set_style("text")
    button.finish()
    if "\n" in text:
        button.scale_to_title()
        button.set_main_color((0, 0, 0, 0))
    return button
Пример #3
0
 def set_main_color(self, color, state=None):
     Element.set_main_color(self, color, state)
Пример #4
0
 def set_main_color(self, color, state=None):
     Element.set_main_color(self, color, state)