summaryrefslogtreecommitdiffhomepage
path: root/cheatsheet/cheatsheet.html
blob: 48f5862a65093c8199d67206a76d0234fa07fd14 (plain)
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

        <title>raylib - cheatsheet</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

        <meta name="title" content="raylib - cheatsheet">
        <meta name="description" content="raylib is a simple and easy-to-use library to enjoy videogames programming. Don't miss latest functions added to raylib... check raylib cheatsheet">
        <meta name="keywords" content="raylib, videogames, programming, C, C++, library, learn, study, simple, easy, free, open source, raysan">
        <meta name="viewport" content="width=device-width">

        <!-- Open Graph metatags for sharing -->
        <meta property="og:title" content="raylib - cheatsheet"/>
        <meta property="og:image" content="https://www.raylib.com/common/img/raylib_logo_card.png"/>
        <meta property="og:url" content="https://www.raylib.com" />
        <meta property="og:site_name" content="raylib"/>
        <meta property="og:description" content="Don't miss latest functions added to raylib... check raylib cheatsheet"/>

        <!-- hightlight.js - Syntax highlighting for the Web -->
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/docco.min.css">
        <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script>

        <style type="text/css">
         @font-face {
             font-family: 'grixel_acme_7_wide_xtnd';
             src: url('../common/font/acme_7_wide_xtnd.eot');
             src: url('../common/font/acme_7_wide_xtnd.eot?#iefix') format('embedded-opentype'),
             url('../common/font/acme_7_wide_xtnd.woff') format('woff'),
             url('../common/font/acme_7_wide_xtnd.ttf') format('truetype');
             font-weight: normal;
             font-style: normal;
             font-size-adjust:0.49;
         }
         body{background-color:#f5f5f5;}

         .eximage img{margin: 0 auto; border: 1px solid; border-color: black; width:770px; height:auto;}
         p{font-family: grixel_acme_7_wide_xtnd, Courier New, Verdana, Arial; font-size:13px; line-height:24px;}
         a{font-family: grixel_acme_7_wide_xtnd, Courier New, Verdana, Arial; font-size:13px; line-height:24px;}
         pre code{font-family: Courier New; font-size:12px; width: auto!important; border: 1px solid; border-color:#b0b0b0; width:758px; height:auto; }
         .exdownbtn{
             width:250px; height:30px; float:left; position: relative; cursor:pointer; font-weight:bold; font-size:10px;
             line-height:30px; text-align: center; border-width:5px; background-color:#e1e1e1; color:#5c5a5a;
             border:4px solid #898888; font-family: grixel_acme_7_wide_xtnd, Courier New, Verdana, Arial;
         }
         .exdownbtn:hover{background-color:#f0d6d6; color:#c55757; border:4px solid #e66666;}
         #core pre code{border:10px solid; border-color:#888888; background-color:#dbdbe1; }
         #shapes pre code{border:10px solid; border-color:#e66666; background-color:#e9d0d6; }
         #textures pre code{border:10px solid; border-color:#75a06d; background-color:#c3e4bf; }
         #text pre code{border:10px solid; border-color:#52b296; background-color:#b9e9dd; }
         #models pre code{border:10px solid; border-color:#5d9cbd; background-color:#b9d6e8; }
         #audio pre code{border:10px solid; border-color:#d3b157; background-color:#e5d7ae; }
         #structs pre code{border:10px solid; border-color:#d2c9c6; background-color:#f8f8ff;}
         #colors pre code{border:10px solid; border-color:#c6d2c6; background-color:#e9f1f2;}

         #logo{width:128px; height:128px; float:left; position:relative; background-image:url(../common/img/raylib_logo.png);}
         #header{position:relative; height:110px; max-width: 1000px;}
         #title, #plinks, #version{position:relative; float:left; margin:0px; margin-left:10px; margin-top:10px;}
         #plinks{color: gray;}
         #plinks a, #copyright a{color: gray; text-decoration:none;}
         #plinks a:hover{color: black;}
         #version {margin-top: 23px; max-width:500px;}
         #pcore{margin-bottom:-12px; margin-left:12px; color:#5c5a5a;}
         #pshapes{margin-bottom:-12px; margin-left:12px; color:#c55757;}
         #ptextures{margin-bottom:-12px; margin-left:12px; color:#60815a;}
         #ptext{margin-bottom:-12px; margin-left:12px; color:#377764;}
         #pmodels{margin-bottom:-12px; margin-left:12px; color:#417794;}
         #paudio{margin-bottom:-12px; margin-left:12px; color:#8c7539;}
         #pstructs{margin-bottom:-12px; margin-left:12px; color:#bcbccd;}
         #pcolors{margin-bottom:-12px; margin-left:12px; color:#bcbccd;}

         #fullgroup{
             display: grid;
             grid-column-gap: 20px;
             grid-template-columns: auto auto;
         }

         #copyright p{color:#8b8b8b; font-size:10px}
         #copyright a:hover{color:black;}

         #downpdf{text-decoration: none;color:#aaaaaa;}
         #downpdf:hover{color:#444;}

         #fulldata p a {color:#0eefff; text-decoration: none;}

        /* for the tired programmers at night */
        .darkmode{background-color:#1e1e1e; color:#e1e1e1;}
        .darkmode a{color:#e1e1e1;}
        .darkmode #header{background-color:#1e1e1e; color:#e1e1e1;}
        .darkmode #title{color:#e1e1e1;}
        .darkmode #plinks{color:#e1e1e1;}
        .darkmode #plinks a{color:#e1e1e1;}
        .darkmode #plinks a:hover{color:#e1e1e1;}
        .darkmode #version{color:#e1e1e1;}
        .darkmode #pcore{color:#e1e1e1;}
        .darkmode #pshapes{color:#e1e1e1;}
        .darkmode #ptextures{color:#e1e1e1;}
        .darkmode #ptext{color:#e1e1e1;}
        .darkmode #pmodels{color:#e1e1e1;}
        .darkmode #paudio{color:#e1e1e1;}
        .darkmode #pstructs{color:#e1e1e1;}
        .darkmode #pcolors{color:#e1e1e1;}

         @media screen and (max-width: 1550px) {
            #fullgroup {
                grid-template-columns: auto;
            }

            .leftgroup, .rightgroup {
                overflow-x: auto;
            }
         }
        </style>

        <script type="text/javascript">
         document.addEventListener('DOMContentLoaded', function() {
            function addModule(url, targetSelector) {
                fetch(url)
                    .then(response => response.text())
                    .then(data => {
                        document.querySelector(targetSelector).innerHTML = data;
                        document.querySelectorAll(targetSelector).forEach(function(e) {
                            hljs.highlightBlock(e);
                        });
                    })
                    .catch(error => console.error('Could not get ' + url, error));
            }

            addModule('raylib_core.c', '#core pre code');
            addModule('raylib_shapes.c', '#shapes pre code');
            addModule('raylib_textures.c', '#textures pre code');
            addModule('raylib_text.c', '#text pre code');
            addModule('raylib_models.c', '#models pre code');
            addModule('raylib_audio.c', '#audio pre code');
            addModule('raylib_colors.c', '#colors pre code');
            addModule('raylib_structs.c', '#structs pre code');
        });

        function toggleDarkMode() {
            document.body.classList.toggle("darkmode");
        }

        </script>
    </head>

    <body>
        <div id="header">
            <a id="logo" href="../index.html"></a>
            <p id="title">A simple and easy-to-use library to enjoy videogames programming</p>
            <p id="plinks">[<a href="https://discord.gg/raylib">raylib Discord server</a>][<a href="https://github.com/raysan5/raylib">github.com/raysan5/raylib</a>][<a href="https://github.com/raysan5/raylib/blob/master/src/raylib.h">raylib.h</a>]</p>
            <p></p>
            <p id="version">v5.0 quick reference card  [<a id="downpdf" href="https://www.raylib.com/cheatsheet/raylib_cheatsheet_v5.0.pdf">download as PDF</a>]</p>
        </div>
        <br>
        <p>Chinese Translation: <a href="cheatsheet_zh.html">以下为raylib所有API接口中文释义</a></p>
        <div id="fulldata">
            <p id="pcore">module: rcore <a href="#pcore">→</a></p>
            <div id="core"><pre><code class="cpp"></code></pre></div>
            <p id="pshapes">module: rshapes <a href="#pshapes">→</a></p>
            <div id="shapes"><pre><code class="cpp"></code></pre></div>
            <p id="ptextures">module: rtextures <a href="#ptextures">→</a></p>
            <div id="textures"><pre><code class="cpp"></code></pre></div>
            <p id="ptext">module: rtext <a href="#ptext">→</a></p>
            <div id="text"><pre><code class="cpp"></code></pre></div>
            <p id="pmodels">module: rmodels <a href="#pmodels">→</a></p>
            <div id="models"><pre><code class="cpp"></code></pre></div>
            <p id="paudio">module: raudio <a href="#paudio">→</a></p>
            <div id="audio"><pre><code class="cpp"></code></pre></div>

            <div id="fullgroup">
                <div class="leftgroup">
                    <p id="pstructs">structs</p>
                    <div id="structs"><pre><code class="cpp"></code></pre></div>
                </div>
                <div class="rightgroup">
                    <p id="pcolors">colors</p>
                    <div id="colors"><pre><code class="cpp"></code></pre></div>
                </div>
            </div>

            <p>Other cheatsheets</p>
            <ul>
                <li>
                    <a href="/cheatsheet/raymath_cheatsheet.html">raymath cheatsheet</a>
                </li>
            </ul>

            <div id="copyright">
                <p>raylib quick reference card - Copyright (c) 2013-2023 Ramon Santamaria (<a href="https://www.twitter.com/raysan5">@raysan5</a>)</p>
            </div>
        </div>
    </body>
</html>