__("{b}Warning{/b}\nContinuing will overwrite customized bar, button, save slot, scrollbar, and slider images.\n\nWhat would you like to do?") +
__("{size=-4}\n\nThis will not overwrite gui/main_menu.png, gui/game_menu.png, and gui/window_icon.png, but will create files that do not exist.{/size}"),
[
("change", _("Choose new colors, then regenerate image files.")),
("regenerate", _("Regenerate the image files using the colors in gui.rpy.")),
],
None,
cancel=Jump("front_page"),
)
if mode == "change":
jump gui_project_common
else:
jump gui_generate_images
label new_gui_project:
python:
gui_new = True
gui_replace_images = True
gui_replace_code = True
gui_update_code = True
label gui_project_size:
python:
default_size = (1920, 1080)
gui_size = interface.choice(
_("What resolution should the project use? Although Ren'Py can scale the window up and down, this is the initial size of the window, the size at which assets should be drawn, and the size at which the assets will be at their sharpest.\n\nThe default of [default_size[0]]x[default_size[1]] is a reasonable compromise."),
[
((1280, 720), "1280x720"),
((1920, 1080), "1920x1080"),
((2560, 1440), "2560x1440"),
((3840, 2160), "3840x2160"),
("custom", _("Custom. The GUI is optimized for a 16:9 aspect ratio.")),
],
default_size,
cancel=Jump("front_page"),
)
if gui_size == "custom":
gui_width = ""
while True:
gui_width = interface.input(
_("WIDTH"),
_("Please enter the width of your game, in pixels."),
cancel=Jump("front_page"),
allow=interface.DIGITS_LETTERS,
)
try:
gui_width = int(gui_width)
except Exception:
interface.error(_("The width must be a number."), label=None)
continue
break
gui_height = ""
while True:
gui_height = interface.input(
_("HEIGHT"),
_("Please enter the height of your game, in pixels."),
cancel=Jump("front_page"),
allow=interface.DIGITS_LETTERS,
)
try:
gui_height = int(gui_height)
except Exception:
interface.error(_("The height must be a number."), label=None)
continue
break
gui_size = (gui_width, gui_height)
label gui_project_common:
$ gui_color = (DARK_COLORS[0], "#000000", False)
call screen choose_gui_color
python hide:
width, height = gui_size
accent, boring, light = gui_color
prefix = os.path.join(project_dir, "game")
if not os.path.isdir(prefix) and not gui_new:
interface.error("{} does not appear to be a Ren'Py game.".format(prefix))