File: prism-renpy.html

package info (click to toggle)
node-prismjs 1.30.0%2Bdfsg%2B~1.26.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,220 kB
  • sloc: javascript: 27,628; makefile: 9; sh: 7; awk: 4
file content (113 lines) | stat: -rw-r--r-- 2,809 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<h2>Comments</h2>
<pre><code># This is a comment</code></pre>

<h2>Strings</h2>
<pre><code>"foo \"bar\" baz"
'foo \'bar\' baz'
""" "Multi-line" strings
are supported."""
''' 'Multi-line' strings
are supported.'''</code></pre>

<h2>Python</h2>
<pre><code>class Dog:

    tricks = []             # mistaken use of a class variable

    def __init__(self, name):
        self.name = name

    def add_trick(self, trick):
        self.tricks.append(trick)</code></pre>

<h2>Properties</h2>
<pre><code>style my_text is text:
    size 40
    font "gentium.ttf"</code></pre>

<h2>Configuration</h2>
<pre><code>init -1:
    python hide:

        ## Should we enable the use of developer tools? This should be
        ## set to False before the game is released, so the user can't
        ## cheat using developer tools.

        config.developer = True

        ## These control the width and height of the screen.

        config.screen_width = 800
        config.screen_height = 600

        ## This controls the title of the window, when Ren'Py is
        ## running in a window.

        config.window_title = u"The Question"</code></pre>


<h2>Full example</h2>
<pre><code># Declare images used by this game.
image bg lecturehall = "lecturehall.jpg"
image bg uni = "uni.jpg"
image bg meadow = "meadow.jpg"
image bg club = "club.jpg"

image sylvie normal = "sylvie_normal.png"
image sylvie giggle = "sylvie_giggle.png"
image sylvie smile = "sylvie_smile.png"
image sylvie surprised = "sylvie_surprised.png"

image sylvie2 normal = "sylvie2_normal.png"
image sylvie2 giggle = "sylvie2_giggle.png"
image sylvie2 smile = "sylvie2_smile.png"
image sylvie2 surprised = "sylvie2_surprised.png"

# Define characters used by this game.
define s = Character('Sylvie', color="#c8ffc8")
define m = Character('Me', color="#c8c8ff")


# The game starts here.
label start:

    $ bl_game = False

    play music "illurock.ogg"

    scene bg lecturehall
    with fade

    "Well, professor Eileen's lecture was interesting."
    "But to be honest, I couldn't concentrate on it very much."
    "I had a lot of other thoughts on my mind."
    "And they all ended up with a question."
    "A question, I've been meaning to ask someone."

    scene bg uni
    with fade

    "When we came out of the university, I saw her."

    show sylvie normal
    with dissolve

    "She was a wonderful person."
    "I've known her ever since we were children."
    "And she's always been a good friend."
    "But..."
    "Recently..."
    "I think..."
    "... that I wanted more."
    "More just talking... more than just walking home together when our classes ended."
    "And I decided..."

    menu:

        "... to ask her right away.":

            jump rightaway

        "... to ask her later.":

            jump later</code></pre>