Files
LihonT/sdk/lihont-ltp/examples/04_picture.py
2026-11-01 17:52:48 +03:00

10 lines
584 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Пример 4: картинка в углу приложения. Файл star.png лежит в папке files рядом со скриптом.
from lihont_ltp import *
plugin = Plugin("Звезда в углу", author="Вася", description="Звёздочка живёт в углу приложения")
# двигается пальцем; при нажатии качнётся (wiggle). Если добавить like, будет ставить лайк видео.
plugin.screen(picture("star.png", size=100, right=16, bottom=120, on_tap=[wiggle]))
plugin.save()