Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- init python:
- # своя версия команды show
- def my_show(name, at_list=[], layer=None, what=None, zorder=None, tag=None, behind=[], atl=None, transient=False, munge_name=True):
- # добавляем в хвост имени разрешение
- name = name + ("x" + str(config.screen_width) + "x" + str(config.screen_height), )
- # вызываем стандартную команду show
- renpy.show(name, at_list, layer, what, zorder, tag, behind, atl, transient, munge_name)
- # меняем вызов команды show на наш вариант
- config.show = my_show
- # смена разрешения
- def resolution(w = 800, h = 600):
- config.screen_width, config.screen_height = (w, h)
- # перерисовка окна (способ дурацкий, но другого не придумалось)
- fs = _preferences.fullscreen
- Preference("display", 1.0)()
- if fs:
- Preference("display", "fullscreen")()
- # превращаем в action, чтобы можно было привязать к кнопке
- Resolution = renpy.curry(resolution)
- init:
- image cg x800x600 = "images/cg_x800x600.jpg"
- image cg x1920x1080 = "images/cg_x1920x1080.jpg"
- label start:
- show cg
- pause
- $ resolution(1920, 1080)
- show cg
- pause
- $ resolution(800, 600)
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement