Last active
March 16, 2017 22:07
-
-
Save uyjulian/0972d73ac7e37b848991c051575278fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init python: | |
import sys, os, subprocess | |
def launch(path): | |
# Find the python executable to run. | |
executable_path = os.path.dirname(sys.executable) | |
if renpy.renpy.windows: | |
extension = ".exe" | |
else: | |
extension = "" | |
if persistent.windows_console: | |
executables = [ "python" + extension ] | |
else: | |
executables = [ "pythonw" + extension ] | |
executables.append(sys.executable) | |
for i in executables: | |
executable = os.path.join(executable_path, i) | |
if os.path.exists(executable): | |
break | |
else: | |
raise Exception("Python interpreter not found: %r", executables) | |
# Put together the basic command line. | |
cmd = [ executable, "-EO", sys.argv[0], path ] | |
# Convert from filesystem encoding to unicode. | |
cmd = [ renpy.fsencode(i) for i in cmd ] | |
# Change directory | |
os.chdir(renpy.config.basedir) | |
subprocess.Popen(cmd) | |
init -1 python hide: | |
theme.roundrect( | |
## The color of an idle widget face. | |
widget = "#003c78", | |
## The color of a focused widget face. | |
widget_hover = "#0050a0", | |
## The color of the text in a widget. | |
widget_text = "#c8ffff", | |
## The color of the text in a selected widget. (For | |
## example, the current value of a preference.) | |
widget_selected = "#ffffc8", | |
## The color of a disabled widget face. | |
disabled = "#404040", | |
## The color of disabled widget text. | |
disabled_text = "#c8c8c8", | |
## The color of informational labels. | |
label = "#ffffff", | |
## The color of a frame containing widgets. | |
frame = "#000000", | |
## If this is True, the in-game window is rounded. If False, | |
## the in-game window is square. | |
rounded_window = False, | |
## The background of the main menu. This can be a color | |
## beginning with '#', or an image filename. The latter | |
## should take up the full height and width of the screen. | |
mm_root = "#000000", | |
## The background of the game menu. This can be a color | |
## beginning with '#', or an image filename. The latter | |
## should take up the full height and width of the screen. | |
gm_root = "#000000", | |
## And we're done with the theme. The theme will customize | |
## various styles, so if we want to change them, we should | |
## do so below. | |
) | |
label main_menu: | |
jump start | |
label yesno_prompt: | |
$ renpy.quit() | |
label start: | |
menu: | |
"Game 1": | |
$ launch("/path/to/game/1") | |
"Game 2": | |
$ launch("/path/to/game/2") | |
$ renpy.iconify() | |
stop music fadeout 1.0 | |
pause 1.1 | |
$ renpy.quit() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment