Bump Raylib to v5.0.0, RayGUI 4.0 is designed to be used with RayLib 5, so bump RayGUI too to 4.0.
Updated some core examples to match the changes in Raylib-c v5.0.0
This commit is contained in:
parent
3b01e59338
commit
9b48e57bb1
35 changed files with 728 additions and 40144 deletions
|
@ -1,4 +1,4 @@
|
|||
# Python Bindings for Raylib 4.5
|
||||
# Python Bindings for Raylib 5.0
|
||||
|
||||
New CFFI API static bindings.
|
||||
* Automatically generated to be as close as possible to
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: d3f6c06ab2f036ecf2386ff26e8dd625
|
||||
config: 2de4f6370c9579a879a3fad007556483
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Building from source — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=888ff710"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -45,7 +47,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -97,9 +99,9 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
<section id="building-from-source">
|
||||
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Permalink to this heading"></a></h1>
|
||||
<h1>Building from source<a class="headerlink" href="#building-from-source" title="Link to this heading"></a></h1>
|
||||
<section id="have-pip-build-from-source">
|
||||
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Permalink to this heading"></a></h2>
|
||||
<h2>Have Pip build from source<a class="headerlink" href="#have-pip-build-from-source" title="Link to this heading"></a></h2>
|
||||
<p>This is useful if the binaries don’t work on your system, or you want to use a newer version of Raylib.</p>
|
||||
<p>First make sure Raylib is installed. On Linux/Mac it must include the pkg-config files. Best way to ensure this
|
||||
is to compile and install Raylib using CMake: <a class="reference external" href="https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake">https://github.com/raysan5/raylib/wiki/Working-on-GNU-Linux#build-raylib-using-cmake</a></p>
|
||||
|
@ -118,7 +120,7 @@ is to compile and install Raylib using CMake: <a class="reference external" href
|
|||
</div>
|
||||
</section>
|
||||
<section id="or-build-from-source-manually">
|
||||
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Permalink to this heading"></a></h2>
|
||||
<h2>Or, Build from source manually<a class="headerlink" href="#or-build-from-source-manually" title="Link to this heading"></a></h2>
|
||||
<p>Useful if the Pip build doesn’t work and you want to debug it, or you want to contribute to the
|
||||
project.</p>
|
||||
<div class="admonition attention">
|
||||
|
@ -129,7 +131,7 @@ fixed it, a PR.)</p>
|
|||
<p>Manual instructions follow, but may be outdated, so see also how we actually build the wheels
|
||||
at <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml">https://github.com/electronstudio/raylib-python-cffi/blob/master/.github/workflows/build.yml</a></p>
|
||||
<section id="windows-manual-build">
|
||||
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Permalink to this heading"></a></h3>
|
||||
<h3>Windows manual build<a class="headerlink" href="#windows-manual-build" title="Link to this heading"></a></h3>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">recurse</span><span class="o">-</span><span class="n">submodules</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">electronstudio</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span>
|
||||
|
@ -171,7 +173,7 @@ Would be useful if some Windows user could figure out how to auto detect this.</
|
|||
here.)</p>
|
||||
</section>
|
||||
<section id="linux-manual-build">
|
||||
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Permalink to this heading"></a></h3>
|
||||
<h3>Linux manual build<a class="headerlink" href="#linux-manual-build" title="Link to this heading"></a></h3>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">recurse</span><span class="o">-</span><span class="n">submodules</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">electronstudio</span><span class="o">/</span><span class="n">raylib</span><span class="o">-</span><span class="n">python</span><span class="o">-</span><span class="n">cffi</span>
|
||||
|
@ -245,7 +247,7 @@ from the instructions for building the static module!</p>
|
|||
</div>
|
||||
</section>
|
||||
<section id="macos-manual-build">
|
||||
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Permalink to this heading"></a></h3>
|
||||
<h3>Macos manual build<a class="headerlink" href="#macos-manual-build" title="Link to this heading"></a></h3>
|
||||
<p>These instructions have been tested on Macos 10.14.</p>
|
||||
<p>Clone this repo including submodules so you get correct version of
|
||||
Raylib.</p>
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Python Bindings for Raylib 4.5 — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<title>Python Bindings for Raylib 5.0 — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=888ff710"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -45,7 +47,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Python Bindings for Raylib 5.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#installation">Installation</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#raspberry-pi">Raspberry Pi</a></li>
|
||||
|
@ -90,7 +92,7 @@
|
|||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">Python Bindings for Raylib 4.5</li>
|
||||
<li class="breadcrumb-item active">Python Bindings for Raylib 5.0</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
<a href="_sources/README.md.txt" rel="nofollow"> View page source</a>
|
||||
</li>
|
||||
|
@ -100,8 +102,8 @@
|
|||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<section id="python-bindings-for-raylib-4-5">
|
||||
<h1>Python Bindings for Raylib 4.5<a class="headerlink" href="#python-bindings-for-raylib-4-5" title="Permalink to this heading"></a></h1>
|
||||
<section id="python-bindings-for-raylib-5-0">
|
||||
<h1>Python Bindings for Raylib 5.0<a class="headerlink" href="#python-bindings-for-raylib-5-0" title="Link to this heading"></a></h1>
|
||||
<p>New CFFI API static bindings.</p>
|
||||
<ul class="simple">
|
||||
<li><p>Automatically generated to be as close as possible to
|
||||
|
@ -114,7 +116,7 @@ original Raylib.</p></li>
|
|||
<p><a class="reference external" href="http://electronstudio.github.io/raylib-python-cffi">Full documentation</a></p>
|
||||
</section>
|
||||
<section id="quickstart">
|
||||
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this heading"></a></h1>
|
||||
<h1>Quickstart<a class="headerlink" href="#quickstart" title="Link to this heading"></a></h1>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">pip3</span> <span class="pre">install</span> <span class="pre">raylib</span></code></p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>from pyray import *
|
||||
init_window(800, 450, "Hello")
|
||||
|
@ -128,7 +130,7 @@ close_window()
|
|||
</div>
|
||||
</section>
|
||||
<section id="installation">
|
||||
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this heading"></a></h1>
|
||||
<h1>Installation<a class="headerlink" href="#installation" title="Link to this heading"></a></h1>
|
||||
<p>First make sure you have the latest pip installed:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install --upgrade pip
|
||||
</pre></div>
|
||||
|
@ -142,11 +144,11 @@ python3 -m pip install raylib
|
|||
<p>If yours isn’t available then pip will attempt to build from source, in which case you will need to have Raylib development libs installed, e.g.
|
||||
using homebrew, apt, etc.</p>
|
||||
<section id="raspberry-pi">
|
||||
<h2>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this heading"></a></h2>
|
||||
<h2>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Link to this heading"></a></h2>
|
||||
<p><a class="reference internal" href="RPI.html"><span class="std std-doc">Using on Rasperry Pi</span></a></p>
|
||||
</section>
|
||||
<section id="dynamic-binding-version">
|
||||
<h2>Dynamic binding version<a class="headerlink" href="#dynamic-binding-version" title="Permalink to this heading"></a></h2>
|
||||
<h2>Dynamic binding version<a class="headerlink" href="#dynamic-binding-version" title="Link to this heading"></a></h2>
|
||||
<p>There is now a separate dynamic version of this binding:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib_dynamic
|
||||
</pre></div>
|
||||
|
@ -154,7 +156,7 @@ using homebrew, apt, etc.</p>
|
|||
<p>It works on some systems where the static version doesn’t, <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/dynamic.html">but be sure to read these caveats before using it</a></p>
|
||||
</section>
|
||||
<section id="beta-testing">
|
||||
<h2>Beta testing<a class="headerlink" href="#beta-testing" title="Permalink to this heading"></a></h2>
|
||||
<h2>Beta testing<a class="headerlink" href="#beta-testing" title="Link to this heading"></a></h2>
|
||||
<p>If you find a bug, it may be fixed in the <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/releases">latest dev release</a>.
|
||||
You can install an alpha or beta version by specifying the exact version number like this:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>python3 -m pip install raylib==4.2.0.0.dev4
|
||||
|
@ -162,7 +164,7 @@ You can install an alpha or beta version by specifying the exact version number
|
|||
</div>
|
||||
</section>
|
||||
<section id="problems">
|
||||
<h2>Problems?<a class="headerlink" href="#problems" title="Permalink to this heading"></a></h2>
|
||||
<h2>Problems?<a class="headerlink" href="#problems" title="Link to this heading"></a></h2>
|
||||
<p>If it doesn’t work, <a class="reference internal" href="BUILDING.html"><span class="std std-doc">try to build manually.</span></a>. If that works then <a class="reference external" href="https://github.com/electronstudio/raylib-python-cffi/issues">submit an issue</a>
|
||||
to let us know what you did.</p>
|
||||
<p>If you need help you can try asking <a class="reference external" href="https://discord.gg/raylib">on Discord</a>.</p>
|
||||
|
@ -170,48 +172,48 @@ to let us know what you did.</p>
|
|||
</section>
|
||||
</section>
|
||||
<section id="how-to-use">
|
||||
<h1>How to use<a class="headerlink" href="#how-to-use" title="Permalink to this heading"></a></h1>
|
||||
<h1>How to use<a class="headerlink" href="#how-to-use" title="Link to this heading"></a></h1>
|
||||
<p>There are two APIs, you can use either or both:</p>
|
||||
<section id="if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api">
|
||||
<h2>If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API<a class="headerlink" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api" title="Permalink to this heading"></a></h2>
|
||||
<h2>If you are familiar with C coding and the Raylib C library and you want to use an exact copy of the C API<a class="headerlink" href="#if-you-are-familiar-with-c-coding-and-the-raylib-c-library-and-you-want-to-use-an-exact-copy-of-the-c-api" title="Link to this heading"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/raylib.html">the C API</a>.</p>
|
||||
</section>
|
||||
<section id="if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower">
|
||||
<h2>If you prefer a slightly more Pythonistic API and don’t mind it might be slightly slower<a class="headerlink" href="#if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower" title="Permalink to this heading"></a></h2>
|
||||
<h2>If you prefer a slightly more Pythonistic API and don’t mind it might be slightly slower<a class="headerlink" href="#if-you-prefer-a-slightly-more-pythonistic-api-and-don-t-mind-it-might-be-slightly-slower" title="Link to this heading"></a></h2>
|
||||
<p>Use <a class="reference external" href="https://electronstudio.github.io/raylib-python-cffi/pyray.html">the Python API</a>.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="app-showcase">
|
||||
<h1>App showcase<a class="headerlink" href="#app-showcase" title="Permalink to this heading"></a></h1>
|
||||
<h1>App showcase<a class="headerlink" href="#app-showcase" title="Link to this heading"></a></h1>
|
||||
<p><a class="reference external" href="https://github.com/pkulev/tanki">Tanki</a></p>
|
||||
<p><a class="reference external" href="https://pebaz.itch.io/alloy-bloxel-editor">Alloy Bloxel Editor</a></p>
|
||||
<p>Add your app here!</p>
|
||||
</section>
|
||||
<section id="rlzero">
|
||||
<h1>RLZero<a class="headerlink" href="#rlzero" title="Permalink to this heading"></a></h1>
|
||||
<h1>RLZero<a class="headerlink" href="#rlzero" title="Link to this heading"></a></h1>
|
||||
<p>A related library (that is a work in progress!):</p>
|
||||
<p><a class="reference external" href="https://github.com/electronstudio/rlzero">A simplified API for Raylib for use in education and to enable beginners to create 3d games</a></p>
|
||||
</section>
|
||||
<section id="help-wanted">
|
||||
<h1>Help wanted<a class="headerlink" href="#help-wanted" title="Permalink to this heading"></a></h1>
|
||||
<h1>Help wanted<a class="headerlink" href="#help-wanted" title="Link to this heading"></a></h1>
|
||||
<ul class="simple">
|
||||
<li><p>Converting more examples from C to Python</p></li>
|
||||
<li><p>Testing on more platforms</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="license-updated">
|
||||
<h1>License (updated)<a class="headerlink" href="#license-updated" title="Permalink to this heading"></a></h1>
|
||||
<h1>License (updated)<a class="headerlink" href="#license-updated" title="Link to this heading"></a></h1>
|
||||
<p>The bindings are now under the Eclipse Public License, so you are free to
|
||||
statically link and use in non-free / proprietary / commercial projects!</p>
|
||||
</section>
|
||||
<section id="performance">
|
||||
<h1>Performance<a class="headerlink" href="#performance" title="Permalink to this heading"></a></h1>
|
||||
<h1>Performance<a class="headerlink" href="#performance" title="Link to this heading"></a></h1>
|
||||
<p>For fastest performance use Pypy rather than standard Python.</p>
|
||||
<p>Every call to C is costly, so it’s slightly faster if you use Python data structures and functions when calculating
|
||||
in your update loop
|
||||
and then only convert them to C data structures when you have to call the C functions for drawing.</p>
|
||||
<section id="bunnymark">
|
||||
<h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Permalink to this heading"></a></h2>
|
||||
<h2>Bunnymark<a class="headerlink" href="#bunnymark" title="Link to this heading"></a></h2>
|
||||
<table class="docutils align-default">
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Library</p></th>
|
||||
|
@ -251,7 +253,7 @@ and then only convert them to C data structures when you have to call the C func
|
|||
</section>
|
||||
</section>
|
||||
<section id="packaging-your-app">
|
||||
<h1>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Permalink to this heading"></a></h1>
|
||||
<h1>Packaging your app<a class="headerlink" href="#packaging-your-app" title="Link to this heading"></a></h1>
|
||||
<p>You can create a standalone binary using the Nuitka compiler. For example, here is how to package Bunnymark:</p>
|
||||
<div class="highlight-none notranslate"><div class="highlight"><pre><span></span>pip3 install nuitka
|
||||
cd examples/textures
|
||||
|
@ -260,7 +262,7 @@ python3 -m nuitka --onefile --linux-onefile-icon resources/wabbit_alpha.png text
|
|||
</div>
|
||||
</section>
|
||||
<section id="advert">
|
||||
<h1>Advert<a class="headerlink" href="#advert" title="Permalink to this heading"></a></h1>
|
||||
<h1>Advert<a class="headerlink" href="#advert" title="Link to this heading"></a></h1>
|
||||
<p><a class="reference external" href="https://store.steampowered.com/app/664240/RetroWar_8bit_Party_Battle/?git">RetroWar: 8-bit Party Battle</a> is out now. Defeat up to 15 of your friends in a tournament of 80s-inspired retro mini games.</p>
|
||||
<p><a class="reference external" href="https://github.com/electronstudio/pygame-zero-book">Coding Games With Pygame Zero & Python</a> is
|
||||
a book for Python beginners.</p>
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Raspberry Pi — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=888ff710"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -44,7 +46,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -87,7 +89,7 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
<section id="raspberry-pi">
|
||||
<h1>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Permalink to this heading"></a></h1>
|
||||
<h1>Raspberry Pi<a class="headerlink" href="#raspberry-pi" title="Link to this heading"></a></h1>
|
||||
<p>Please use Raspberry Pi OS Bullseye. Older OSes are not tested.</p>
|
||||
<p>We have published a binary wheel using Raylib in X11 mode. This <em>should</em> install and work on Bullseye
|
||||
with</p>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Python Bindings for Raylib 4.5
|
||||
# Python Bindings for Raylib 5.0
|
||||
|
||||
New CFFI API static bindings.
|
||||
* Automatically generated to be as close as possible to
|
||||
|
|
22
docs/_static/basic.css
vendored
22
docs/_static/basic.css
vendored
|
@ -237,6 +237,10 @@ a.headerlink {
|
|||
visibility: hidden;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #551A8B;
|
||||
}
|
||||
|
||||
h1:hover > a.headerlink,
|
||||
h2:hover > a.headerlink,
|
||||
h3:hover > a.headerlink,
|
||||
|
@ -670,6 +674,16 @@ dd {
|
|||
margin-left: 30px;
|
||||
}
|
||||
|
||||
.sig dd {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.sig dl {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
dl > dd:last-child,
|
||||
dl > dd:last-child > :last-child {
|
||||
margin-bottom: 0;
|
||||
|
@ -738,6 +752,14 @@ abbr, acronym {
|
|||
cursor: help;
|
||||
}
|
||||
|
||||
.translated {
|
||||
background-color: rgba(207, 255, 207, 0.2)
|
||||
}
|
||||
|
||||
.untranslated {
|
||||
background-color: rgba(255, 207, 207, 0.2)
|
||||
}
|
||||
|
||||
/* -- code displays --------------------------------------------------------- */
|
||||
|
||||
pre {
|
||||
|
|
2
docs/_static/css/theme.css
vendored
2
docs/_static/css/theme.css
vendored
File diff suppressed because one or more lines are too long
3
docs/_static/documentation_options.js
vendored
3
docs/_static/documentation_options.js
vendored
|
@ -1,5 +1,4 @@
|
|||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
const DOCUMENTATION_OPTIONS = {
|
||||
VERSION: '',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
|
|
1
docs/_static/pygments.css
vendored
1
docs/_static/pygments.css
vendored
|
@ -17,6 +17,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
|
|||
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
|
||||
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
||||
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
|
||||
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
||||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||
|
|
26
docs/_static/searchtools.js
vendored
26
docs/_static/searchtools.js
vendored
|
@ -57,12 +57,12 @@ const _removeChildren = (element) => {
|
|||
const _escapeRegExp = (string) =>
|
||||
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
||||
|
||||
const _displayItem = (item, searchTerms) => {
|
||||
const _displayItem = (item, searchTerms, highlightTerms) => {
|
||||
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
|
||||
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
|
||||
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
||||
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
|
||||
const contentRoot = document.documentElement.dataset.content_root;
|
||||
|
||||
const [docName, title, anchor, descr, score, _filename] = item;
|
||||
|
||||
|
@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => {
|
|||
if (dirname.match(/\/index\/$/))
|
||||
dirname = dirname.substring(0, dirname.length - 6);
|
||||
else if (dirname === "index/") dirname = "";
|
||||
requestUrl = docUrlRoot + dirname;
|
||||
requestUrl = contentRoot + dirname;
|
||||
linkUrl = requestUrl;
|
||||
} else {
|
||||
// normal html builders
|
||||
requestUrl = docUrlRoot + docName + docFileSuffix;
|
||||
requestUrl = contentRoot + docName + docFileSuffix;
|
||||
linkUrl = docName + docLinkSuffix;
|
||||
}
|
||||
let linkEl = listItem.appendChild(document.createElement("a"));
|
||||
linkEl.href = linkUrl + anchor;
|
||||
linkEl.dataset.score = score;
|
||||
linkEl.innerHTML = title;
|
||||
if (descr)
|
||||
if (descr) {
|
||||
listItem.appendChild(document.createElement("span")).innerHTML =
|
||||
" (" + descr + ")";
|
||||
// highlight search terms in the description
|
||||
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
|
||||
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
|
||||
}
|
||||
else if (showSearchSummary)
|
||||
fetch(requestUrl)
|
||||
.then((responseData) => responseData.text())
|
||||
|
@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => {
|
|||
listItem.appendChild(
|
||||
Search.makeSearchSummary(data, searchTerms)
|
||||
);
|
||||
// highlight search terms in the summary
|
||||
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
|
||||
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
|
||||
});
|
||||
Search.output.appendChild(listItem);
|
||||
};
|
||||
|
@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => {
|
|||
const _displayNextItem = (
|
||||
results,
|
||||
resultCount,
|
||||
searchTerms
|
||||
searchTerms,
|
||||
highlightTerms,
|
||||
) => {
|
||||
// results left, load the summary and display it
|
||||
// this is intended to be dynamic (don't sub resultsCount)
|
||||
if (results.length) {
|
||||
_displayItem(results.pop(), searchTerms);
|
||||
_displayItem(results.pop(), searchTerms, highlightTerms);
|
||||
setTimeout(
|
||||
() => _displayNextItem(results, resultCount, searchTerms),
|
||||
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
|
||||
5
|
||||
);
|
||||
}
|
||||
|
@ -360,7 +368,7 @@ const Search = {
|
|||
// console.info("search results:", Search.lastresults);
|
||||
|
||||
// print the results
|
||||
_displayNextItem(results, results.length, searchTerms);
|
||||
_displayNextItem(results, results.length, searchTerms, highlightTerms);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
16
docs/_static/sphinx_highlight.js
vendored
16
docs/_static/sphinx_highlight.js
vendored
|
@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => {
|
|||
}
|
||||
|
||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||
const rest = document.createTextNode(val.substr(pos + text.length));
|
||||
parent.insertBefore(
|
||||
span,
|
||||
parent.insertBefore(
|
||||
document.createTextNode(val.substr(pos + text.length)),
|
||||
rest,
|
||||
node.nextSibling
|
||||
)
|
||||
);
|
||||
node.nodeValue = val.substr(0, pos);
|
||||
/* There may be more occurrences of search term in this node. So call this
|
||||
* function recursively on the remaining fragment.
|
||||
*/
|
||||
_highlight(rest, addItems, text, className);
|
||||
|
||||
if (isInSVG) {
|
||||
const rect = document.createElementNS(
|
||||
|
@ -140,5 +145,10 @@ const SphinxHighlight = {
|
|||
},
|
||||
};
|
||||
|
||||
_ready(SphinxHighlight.highlightSearchWords);
|
||||
_ready(SphinxHighlight.initEscapeListener);
|
||||
_ready(() => {
|
||||
/* Do not call highlightSearchWords() when we are on the search page.
|
||||
* It will highlight words from the *previous* search query.
|
||||
*/
|
||||
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
|
||||
SphinxHighlight.initEscapeListener();
|
||||
});
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Dynamic Bindings — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=888ff710"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -45,7 +47,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -88,7 +90,7 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
<section id="dynamic-bindings">
|
||||
<h1>Dynamic Bindings<a class="headerlink" href="#dynamic-bindings" title="Permalink to this heading"></a></h1>
|
||||
<h1>Dynamic Bindings<a class="headerlink" href="#dynamic-bindings" title="Link to this heading"></a></h1>
|
||||
<p>CFFI ABI dynamic bindings avoid the need to compile a C extension module. They now been moved to a separate module:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">raylib_dynamic</span>
|
||||
</pre></div>
|
||||
|
|
8049
docs/genindex.html
8049
docs/genindex.html
File diff suppressed because it is too large
Load diff
|
@ -1,26 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Raylib Python — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=888ff710"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="Python Bindings for Raylib 4.5" href="README.html" />
|
||||
<link rel="next" title="Python Bindings for Raylib 5.0" href="README.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
@ -44,7 +46,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -87,11 +89,11 @@
|
|||
<div itemprop="articleBody">
|
||||
|
||||
<section id="raylib-python">
|
||||
<h1>Raylib Python<a class="headerlink" href="#raylib-python" title="Permalink to this heading"></a></h1>
|
||||
<h1>Raylib Python<a class="headerlink" href="#raylib-python" title="Link to this heading"></a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
@ -118,7 +120,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||||
<a href="README.html" class="btn btn-neutral float-right" title="Python Bindings for Raylib 4.5" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="README.html" class="btn btn-neutral float-right" title="Python Bindings for Raylib 5.0" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
|
BIN
docs/objects.inv
BIN
docs/objects.inv
Binary file not shown.
|
@ -1,21 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Python Module Index — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=888ff710"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
@ -49,7 +51,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
|
10765
docs/pyray.html
10765
docs/pyray.html
File diff suppressed because it is too large
Load diff
11347
docs/raylib.html
11347
docs/raylib.html
File diff suppressed because it is too large
Load diff
|
@ -1,22 +1,24 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" >
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Search — Raylib Python documentation</title>
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=eafc0fe6" />
|
||||
|
||||
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="_static/js/html5shiv.min.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/sphinx_highlight.js"></script>
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=5929fcd5"></script>
|
||||
<script src="_static/doctools.js?v=888ff710"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<script src="_static/searchtools.js"></script>
|
||||
<script src="_static/language_data.js"></script>
|
||||
|
@ -45,7 +47,7 @@
|
|||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 4.5</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html">Python Bindings for Raylib 5.0</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#quickstart">Quickstart</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#installation">Installation</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="README.html#how-to-use">How to use</a></li>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,702 +0,0 @@
|
|||
from enum import IntEnum
|
||||
|
||||
class ConfigFlags(IntEnum):
|
||||
FLAG_VSYNC_HINT = 64
|
||||
FLAG_FULLSCREEN_MODE = 2
|
||||
FLAG_WINDOW_RESIZABLE = 4
|
||||
FLAG_WINDOW_UNDECORATED = 8
|
||||
FLAG_WINDOW_HIDDEN = 128
|
||||
FLAG_WINDOW_MINIMIZED = 512
|
||||
FLAG_WINDOW_MAXIMIZED = 1024
|
||||
FLAG_WINDOW_UNFOCUSED = 2048
|
||||
FLAG_WINDOW_TOPMOST = 4096
|
||||
FLAG_WINDOW_ALWAYS_RUN = 256
|
||||
FLAG_WINDOW_TRANSPARENT = 16
|
||||
FLAG_WINDOW_HIGHDPI = 8192
|
||||
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
|
||||
FLAG_MSAA_4X_HINT = 32
|
||||
FLAG_INTERLACED_HINT = 65536
|
||||
|
||||
class TraceLogLevel(IntEnum):
|
||||
LOG_ALL = 0
|
||||
LOG_TRACE = 1
|
||||
LOG_DEBUG = 2
|
||||
LOG_INFO = 3
|
||||
LOG_WARNING = 4
|
||||
LOG_ERROR = 5
|
||||
LOG_FATAL = 6
|
||||
LOG_NONE = 7
|
||||
|
||||
class KeyboardKey(IntEnum):
|
||||
KEY_NULL = 0
|
||||
KEY_APOSTROPHE = 39
|
||||
KEY_COMMA = 44
|
||||
KEY_MINUS = 45
|
||||
KEY_PERIOD = 46
|
||||
KEY_SLASH = 47
|
||||
KEY_ZERO = 48
|
||||
KEY_ONE = 49
|
||||
KEY_TWO = 50
|
||||
KEY_THREE = 51
|
||||
KEY_FOUR = 52
|
||||
KEY_FIVE = 53
|
||||
KEY_SIX = 54
|
||||
KEY_SEVEN = 55
|
||||
KEY_EIGHT = 56
|
||||
KEY_NINE = 57
|
||||
KEY_SEMICOLON = 59
|
||||
KEY_EQUAL = 61
|
||||
KEY_A = 65
|
||||
KEY_B = 66
|
||||
KEY_C = 67
|
||||
KEY_D = 68
|
||||
KEY_E = 69
|
||||
KEY_F = 70
|
||||
KEY_G = 71
|
||||
KEY_H = 72
|
||||
KEY_I = 73
|
||||
KEY_J = 74
|
||||
KEY_K = 75
|
||||
KEY_L = 76
|
||||
KEY_M = 77
|
||||
KEY_N = 78
|
||||
KEY_O = 79
|
||||
KEY_P = 80
|
||||
KEY_Q = 81
|
||||
KEY_R = 82
|
||||
KEY_S = 83
|
||||
KEY_T = 84
|
||||
KEY_U = 85
|
||||
KEY_V = 86
|
||||
KEY_W = 87
|
||||
KEY_X = 88
|
||||
KEY_Y = 89
|
||||
KEY_Z = 90
|
||||
KEY_LEFT_BRACKET = 91
|
||||
KEY_BACKSLASH = 92
|
||||
KEY_RIGHT_BRACKET = 93
|
||||
KEY_GRAVE = 96
|
||||
KEY_SPACE = 32
|
||||
KEY_ESCAPE = 256
|
||||
KEY_ENTER = 257
|
||||
KEY_TAB = 258
|
||||
KEY_BACKSPACE = 259
|
||||
KEY_INSERT = 260
|
||||
KEY_DELETE = 261
|
||||
KEY_RIGHT = 262
|
||||
KEY_LEFT = 263
|
||||
KEY_DOWN = 264
|
||||
KEY_UP = 265
|
||||
KEY_PAGE_UP = 266
|
||||
KEY_PAGE_DOWN = 267
|
||||
KEY_HOME = 268
|
||||
KEY_END = 269
|
||||
KEY_CAPS_LOCK = 280
|
||||
KEY_SCROLL_LOCK = 281
|
||||
KEY_NUM_LOCK = 282
|
||||
KEY_PRINT_SCREEN = 283
|
||||
KEY_PAUSE = 284
|
||||
KEY_F1 = 290
|
||||
KEY_F2 = 291
|
||||
KEY_F3 = 292
|
||||
KEY_F4 = 293
|
||||
KEY_F5 = 294
|
||||
KEY_F6 = 295
|
||||
KEY_F7 = 296
|
||||
KEY_F8 = 297
|
||||
KEY_F9 = 298
|
||||
KEY_F10 = 299
|
||||
KEY_F11 = 300
|
||||
KEY_F12 = 301
|
||||
KEY_LEFT_SHIFT = 340
|
||||
KEY_LEFT_CONTROL = 341
|
||||
KEY_LEFT_ALT = 342
|
||||
KEY_LEFT_SUPER = 343
|
||||
KEY_RIGHT_SHIFT = 344
|
||||
KEY_RIGHT_CONTROL = 345
|
||||
KEY_RIGHT_ALT = 346
|
||||
KEY_RIGHT_SUPER = 347
|
||||
KEY_KB_MENU = 348
|
||||
KEY_KP_0 = 320
|
||||
KEY_KP_1 = 321
|
||||
KEY_KP_2 = 322
|
||||
KEY_KP_3 = 323
|
||||
KEY_KP_4 = 324
|
||||
KEY_KP_5 = 325
|
||||
KEY_KP_6 = 326
|
||||
KEY_KP_7 = 327
|
||||
KEY_KP_8 = 328
|
||||
KEY_KP_9 = 329
|
||||
KEY_KP_DECIMAL = 330
|
||||
KEY_KP_DIVIDE = 331
|
||||
KEY_KP_MULTIPLY = 332
|
||||
KEY_KP_SUBTRACT = 333
|
||||
KEY_KP_ADD = 334
|
||||
KEY_KP_ENTER = 335
|
||||
KEY_KP_EQUAL = 336
|
||||
KEY_BACK = 4
|
||||
KEY_MENU = 82
|
||||
KEY_VOLUME_UP = 24
|
||||
KEY_VOLUME_DOWN = 25
|
||||
|
||||
class MouseButton(IntEnum):
|
||||
MOUSE_BUTTON_LEFT = 0
|
||||
MOUSE_BUTTON_RIGHT = 1
|
||||
MOUSE_BUTTON_MIDDLE = 2
|
||||
MOUSE_BUTTON_SIDE = 3
|
||||
MOUSE_BUTTON_EXTRA = 4
|
||||
MOUSE_BUTTON_FORWARD = 5
|
||||
MOUSE_BUTTON_BACK = 6
|
||||
|
||||
class MouseCursor(IntEnum):
|
||||
MOUSE_CURSOR_DEFAULT = 0
|
||||
MOUSE_CURSOR_ARROW = 1
|
||||
MOUSE_CURSOR_IBEAM = 2
|
||||
MOUSE_CURSOR_CROSSHAIR = 3
|
||||
MOUSE_CURSOR_POINTING_HAND = 4
|
||||
MOUSE_CURSOR_RESIZE_EW = 5
|
||||
MOUSE_CURSOR_RESIZE_NS = 6
|
||||
MOUSE_CURSOR_RESIZE_NWSE = 7
|
||||
MOUSE_CURSOR_RESIZE_NESW = 8
|
||||
MOUSE_CURSOR_RESIZE_ALL = 9
|
||||
MOUSE_CURSOR_NOT_ALLOWED = 10
|
||||
|
||||
class GamepadButton(IntEnum):
|
||||
GAMEPAD_BUTTON_UNKNOWN = 0
|
||||
GAMEPAD_BUTTON_LEFT_FACE_UP = 1
|
||||
GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2
|
||||
GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3
|
||||
GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_UP = 5
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8
|
||||
GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9
|
||||
GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12
|
||||
GAMEPAD_BUTTON_MIDDLE_LEFT = 13
|
||||
GAMEPAD_BUTTON_MIDDLE = 14
|
||||
GAMEPAD_BUTTON_MIDDLE_RIGHT = 15
|
||||
GAMEPAD_BUTTON_LEFT_THUMB = 16
|
||||
GAMEPAD_BUTTON_RIGHT_THUMB = 17
|
||||
|
||||
class GamepadAxis(IntEnum):
|
||||
GAMEPAD_AXIS_LEFT_X = 0
|
||||
GAMEPAD_AXIS_LEFT_Y = 1
|
||||
GAMEPAD_AXIS_RIGHT_X = 2
|
||||
GAMEPAD_AXIS_RIGHT_Y = 3
|
||||
GAMEPAD_AXIS_LEFT_TRIGGER = 4
|
||||
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
|
||||
|
||||
class MaterialMapIndex(IntEnum):
|
||||
MATERIAL_MAP_ALBEDO = 0
|
||||
MATERIAL_MAP_METALNESS = 1
|
||||
MATERIAL_MAP_NORMAL = 2
|
||||
MATERIAL_MAP_ROUGHNESS = 3
|
||||
MATERIAL_MAP_OCCLUSION = 4
|
||||
MATERIAL_MAP_EMISSION = 5
|
||||
MATERIAL_MAP_HEIGHT = 6
|
||||
MATERIAL_MAP_CUBEMAP = 7
|
||||
MATERIAL_MAP_IRRADIANCE = 8
|
||||
MATERIAL_MAP_PREFILTER = 9
|
||||
MATERIAL_MAP_BRDF = 10
|
||||
|
||||
class ShaderLocationIndex(IntEnum):
|
||||
SHADER_LOC_VERTEX_POSITION = 0
|
||||
SHADER_LOC_VERTEX_TEXCOORD01 = 1
|
||||
SHADER_LOC_VERTEX_TEXCOORD02 = 2
|
||||
SHADER_LOC_VERTEX_NORMAL = 3
|
||||
SHADER_LOC_VERTEX_TANGENT = 4
|
||||
SHADER_LOC_VERTEX_COLOR = 5
|
||||
SHADER_LOC_MATRIX_MVP = 6
|
||||
SHADER_LOC_MATRIX_VIEW = 7
|
||||
SHADER_LOC_MATRIX_PROJECTION = 8
|
||||
SHADER_LOC_MATRIX_MODEL = 9
|
||||
SHADER_LOC_MATRIX_NORMAL = 10
|
||||
SHADER_LOC_VECTOR_VIEW = 11
|
||||
SHADER_LOC_COLOR_DIFFUSE = 12
|
||||
SHADER_LOC_COLOR_SPECULAR = 13
|
||||
SHADER_LOC_COLOR_AMBIENT = 14
|
||||
SHADER_LOC_MAP_ALBEDO = 15
|
||||
SHADER_LOC_MAP_METALNESS = 16
|
||||
SHADER_LOC_MAP_NORMAL = 17
|
||||
SHADER_LOC_MAP_ROUGHNESS = 18
|
||||
SHADER_LOC_MAP_OCCLUSION = 19
|
||||
SHADER_LOC_MAP_EMISSION = 20
|
||||
SHADER_LOC_MAP_HEIGHT = 21
|
||||
SHADER_LOC_MAP_CUBEMAP = 22
|
||||
SHADER_LOC_MAP_IRRADIANCE = 23
|
||||
SHADER_LOC_MAP_PREFILTER = 24
|
||||
SHADER_LOC_MAP_BRDF = 25
|
||||
|
||||
class ShaderUniformDataType(IntEnum):
|
||||
SHADER_UNIFORM_FLOAT = 0
|
||||
SHADER_UNIFORM_VEC2 = 1
|
||||
SHADER_UNIFORM_VEC3 = 2
|
||||
SHADER_UNIFORM_VEC4 = 3
|
||||
SHADER_UNIFORM_INT = 4
|
||||
SHADER_UNIFORM_IVEC2 = 5
|
||||
SHADER_UNIFORM_IVEC3 = 6
|
||||
SHADER_UNIFORM_IVEC4 = 7
|
||||
SHADER_UNIFORM_SAMPLER2D = 8
|
||||
|
||||
class ShaderAttributeDataType(IntEnum):
|
||||
SHADER_ATTRIB_FLOAT = 0
|
||||
SHADER_ATTRIB_VEC2 = 1
|
||||
SHADER_ATTRIB_VEC3 = 2
|
||||
SHADER_ATTRIB_VEC4 = 3
|
||||
|
||||
class PixelFormat(IntEnum):
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5
|
||||
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7
|
||||
PIXELFORMAT_UNCOMPRESSED_R32 = 8
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGB = 11
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12
|
||||
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13
|
||||
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14
|
||||
PIXELFORMAT_COMPRESSED_ETC1_RGB = 15
|
||||
PIXELFORMAT_COMPRESSED_ETC2_RGB = 16
|
||||
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGB = 18
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19
|
||||
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20
|
||||
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21
|
||||
|
||||
class TextureFilter(IntEnum):
|
||||
TEXTURE_FILTER_POINT = 0
|
||||
TEXTURE_FILTER_BILINEAR = 1
|
||||
TEXTURE_FILTER_TRILINEAR = 2
|
||||
TEXTURE_FILTER_ANISOTROPIC_4X = 3
|
||||
TEXTURE_FILTER_ANISOTROPIC_8X = 4
|
||||
TEXTURE_FILTER_ANISOTROPIC_16X = 5
|
||||
|
||||
class TextureWrap(IntEnum):
|
||||
TEXTURE_WRAP_REPEAT = 0
|
||||
TEXTURE_WRAP_CLAMP = 1
|
||||
TEXTURE_WRAP_MIRROR_REPEAT = 2
|
||||
TEXTURE_WRAP_MIRROR_CLAMP = 3
|
||||
|
||||
class CubemapLayout(IntEnum):
|
||||
CUBEMAP_LAYOUT_AUTO_DETECT = 0
|
||||
CUBEMAP_LAYOUT_LINE_VERTICAL = 1
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2
|
||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4
|
||||
CUBEMAP_LAYOUT_PANORAMA = 5
|
||||
|
||||
class FontType(IntEnum):
|
||||
FONT_DEFAULT = 0
|
||||
FONT_BITMAP = 1
|
||||
FONT_SDF = 2
|
||||
|
||||
class BlendMode(IntEnum):
|
||||
BLEND_ALPHA = 0
|
||||
BLEND_ADDITIVE = 1
|
||||
BLEND_MULTIPLIED = 2
|
||||
BLEND_ADD_COLORS = 3
|
||||
BLEND_SUBTRACT_COLORS = 4
|
||||
BLEND_ALPHA_PREMULTIPLY = 5
|
||||
BLEND_CUSTOM = 6
|
||||
BLEND_CUSTOM_SEPARATE = 7
|
||||
|
||||
class Gesture(IntEnum):
|
||||
GESTURE_NONE = 0
|
||||
GESTURE_TAP = 1
|
||||
GESTURE_DOUBLETAP = 2
|
||||
GESTURE_HOLD = 4
|
||||
GESTURE_DRAG = 8
|
||||
GESTURE_SWIPE_RIGHT = 16
|
||||
GESTURE_SWIPE_LEFT = 32
|
||||
GESTURE_SWIPE_UP = 64
|
||||
GESTURE_SWIPE_DOWN = 128
|
||||
GESTURE_PINCH_IN = 256
|
||||
GESTURE_PINCH_OUT = 512
|
||||
|
||||
class CameraMode(IntEnum):
|
||||
CAMERA_CUSTOM = 0
|
||||
CAMERA_FREE = 1
|
||||
CAMERA_ORBITAL = 2
|
||||
CAMERA_FIRST_PERSON = 3
|
||||
CAMERA_THIRD_PERSON = 4
|
||||
|
||||
class CameraProjection(IntEnum):
|
||||
CAMERA_PERSPECTIVE = 0
|
||||
CAMERA_ORTHOGRAPHIC = 1
|
||||
|
||||
class NPatchLayout(IntEnum):
|
||||
NPATCH_NINE_PATCH = 0
|
||||
NPATCH_THREE_PATCH_VERTICAL = 1
|
||||
NPATCH_THREE_PATCH_HORIZONTAL = 2
|
||||
|
||||
class GuiState(IntEnum):
|
||||
STATE_NORMAL = 0
|
||||
STATE_FOCUSED = 1
|
||||
STATE_PRESSED = 2
|
||||
STATE_DISABLED = 3
|
||||
|
||||
class GuiTextAlignment(IntEnum):
|
||||
TEXT_ALIGN_LEFT = 0
|
||||
TEXT_ALIGN_CENTER = 1
|
||||
TEXT_ALIGN_RIGHT = 2
|
||||
|
||||
class GuiControl(IntEnum):
|
||||
DEFAULT = 0
|
||||
LABEL = 1
|
||||
BUTTON = 2
|
||||
TOGGLE = 3
|
||||
SLIDER = 4
|
||||
PROGRESSBAR = 5
|
||||
CHECKBOX = 6
|
||||
COMBOBOX = 7
|
||||
DROPDOWNBOX = 8
|
||||
TEXTBOX = 9
|
||||
VALUEBOX = 10
|
||||
SPINNER = 11
|
||||
LISTVIEW = 12
|
||||
COLORPICKER = 13
|
||||
SCROLLBAR = 14
|
||||
STATUSBAR = 15
|
||||
|
||||
class GuiControlProperty(IntEnum):
|
||||
BORDER_COLOR_NORMAL = 0
|
||||
BASE_COLOR_NORMAL = 1
|
||||
TEXT_COLOR_NORMAL = 2
|
||||
BORDER_COLOR_FOCUSED = 3
|
||||
BASE_COLOR_FOCUSED = 4
|
||||
TEXT_COLOR_FOCUSED = 5
|
||||
BORDER_COLOR_PRESSED = 6
|
||||
BASE_COLOR_PRESSED = 7
|
||||
TEXT_COLOR_PRESSED = 8
|
||||
BORDER_COLOR_DISABLED = 9
|
||||
BASE_COLOR_DISABLED = 10
|
||||
TEXT_COLOR_DISABLED = 11
|
||||
BORDER_WIDTH = 12
|
||||
TEXT_PADDING = 13
|
||||
TEXT_ALIGNMENT = 14
|
||||
RESERVED = 15
|
||||
|
||||
class GuiDefaultProperty(IntEnum):
|
||||
TEXT_SIZE = 16
|
||||
TEXT_SPACING = 17
|
||||
LINE_COLOR = 18
|
||||
BACKGROUND_COLOR = 19
|
||||
|
||||
class GuiToggleProperty(IntEnum):
|
||||
GROUP_PADDING = 16
|
||||
|
||||
class GuiSliderProperty(IntEnum):
|
||||
SLIDER_WIDTH = 16
|
||||
SLIDER_PADDING = 17
|
||||
|
||||
class GuiProgressBarProperty(IntEnum):
|
||||
PROGRESS_PADDING = 16
|
||||
|
||||
class GuiScrollBarProperty(IntEnum):
|
||||
ARROWS_SIZE = 16
|
||||
ARROWS_VISIBLE = 17
|
||||
SCROLL_SLIDER_PADDING = 18
|
||||
SCROLL_SLIDER_SIZE = 19
|
||||
SCROLL_PADDING = 20
|
||||
SCROLL_SPEED = 21
|
||||
|
||||
class GuiCheckBoxProperty(IntEnum):
|
||||
CHECK_PADDING = 16
|
||||
|
||||
class GuiComboBoxProperty(IntEnum):
|
||||
COMBO_BUTTON_WIDTH = 16
|
||||
COMBO_BUTTON_SPACING = 17
|
||||
|
||||
class GuiDropdownBoxProperty(IntEnum):
|
||||
ARROW_PADDING = 16
|
||||
DROPDOWN_ITEMS_SPACING = 17
|
||||
|
||||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_INNER_PADDING = 16
|
||||
TEXT_LINES_SPACING = 17
|
||||
TEXT_ALIGNMENT_VERTICAL = 18
|
||||
TEXT_MULTILINE = 19
|
||||
TEXT_WRAP_MODE = 20
|
||||
|
||||
class GuiSpinnerProperty(IntEnum):
|
||||
SPIN_BUTTON_WIDTH = 16
|
||||
SPIN_BUTTON_SPACING = 17
|
||||
|
||||
class GuiListViewProperty(IntEnum):
|
||||
LIST_ITEMS_HEIGHT = 16
|
||||
LIST_ITEMS_SPACING = 17
|
||||
SCROLLBAR_WIDTH = 18
|
||||
SCROLLBAR_SIDE = 19
|
||||
|
||||
class GuiColorPickerProperty(IntEnum):
|
||||
COLOR_SELECTOR_SIZE = 16
|
||||
HUEBAR_WIDTH = 17
|
||||
HUEBAR_PADDING = 18
|
||||
HUEBAR_SELECTOR_HEIGHT = 19
|
||||
HUEBAR_SELECTOR_OVERFLOW = 20
|
||||
|
||||
class GuiIconName(IntEnum):
|
||||
ICON_NONE = 0
|
||||
ICON_FOLDER_FILE_OPEN = 1
|
||||
ICON_FILE_SAVE_CLASSIC = 2
|
||||
ICON_FOLDER_OPEN = 3
|
||||
ICON_FOLDER_SAVE = 4
|
||||
ICON_FILE_OPEN = 5
|
||||
ICON_FILE_SAVE = 6
|
||||
ICON_FILE_EXPORT = 7
|
||||
ICON_FILE_ADD = 8
|
||||
ICON_FILE_DELETE = 9
|
||||
ICON_FILETYPE_TEXT = 10
|
||||
ICON_FILETYPE_AUDIO = 11
|
||||
ICON_FILETYPE_IMAGE = 12
|
||||
ICON_FILETYPE_PLAY = 13
|
||||
ICON_FILETYPE_VIDEO = 14
|
||||
ICON_FILETYPE_INFO = 15
|
||||
ICON_FILE_COPY = 16
|
||||
ICON_FILE_CUT = 17
|
||||
ICON_FILE_PASTE = 18
|
||||
ICON_CURSOR_HAND = 19
|
||||
ICON_CURSOR_POINTER = 20
|
||||
ICON_CURSOR_CLASSIC = 21
|
||||
ICON_PENCIL = 22
|
||||
ICON_PENCIL_BIG = 23
|
||||
ICON_BRUSH_CLASSIC = 24
|
||||
ICON_BRUSH_PAINTER = 25
|
||||
ICON_WATER_DROP = 26
|
||||
ICON_COLOR_PICKER = 27
|
||||
ICON_RUBBER = 28
|
||||
ICON_COLOR_BUCKET = 29
|
||||
ICON_TEXT_T = 30
|
||||
ICON_TEXT_A = 31
|
||||
ICON_SCALE = 32
|
||||
ICON_RESIZE = 33
|
||||
ICON_FILTER_POINT = 34
|
||||
ICON_FILTER_BILINEAR = 35
|
||||
ICON_CROP = 36
|
||||
ICON_CROP_ALPHA = 37
|
||||
ICON_SQUARE_TOGGLE = 38
|
||||
ICON_SYMMETRY = 39
|
||||
ICON_SYMMETRY_HORIZONTAL = 40
|
||||
ICON_SYMMETRY_VERTICAL = 41
|
||||
ICON_LENS = 42
|
||||
ICON_LENS_BIG = 43
|
||||
ICON_EYE_ON = 44
|
||||
ICON_EYE_OFF = 45
|
||||
ICON_FILTER_TOP = 46
|
||||
ICON_FILTER = 47
|
||||
ICON_TARGET_POINT = 48
|
||||
ICON_TARGET_SMALL = 49
|
||||
ICON_TARGET_BIG = 50
|
||||
ICON_TARGET_MOVE = 51
|
||||
ICON_CURSOR_MOVE = 52
|
||||
ICON_CURSOR_SCALE = 53
|
||||
ICON_CURSOR_SCALE_RIGHT = 54
|
||||
ICON_CURSOR_SCALE_LEFT = 55
|
||||
ICON_UNDO = 56
|
||||
ICON_REDO = 57
|
||||
ICON_REREDO = 58
|
||||
ICON_MUTATE = 59
|
||||
ICON_ROTATE = 60
|
||||
ICON_REPEAT = 61
|
||||
ICON_SHUFFLE = 62
|
||||
ICON_EMPTYBOX = 63
|
||||
ICON_TARGET = 64
|
||||
ICON_TARGET_SMALL_FILL = 65
|
||||
ICON_TARGET_BIG_FILL = 66
|
||||
ICON_TARGET_MOVE_FILL = 67
|
||||
ICON_CURSOR_MOVE_FILL = 68
|
||||
ICON_CURSOR_SCALE_FILL = 69
|
||||
ICON_CURSOR_SCALE_RIGHT_FILL = 70
|
||||
ICON_CURSOR_SCALE_LEFT_FILL = 71
|
||||
ICON_UNDO_FILL = 72
|
||||
ICON_REDO_FILL = 73
|
||||
ICON_REREDO_FILL = 74
|
||||
ICON_MUTATE_FILL = 75
|
||||
ICON_ROTATE_FILL = 76
|
||||
ICON_REPEAT_FILL = 77
|
||||
ICON_SHUFFLE_FILL = 78
|
||||
ICON_EMPTYBOX_SMALL = 79
|
||||
ICON_BOX = 80
|
||||
ICON_BOX_TOP = 81
|
||||
ICON_BOX_TOP_RIGHT = 82
|
||||
ICON_BOX_RIGHT = 83
|
||||
ICON_BOX_BOTTOM_RIGHT = 84
|
||||
ICON_BOX_BOTTOM = 85
|
||||
ICON_BOX_BOTTOM_LEFT = 86
|
||||
ICON_BOX_LEFT = 87
|
||||
ICON_BOX_TOP_LEFT = 88
|
||||
ICON_BOX_CENTER = 89
|
||||
ICON_BOX_CIRCLE_MASK = 90
|
||||
ICON_POT = 91
|
||||
ICON_ALPHA_MULTIPLY = 92
|
||||
ICON_ALPHA_CLEAR = 93
|
||||
ICON_DITHERING = 94
|
||||
ICON_MIPMAPS = 95
|
||||
ICON_BOX_GRID = 96
|
||||
ICON_GRID = 97
|
||||
ICON_BOX_CORNERS_SMALL = 98
|
||||
ICON_BOX_CORNERS_BIG = 99
|
||||
ICON_FOUR_BOXES = 100
|
||||
ICON_GRID_FILL = 101
|
||||
ICON_BOX_MULTISIZE = 102
|
||||
ICON_ZOOM_SMALL = 103
|
||||
ICON_ZOOM_MEDIUM = 104
|
||||
ICON_ZOOM_BIG = 105
|
||||
ICON_ZOOM_ALL = 106
|
||||
ICON_ZOOM_CENTER = 107
|
||||
ICON_BOX_DOTS_SMALL = 108
|
||||
ICON_BOX_DOTS_BIG = 109
|
||||
ICON_BOX_CONCENTRIC = 110
|
||||
ICON_BOX_GRID_BIG = 111
|
||||
ICON_OK_TICK = 112
|
||||
ICON_CROSS = 113
|
||||
ICON_ARROW_LEFT = 114
|
||||
ICON_ARROW_RIGHT = 115
|
||||
ICON_ARROW_DOWN = 116
|
||||
ICON_ARROW_UP = 117
|
||||
ICON_ARROW_LEFT_FILL = 118
|
||||
ICON_ARROW_RIGHT_FILL = 119
|
||||
ICON_ARROW_DOWN_FILL = 120
|
||||
ICON_ARROW_UP_FILL = 121
|
||||
ICON_AUDIO = 122
|
||||
ICON_FX = 123
|
||||
ICON_WAVE = 124
|
||||
ICON_WAVE_SINUS = 125
|
||||
ICON_WAVE_SQUARE = 126
|
||||
ICON_WAVE_TRIANGULAR = 127
|
||||
ICON_CROSS_SMALL = 128
|
||||
ICON_PLAYER_PREVIOUS = 129
|
||||
ICON_PLAYER_PLAY_BACK = 130
|
||||
ICON_PLAYER_PLAY = 131
|
||||
ICON_PLAYER_PAUSE = 132
|
||||
ICON_PLAYER_STOP = 133
|
||||
ICON_PLAYER_NEXT = 134
|
||||
ICON_PLAYER_RECORD = 135
|
||||
ICON_MAGNET = 136
|
||||
ICON_LOCK_CLOSE = 137
|
||||
ICON_LOCK_OPEN = 138
|
||||
ICON_CLOCK = 139
|
||||
ICON_TOOLS = 140
|
||||
ICON_GEAR = 141
|
||||
ICON_GEAR_BIG = 142
|
||||
ICON_BIN = 143
|
||||
ICON_HAND_POINTER = 144
|
||||
ICON_LASER = 145
|
||||
ICON_COIN = 146
|
||||
ICON_EXPLOSION = 147
|
||||
ICON_1UP = 148
|
||||
ICON_PLAYER = 149
|
||||
ICON_PLAYER_JUMP = 150
|
||||
ICON_KEY = 151
|
||||
ICON_DEMON = 152
|
||||
ICON_TEXT_POPUP = 153
|
||||
ICON_GEAR_EX = 154
|
||||
ICON_CRACK = 155
|
||||
ICON_CRACK_POINTS = 156
|
||||
ICON_STAR = 157
|
||||
ICON_DOOR = 158
|
||||
ICON_EXIT = 159
|
||||
ICON_MODE_2D = 160
|
||||
ICON_MODE_3D = 161
|
||||
ICON_CUBE = 162
|
||||
ICON_CUBE_FACE_TOP = 163
|
||||
ICON_CUBE_FACE_LEFT = 164
|
||||
ICON_CUBE_FACE_FRONT = 165
|
||||
ICON_CUBE_FACE_BOTTOM = 166
|
||||
ICON_CUBE_FACE_RIGHT = 167
|
||||
ICON_CUBE_FACE_BACK = 168
|
||||
ICON_CAMERA = 169
|
||||
ICON_SPECIAL = 170
|
||||
ICON_LINK_NET = 171
|
||||
ICON_LINK_BOXES = 172
|
||||
ICON_LINK_MULTI = 173
|
||||
ICON_LINK = 174
|
||||
ICON_LINK_BROKE = 175
|
||||
ICON_TEXT_NOTES = 176
|
||||
ICON_NOTEBOOK = 177
|
||||
ICON_SUITCASE = 178
|
||||
ICON_SUITCASE_ZIP = 179
|
||||
ICON_MAILBOX = 180
|
||||
ICON_MONITOR = 181
|
||||
ICON_PRINTER = 182
|
||||
ICON_PHOTO_CAMERA = 183
|
||||
ICON_PHOTO_CAMERA_FLASH = 184
|
||||
ICON_HOUSE = 185
|
||||
ICON_HEART = 186
|
||||
ICON_CORNER = 187
|
||||
ICON_VERTICAL_BARS = 188
|
||||
ICON_VERTICAL_BARS_FILL = 189
|
||||
ICON_LIFE_BARS = 190
|
||||
ICON_INFO = 191
|
||||
ICON_CROSSLINE = 192
|
||||
ICON_HELP = 193
|
||||
ICON_FILETYPE_ALPHA = 194
|
||||
ICON_FILETYPE_HOME = 195
|
||||
ICON_LAYERS_VISIBLE = 196
|
||||
ICON_LAYERS = 197
|
||||
ICON_WINDOW = 198
|
||||
ICON_HIDPI = 199
|
||||
ICON_FILETYPE_BINARY = 200
|
||||
ICON_HEX = 201
|
||||
ICON_SHIELD = 202
|
||||
ICON_FILE_NEW = 203
|
||||
ICON_FOLDER_ADD = 204
|
||||
ICON_ALARM = 205
|
||||
ICON_CPU = 206
|
||||
ICON_ROM = 207
|
||||
ICON_STEP_OVER = 208
|
||||
ICON_STEP_INTO = 209
|
||||
ICON_STEP_OUT = 210
|
||||
ICON_RESTART = 211
|
||||
ICON_BREAKPOINT_ON = 212
|
||||
ICON_BREAKPOINT_OFF = 213
|
||||
ICON_BURGER_MENU = 214
|
||||
ICON_CASE_SENSITIVE = 215
|
||||
ICON_REG_EXP = 216
|
||||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_219 = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
ICON_222 = 222
|
||||
ICON_223 = 223
|
||||
ICON_224 = 224
|
||||
ICON_225 = 225
|
||||
ICON_226 = 226
|
||||
ICON_227 = 227
|
||||
ICON_228 = 228
|
||||
ICON_229 = 229
|
||||
ICON_230 = 230
|
||||
ICON_231 = 231
|
||||
ICON_232 = 232
|
||||
ICON_233 = 233
|
||||
ICON_234 = 234
|
||||
ICON_235 = 235
|
||||
ICON_236 = 236
|
||||
ICON_237 = 237
|
||||
ICON_238 = 238
|
||||
ICON_239 = 239
|
||||
ICON_240 = 240
|
||||
ICON_241 = 241
|
||||
ICON_242 = 242
|
||||
ICON_243 = 243
|
||||
ICON_244 = 244
|
||||
ICON_245 = 245
|
||||
ICON_246 = 246
|
||||
ICON_247 = 247
|
||||
ICON_248 = 248
|
||||
ICON_249 = 249
|
||||
ICON_250 = 250
|
||||
ICON_251 = 251
|
||||
ICON_252 = 252
|
||||
ICON_253 = 253
|
||||
ICON_254 = 254
|
||||
ICON_255 = 255
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
|
||||
raylib [core] example - 2d camera
|
||||
raylib [core] example - 2D Camera System
|
||||
|
||||
"""
|
||||
import pyray
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"""
|
||||
|
||||
raylib [core] example - 2d camera platformer
|
||||
raylib [core] example - 2D Camera platformer
|
||||
|
||||
"""
|
||||
from math import sqrt
|
||||
|
|
|
@ -27,7 +27,7 @@ while not window_should_close(): # Detect window close button or ESC key
|
|||
# Update
|
||||
update_camera(camera, pyray.CAMERA_FREE)
|
||||
|
||||
if is_key_down(pyray.KEY_Z):
|
||||
if is_key_pressed(pyray.KEY_Z):
|
||||
camera.target = Vector3(0.0, 0.0, 0.0)
|
||||
|
||||
# Draw
|
||||
|
@ -44,8 +44,8 @@ while not window_should_close(): # Detect window close button or ESC key
|
|||
|
||||
end_mode_3d()
|
||||
|
||||
draw_rectangle(10, 10, 320, 133, Fade(SKYBLUE, 0.5))
|
||||
draw_rectangle_lines(10, 10, 320, 133, BLUE)
|
||||
draw_rectangle(10, 10, 320, 93, Fade(SKYBLUE, 0.5))
|
||||
draw_rectangle_lines(10, 10, 320, 93, BLUE)
|
||||
|
||||
draw_text("Free camera default controls:", 20, 20, 10, BLACK)
|
||||
draw_text("- Mouse Wheel to Zoom in-out", 40, 40, 10, DARKGRAY)
|
||||
|
|
4292
pyray/__init__.pyi
4292
pyray/__init__.pyi
File diff suppressed because it is too large
Load diff
2
raygui
2
raygui
|
@ -1 +1 @@
|
|||
Subproject commit 2b45fea4295cd6ff4b425e21706b9c950245b805
|
||||
Subproject commit 25c8c65a6e5f0f4d4b564a0343861898c6f2778b
|
2
raylib-c
2
raylib-c
|
@ -1 +1 @@
|
|||
Subproject commit fec96137e8d10ee6c88914fbe5e5429c13ee1dac
|
||||
Subproject commit ae50bfa2cc569c0f8d5bc4315d39db64005b1b08
|
4039
raylib/__init__.pyi
4039
raylib/__init__.pyi
File diff suppressed because it is too large
Load diff
702
raylib/enums.py
702
raylib/enums.py
|
@ -1,702 +0,0 @@
|
|||
from enum import IntEnum
|
||||
|
||||
class ConfigFlags(IntEnum):
|
||||
FLAG_VSYNC_HINT = 64
|
||||
FLAG_FULLSCREEN_MODE = 2
|
||||
FLAG_WINDOW_RESIZABLE = 4
|
||||
FLAG_WINDOW_UNDECORATED = 8
|
||||
FLAG_WINDOW_HIDDEN = 128
|
||||
FLAG_WINDOW_MINIMIZED = 512
|
||||
FLAG_WINDOW_MAXIMIZED = 1024
|
||||
FLAG_WINDOW_UNFOCUSED = 2048
|
||||
FLAG_WINDOW_TOPMOST = 4096
|
||||
FLAG_WINDOW_ALWAYS_RUN = 256
|
||||
FLAG_WINDOW_TRANSPARENT = 16
|
||||
FLAG_WINDOW_HIGHDPI = 8192
|
||||
FLAG_WINDOW_MOUSE_PASSTHROUGH = 16384
|
||||
FLAG_MSAA_4X_HINT = 32
|
||||
FLAG_INTERLACED_HINT = 65536
|
||||
|
||||
class TraceLogLevel(IntEnum):
|
||||
LOG_ALL = 0
|
||||
LOG_TRACE = 1
|
||||
LOG_DEBUG = 2
|
||||
LOG_INFO = 3
|
||||
LOG_WARNING = 4
|
||||
LOG_ERROR = 5
|
||||
LOG_FATAL = 6
|
||||
LOG_NONE = 7
|
||||
|
||||
class KeyboardKey(IntEnum):
|
||||
KEY_NULL = 0
|
||||
KEY_APOSTROPHE = 39
|
||||
KEY_COMMA = 44
|
||||
KEY_MINUS = 45
|
||||
KEY_PERIOD = 46
|
||||
KEY_SLASH = 47
|
||||
KEY_ZERO = 48
|
||||
KEY_ONE = 49
|
||||
KEY_TWO = 50
|
||||
KEY_THREE = 51
|
||||
KEY_FOUR = 52
|
||||
KEY_FIVE = 53
|
||||
KEY_SIX = 54
|
||||
KEY_SEVEN = 55
|
||||
KEY_EIGHT = 56
|
||||
KEY_NINE = 57
|
||||
KEY_SEMICOLON = 59
|
||||
KEY_EQUAL = 61
|
||||
KEY_A = 65
|
||||
KEY_B = 66
|
||||
KEY_C = 67
|
||||
KEY_D = 68
|
||||
KEY_E = 69
|
||||
KEY_F = 70
|
||||
KEY_G = 71
|
||||
KEY_H = 72
|
||||
KEY_I = 73
|
||||
KEY_J = 74
|
||||
KEY_K = 75
|
||||
KEY_L = 76
|
||||
KEY_M = 77
|
||||
KEY_N = 78
|
||||
KEY_O = 79
|
||||
KEY_P = 80
|
||||
KEY_Q = 81
|
||||
KEY_R = 82
|
||||
KEY_S = 83
|
||||
KEY_T = 84
|
||||
KEY_U = 85
|
||||
KEY_V = 86
|
||||
KEY_W = 87
|
||||
KEY_X = 88
|
||||
KEY_Y = 89
|
||||
KEY_Z = 90
|
||||
KEY_LEFT_BRACKET = 91
|
||||
KEY_BACKSLASH = 92
|
||||
KEY_RIGHT_BRACKET = 93
|
||||
KEY_GRAVE = 96
|
||||
KEY_SPACE = 32
|
||||
KEY_ESCAPE = 256
|
||||
KEY_ENTER = 257
|
||||
KEY_TAB = 258
|
||||
KEY_BACKSPACE = 259
|
||||
KEY_INSERT = 260
|
||||
KEY_DELETE = 261
|
||||
KEY_RIGHT = 262
|
||||
KEY_LEFT = 263
|
||||
KEY_DOWN = 264
|
||||
KEY_UP = 265
|
||||
KEY_PAGE_UP = 266
|
||||
KEY_PAGE_DOWN = 267
|
||||
KEY_HOME = 268
|
||||
KEY_END = 269
|
||||
KEY_CAPS_LOCK = 280
|
||||
KEY_SCROLL_LOCK = 281
|
||||
KEY_NUM_LOCK = 282
|
||||
KEY_PRINT_SCREEN = 283
|
||||
KEY_PAUSE = 284
|
||||
KEY_F1 = 290
|
||||
KEY_F2 = 291
|
||||
KEY_F3 = 292
|
||||
KEY_F4 = 293
|
||||
KEY_F5 = 294
|
||||
KEY_F6 = 295
|
||||
KEY_F7 = 296
|
||||
KEY_F8 = 297
|
||||
KEY_F9 = 298
|
||||
KEY_F10 = 299
|
||||
KEY_F11 = 300
|
||||
KEY_F12 = 301
|
||||
KEY_LEFT_SHIFT = 340
|
||||
KEY_LEFT_CONTROL = 341
|
||||
KEY_LEFT_ALT = 342
|
||||
KEY_LEFT_SUPER = 343
|
||||
KEY_RIGHT_SHIFT = 344
|
||||
KEY_RIGHT_CONTROL = 345
|
||||
KEY_RIGHT_ALT = 346
|
||||
KEY_RIGHT_SUPER = 347
|
||||
KEY_KB_MENU = 348
|
||||
KEY_KP_0 = 320
|
||||
KEY_KP_1 = 321
|
||||
KEY_KP_2 = 322
|
||||
KEY_KP_3 = 323
|
||||
KEY_KP_4 = 324
|
||||
KEY_KP_5 = 325
|
||||
KEY_KP_6 = 326
|
||||
KEY_KP_7 = 327
|
||||
KEY_KP_8 = 328
|
||||
KEY_KP_9 = 329
|
||||
KEY_KP_DECIMAL = 330
|
||||
KEY_KP_DIVIDE = 331
|
||||
KEY_KP_MULTIPLY = 332
|
||||
KEY_KP_SUBTRACT = 333
|
||||
KEY_KP_ADD = 334
|
||||
KEY_KP_ENTER = 335
|
||||
KEY_KP_EQUAL = 336
|
||||
KEY_BACK = 4
|
||||
KEY_MENU = 82
|
||||
KEY_VOLUME_UP = 24
|
||||
KEY_VOLUME_DOWN = 25
|
||||
|
||||
class MouseButton(IntEnum):
|
||||
MOUSE_BUTTON_LEFT = 0
|
||||
MOUSE_BUTTON_RIGHT = 1
|
||||
MOUSE_BUTTON_MIDDLE = 2
|
||||
MOUSE_BUTTON_SIDE = 3
|
||||
MOUSE_BUTTON_EXTRA = 4
|
||||
MOUSE_BUTTON_FORWARD = 5
|
||||
MOUSE_BUTTON_BACK = 6
|
||||
|
||||
class MouseCursor(IntEnum):
|
||||
MOUSE_CURSOR_DEFAULT = 0
|
||||
MOUSE_CURSOR_ARROW = 1
|
||||
MOUSE_CURSOR_IBEAM = 2
|
||||
MOUSE_CURSOR_CROSSHAIR = 3
|
||||
MOUSE_CURSOR_POINTING_HAND = 4
|
||||
MOUSE_CURSOR_RESIZE_EW = 5
|
||||
MOUSE_CURSOR_RESIZE_NS = 6
|
||||
MOUSE_CURSOR_RESIZE_NWSE = 7
|
||||
MOUSE_CURSOR_RESIZE_NESW = 8
|
||||
MOUSE_CURSOR_RESIZE_ALL = 9
|
||||
MOUSE_CURSOR_NOT_ALLOWED = 10
|
||||
|
||||
class GamepadButton(IntEnum):
|
||||
GAMEPAD_BUTTON_UNKNOWN = 0
|
||||
GAMEPAD_BUTTON_LEFT_FACE_UP = 1
|
||||
GAMEPAD_BUTTON_LEFT_FACE_RIGHT = 2
|
||||
GAMEPAD_BUTTON_LEFT_FACE_DOWN = 3
|
||||
GAMEPAD_BUTTON_LEFT_FACE_LEFT = 4
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_UP = 5
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_RIGHT = 6
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_DOWN = 7
|
||||
GAMEPAD_BUTTON_RIGHT_FACE_LEFT = 8
|
||||
GAMEPAD_BUTTON_LEFT_TRIGGER_1 = 9
|
||||
GAMEPAD_BUTTON_LEFT_TRIGGER_2 = 10
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_1 = 11
|
||||
GAMEPAD_BUTTON_RIGHT_TRIGGER_2 = 12
|
||||
GAMEPAD_BUTTON_MIDDLE_LEFT = 13
|
||||
GAMEPAD_BUTTON_MIDDLE = 14
|
||||
GAMEPAD_BUTTON_MIDDLE_RIGHT = 15
|
||||
GAMEPAD_BUTTON_LEFT_THUMB = 16
|
||||
GAMEPAD_BUTTON_RIGHT_THUMB = 17
|
||||
|
||||
class GamepadAxis(IntEnum):
|
||||
GAMEPAD_AXIS_LEFT_X = 0
|
||||
GAMEPAD_AXIS_LEFT_Y = 1
|
||||
GAMEPAD_AXIS_RIGHT_X = 2
|
||||
GAMEPAD_AXIS_RIGHT_Y = 3
|
||||
GAMEPAD_AXIS_LEFT_TRIGGER = 4
|
||||
GAMEPAD_AXIS_RIGHT_TRIGGER = 5
|
||||
|
||||
class MaterialMapIndex(IntEnum):
|
||||
MATERIAL_MAP_ALBEDO = 0
|
||||
MATERIAL_MAP_METALNESS = 1
|
||||
MATERIAL_MAP_NORMAL = 2
|
||||
MATERIAL_MAP_ROUGHNESS = 3
|
||||
MATERIAL_MAP_OCCLUSION = 4
|
||||
MATERIAL_MAP_EMISSION = 5
|
||||
MATERIAL_MAP_HEIGHT = 6
|
||||
MATERIAL_MAP_CUBEMAP = 7
|
||||
MATERIAL_MAP_IRRADIANCE = 8
|
||||
MATERIAL_MAP_PREFILTER = 9
|
||||
MATERIAL_MAP_BRDF = 10
|
||||
|
||||
class ShaderLocationIndex(IntEnum):
|
||||
SHADER_LOC_VERTEX_POSITION = 0
|
||||
SHADER_LOC_VERTEX_TEXCOORD01 = 1
|
||||
SHADER_LOC_VERTEX_TEXCOORD02 = 2
|
||||
SHADER_LOC_VERTEX_NORMAL = 3
|
||||
SHADER_LOC_VERTEX_TANGENT = 4
|
||||
SHADER_LOC_VERTEX_COLOR = 5
|
||||
SHADER_LOC_MATRIX_MVP = 6
|
||||
SHADER_LOC_MATRIX_VIEW = 7
|
||||
SHADER_LOC_MATRIX_PROJECTION = 8
|
||||
SHADER_LOC_MATRIX_MODEL = 9
|
||||
SHADER_LOC_MATRIX_NORMAL = 10
|
||||
SHADER_LOC_VECTOR_VIEW = 11
|
||||
SHADER_LOC_COLOR_DIFFUSE = 12
|
||||
SHADER_LOC_COLOR_SPECULAR = 13
|
||||
SHADER_LOC_COLOR_AMBIENT = 14
|
||||
SHADER_LOC_MAP_ALBEDO = 15
|
||||
SHADER_LOC_MAP_METALNESS = 16
|
||||
SHADER_LOC_MAP_NORMAL = 17
|
||||
SHADER_LOC_MAP_ROUGHNESS = 18
|
||||
SHADER_LOC_MAP_OCCLUSION = 19
|
||||
SHADER_LOC_MAP_EMISSION = 20
|
||||
SHADER_LOC_MAP_HEIGHT = 21
|
||||
SHADER_LOC_MAP_CUBEMAP = 22
|
||||
SHADER_LOC_MAP_IRRADIANCE = 23
|
||||
SHADER_LOC_MAP_PREFILTER = 24
|
||||
SHADER_LOC_MAP_BRDF = 25
|
||||
|
||||
class ShaderUniformDataType(IntEnum):
|
||||
SHADER_UNIFORM_FLOAT = 0
|
||||
SHADER_UNIFORM_VEC2 = 1
|
||||
SHADER_UNIFORM_VEC3 = 2
|
||||
SHADER_UNIFORM_VEC4 = 3
|
||||
SHADER_UNIFORM_INT = 4
|
||||
SHADER_UNIFORM_IVEC2 = 5
|
||||
SHADER_UNIFORM_IVEC3 = 6
|
||||
SHADER_UNIFORM_IVEC4 = 7
|
||||
SHADER_UNIFORM_SAMPLER2D = 8
|
||||
|
||||
class ShaderAttributeDataType(IntEnum):
|
||||
SHADER_ATTRIB_FLOAT = 0
|
||||
SHADER_ATTRIB_VEC2 = 1
|
||||
SHADER_ATTRIB_VEC3 = 2
|
||||
SHADER_ATTRIB_VEC4 = 3
|
||||
|
||||
class PixelFormat(IntEnum):
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAYSCALE = 1
|
||||
PIXELFORMAT_UNCOMPRESSED_GRAY_ALPHA = 2
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G6B5 = 3
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8 = 4
|
||||
PIXELFORMAT_UNCOMPRESSED_R5G5B5A1 = 5
|
||||
PIXELFORMAT_UNCOMPRESSED_R4G4B4A4 = 6
|
||||
PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 = 7
|
||||
PIXELFORMAT_UNCOMPRESSED_R32 = 8
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32 = 9
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32 = 10
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGB = 11
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGBA = 12
|
||||
PIXELFORMAT_COMPRESSED_DXT3_RGBA = 13
|
||||
PIXELFORMAT_COMPRESSED_DXT5_RGBA = 14
|
||||
PIXELFORMAT_COMPRESSED_ETC1_RGB = 15
|
||||
PIXELFORMAT_COMPRESSED_ETC2_RGB = 16
|
||||
PIXELFORMAT_COMPRESSED_ETC2_EAC_RGBA = 17
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGB = 18
|
||||
PIXELFORMAT_COMPRESSED_PVRT_RGBA = 19
|
||||
PIXELFORMAT_COMPRESSED_ASTC_4x4_RGBA = 20
|
||||
PIXELFORMAT_COMPRESSED_ASTC_8x8_RGBA = 21
|
||||
|
||||
class TextureFilter(IntEnum):
|
||||
TEXTURE_FILTER_POINT = 0
|
||||
TEXTURE_FILTER_BILINEAR = 1
|
||||
TEXTURE_FILTER_TRILINEAR = 2
|
||||
TEXTURE_FILTER_ANISOTROPIC_4X = 3
|
||||
TEXTURE_FILTER_ANISOTROPIC_8X = 4
|
||||
TEXTURE_FILTER_ANISOTROPIC_16X = 5
|
||||
|
||||
class TextureWrap(IntEnum):
|
||||
TEXTURE_WRAP_REPEAT = 0
|
||||
TEXTURE_WRAP_CLAMP = 1
|
||||
TEXTURE_WRAP_MIRROR_REPEAT = 2
|
||||
TEXTURE_WRAP_MIRROR_CLAMP = 3
|
||||
|
||||
class CubemapLayout(IntEnum):
|
||||
CUBEMAP_LAYOUT_AUTO_DETECT = 0
|
||||
CUBEMAP_LAYOUT_LINE_VERTICAL = 1
|
||||
CUBEMAP_LAYOUT_LINE_HORIZONTAL = 2
|
||||
CUBEMAP_LAYOUT_CROSS_THREE_BY_FOUR = 3
|
||||
CUBEMAP_LAYOUT_CROSS_FOUR_BY_THREE = 4
|
||||
CUBEMAP_LAYOUT_PANORAMA = 5
|
||||
|
||||
class FontType(IntEnum):
|
||||
FONT_DEFAULT = 0
|
||||
FONT_BITMAP = 1
|
||||
FONT_SDF = 2
|
||||
|
||||
class BlendMode(IntEnum):
|
||||
BLEND_ALPHA = 0
|
||||
BLEND_ADDITIVE = 1
|
||||
BLEND_MULTIPLIED = 2
|
||||
BLEND_ADD_COLORS = 3
|
||||
BLEND_SUBTRACT_COLORS = 4
|
||||
BLEND_ALPHA_PREMULTIPLY = 5
|
||||
BLEND_CUSTOM = 6
|
||||
BLEND_CUSTOM_SEPARATE = 7
|
||||
|
||||
class Gesture(IntEnum):
|
||||
GESTURE_NONE = 0
|
||||
GESTURE_TAP = 1
|
||||
GESTURE_DOUBLETAP = 2
|
||||
GESTURE_HOLD = 4
|
||||
GESTURE_DRAG = 8
|
||||
GESTURE_SWIPE_RIGHT = 16
|
||||
GESTURE_SWIPE_LEFT = 32
|
||||
GESTURE_SWIPE_UP = 64
|
||||
GESTURE_SWIPE_DOWN = 128
|
||||
GESTURE_PINCH_IN = 256
|
||||
GESTURE_PINCH_OUT = 512
|
||||
|
||||
class CameraMode(IntEnum):
|
||||
CAMERA_CUSTOM = 0
|
||||
CAMERA_FREE = 1
|
||||
CAMERA_ORBITAL = 2
|
||||
CAMERA_FIRST_PERSON = 3
|
||||
CAMERA_THIRD_PERSON = 4
|
||||
|
||||
class CameraProjection(IntEnum):
|
||||
CAMERA_PERSPECTIVE = 0
|
||||
CAMERA_ORTHOGRAPHIC = 1
|
||||
|
||||
class NPatchLayout(IntEnum):
|
||||
NPATCH_NINE_PATCH = 0
|
||||
NPATCH_THREE_PATCH_VERTICAL = 1
|
||||
NPATCH_THREE_PATCH_HORIZONTAL = 2
|
||||
|
||||
class GuiState(IntEnum):
|
||||
STATE_NORMAL = 0
|
||||
STATE_FOCUSED = 1
|
||||
STATE_PRESSED = 2
|
||||
STATE_DISABLED = 3
|
||||
|
||||
class GuiTextAlignment(IntEnum):
|
||||
TEXT_ALIGN_LEFT = 0
|
||||
TEXT_ALIGN_CENTER = 1
|
||||
TEXT_ALIGN_RIGHT = 2
|
||||
|
||||
class GuiControl(IntEnum):
|
||||
DEFAULT = 0
|
||||
LABEL = 1
|
||||
BUTTON = 2
|
||||
TOGGLE = 3
|
||||
SLIDER = 4
|
||||
PROGRESSBAR = 5
|
||||
CHECKBOX = 6
|
||||
COMBOBOX = 7
|
||||
DROPDOWNBOX = 8
|
||||
TEXTBOX = 9
|
||||
VALUEBOX = 10
|
||||
SPINNER = 11
|
||||
LISTVIEW = 12
|
||||
COLORPICKER = 13
|
||||
SCROLLBAR = 14
|
||||
STATUSBAR = 15
|
||||
|
||||
class GuiControlProperty(IntEnum):
|
||||
BORDER_COLOR_NORMAL = 0
|
||||
BASE_COLOR_NORMAL = 1
|
||||
TEXT_COLOR_NORMAL = 2
|
||||
BORDER_COLOR_FOCUSED = 3
|
||||
BASE_COLOR_FOCUSED = 4
|
||||
TEXT_COLOR_FOCUSED = 5
|
||||
BORDER_COLOR_PRESSED = 6
|
||||
BASE_COLOR_PRESSED = 7
|
||||
TEXT_COLOR_PRESSED = 8
|
||||
BORDER_COLOR_DISABLED = 9
|
||||
BASE_COLOR_DISABLED = 10
|
||||
TEXT_COLOR_DISABLED = 11
|
||||
BORDER_WIDTH = 12
|
||||
TEXT_PADDING = 13
|
||||
TEXT_ALIGNMENT = 14
|
||||
RESERVED = 15
|
||||
|
||||
class GuiDefaultProperty(IntEnum):
|
||||
TEXT_SIZE = 16
|
||||
TEXT_SPACING = 17
|
||||
LINE_COLOR = 18
|
||||
BACKGROUND_COLOR = 19
|
||||
|
||||
class GuiToggleProperty(IntEnum):
|
||||
GROUP_PADDING = 16
|
||||
|
||||
class GuiSliderProperty(IntEnum):
|
||||
SLIDER_WIDTH = 16
|
||||
SLIDER_PADDING = 17
|
||||
|
||||
class GuiProgressBarProperty(IntEnum):
|
||||
PROGRESS_PADDING = 16
|
||||
|
||||
class GuiScrollBarProperty(IntEnum):
|
||||
ARROWS_SIZE = 16
|
||||
ARROWS_VISIBLE = 17
|
||||
SCROLL_SLIDER_PADDING = 18
|
||||
SCROLL_SLIDER_SIZE = 19
|
||||
SCROLL_PADDING = 20
|
||||
SCROLL_SPEED = 21
|
||||
|
||||
class GuiCheckBoxProperty(IntEnum):
|
||||
CHECK_PADDING = 16
|
||||
|
||||
class GuiComboBoxProperty(IntEnum):
|
||||
COMBO_BUTTON_WIDTH = 16
|
||||
COMBO_BUTTON_SPACING = 17
|
||||
|
||||
class GuiDropdownBoxProperty(IntEnum):
|
||||
ARROW_PADDING = 16
|
||||
DROPDOWN_ITEMS_SPACING = 17
|
||||
|
||||
class GuiTextBoxProperty(IntEnum):
|
||||
TEXT_INNER_PADDING = 16
|
||||
TEXT_LINES_SPACING = 17
|
||||
TEXT_ALIGNMENT_VERTICAL = 18
|
||||
TEXT_MULTILINE = 19
|
||||
TEXT_WRAP_MODE = 20
|
||||
|
||||
class GuiSpinnerProperty(IntEnum):
|
||||
SPIN_BUTTON_WIDTH = 16
|
||||
SPIN_BUTTON_SPACING = 17
|
||||
|
||||
class GuiListViewProperty(IntEnum):
|
||||
LIST_ITEMS_HEIGHT = 16
|
||||
LIST_ITEMS_SPACING = 17
|
||||
SCROLLBAR_WIDTH = 18
|
||||
SCROLLBAR_SIDE = 19
|
||||
|
||||
class GuiColorPickerProperty(IntEnum):
|
||||
COLOR_SELECTOR_SIZE = 16
|
||||
HUEBAR_WIDTH = 17
|
||||
HUEBAR_PADDING = 18
|
||||
HUEBAR_SELECTOR_HEIGHT = 19
|
||||
HUEBAR_SELECTOR_OVERFLOW = 20
|
||||
|
||||
class GuiIconName(IntEnum):
|
||||
ICON_NONE = 0
|
||||
ICON_FOLDER_FILE_OPEN = 1
|
||||
ICON_FILE_SAVE_CLASSIC = 2
|
||||
ICON_FOLDER_OPEN = 3
|
||||
ICON_FOLDER_SAVE = 4
|
||||
ICON_FILE_OPEN = 5
|
||||
ICON_FILE_SAVE = 6
|
||||
ICON_FILE_EXPORT = 7
|
||||
ICON_FILE_ADD = 8
|
||||
ICON_FILE_DELETE = 9
|
||||
ICON_FILETYPE_TEXT = 10
|
||||
ICON_FILETYPE_AUDIO = 11
|
||||
ICON_FILETYPE_IMAGE = 12
|
||||
ICON_FILETYPE_PLAY = 13
|
||||
ICON_FILETYPE_VIDEO = 14
|
||||
ICON_FILETYPE_INFO = 15
|
||||
ICON_FILE_COPY = 16
|
||||
ICON_FILE_CUT = 17
|
||||
ICON_FILE_PASTE = 18
|
||||
ICON_CURSOR_HAND = 19
|
||||
ICON_CURSOR_POINTER = 20
|
||||
ICON_CURSOR_CLASSIC = 21
|
||||
ICON_PENCIL = 22
|
||||
ICON_PENCIL_BIG = 23
|
||||
ICON_BRUSH_CLASSIC = 24
|
||||
ICON_BRUSH_PAINTER = 25
|
||||
ICON_WATER_DROP = 26
|
||||
ICON_COLOR_PICKER = 27
|
||||
ICON_RUBBER = 28
|
||||
ICON_COLOR_BUCKET = 29
|
||||
ICON_TEXT_T = 30
|
||||
ICON_TEXT_A = 31
|
||||
ICON_SCALE = 32
|
||||
ICON_RESIZE = 33
|
||||
ICON_FILTER_POINT = 34
|
||||
ICON_FILTER_BILINEAR = 35
|
||||
ICON_CROP = 36
|
||||
ICON_CROP_ALPHA = 37
|
||||
ICON_SQUARE_TOGGLE = 38
|
||||
ICON_SYMMETRY = 39
|
||||
ICON_SYMMETRY_HORIZONTAL = 40
|
||||
ICON_SYMMETRY_VERTICAL = 41
|
||||
ICON_LENS = 42
|
||||
ICON_LENS_BIG = 43
|
||||
ICON_EYE_ON = 44
|
||||
ICON_EYE_OFF = 45
|
||||
ICON_FILTER_TOP = 46
|
||||
ICON_FILTER = 47
|
||||
ICON_TARGET_POINT = 48
|
||||
ICON_TARGET_SMALL = 49
|
||||
ICON_TARGET_BIG = 50
|
||||
ICON_TARGET_MOVE = 51
|
||||
ICON_CURSOR_MOVE = 52
|
||||
ICON_CURSOR_SCALE = 53
|
||||
ICON_CURSOR_SCALE_RIGHT = 54
|
||||
ICON_CURSOR_SCALE_LEFT = 55
|
||||
ICON_UNDO = 56
|
||||
ICON_REDO = 57
|
||||
ICON_REREDO = 58
|
||||
ICON_MUTATE = 59
|
||||
ICON_ROTATE = 60
|
||||
ICON_REPEAT = 61
|
||||
ICON_SHUFFLE = 62
|
||||
ICON_EMPTYBOX = 63
|
||||
ICON_TARGET = 64
|
||||
ICON_TARGET_SMALL_FILL = 65
|
||||
ICON_TARGET_BIG_FILL = 66
|
||||
ICON_TARGET_MOVE_FILL = 67
|
||||
ICON_CURSOR_MOVE_FILL = 68
|
||||
ICON_CURSOR_SCALE_FILL = 69
|
||||
ICON_CURSOR_SCALE_RIGHT_FILL = 70
|
||||
ICON_CURSOR_SCALE_LEFT_FILL = 71
|
||||
ICON_UNDO_FILL = 72
|
||||
ICON_REDO_FILL = 73
|
||||
ICON_REREDO_FILL = 74
|
||||
ICON_MUTATE_FILL = 75
|
||||
ICON_ROTATE_FILL = 76
|
||||
ICON_REPEAT_FILL = 77
|
||||
ICON_SHUFFLE_FILL = 78
|
||||
ICON_EMPTYBOX_SMALL = 79
|
||||
ICON_BOX = 80
|
||||
ICON_BOX_TOP = 81
|
||||
ICON_BOX_TOP_RIGHT = 82
|
||||
ICON_BOX_RIGHT = 83
|
||||
ICON_BOX_BOTTOM_RIGHT = 84
|
||||
ICON_BOX_BOTTOM = 85
|
||||
ICON_BOX_BOTTOM_LEFT = 86
|
||||
ICON_BOX_LEFT = 87
|
||||
ICON_BOX_TOP_LEFT = 88
|
||||
ICON_BOX_CENTER = 89
|
||||
ICON_BOX_CIRCLE_MASK = 90
|
||||
ICON_POT = 91
|
||||
ICON_ALPHA_MULTIPLY = 92
|
||||
ICON_ALPHA_CLEAR = 93
|
||||
ICON_DITHERING = 94
|
||||
ICON_MIPMAPS = 95
|
||||
ICON_BOX_GRID = 96
|
||||
ICON_GRID = 97
|
||||
ICON_BOX_CORNERS_SMALL = 98
|
||||
ICON_BOX_CORNERS_BIG = 99
|
||||
ICON_FOUR_BOXES = 100
|
||||
ICON_GRID_FILL = 101
|
||||
ICON_BOX_MULTISIZE = 102
|
||||
ICON_ZOOM_SMALL = 103
|
||||
ICON_ZOOM_MEDIUM = 104
|
||||
ICON_ZOOM_BIG = 105
|
||||
ICON_ZOOM_ALL = 106
|
||||
ICON_ZOOM_CENTER = 107
|
||||
ICON_BOX_DOTS_SMALL = 108
|
||||
ICON_BOX_DOTS_BIG = 109
|
||||
ICON_BOX_CONCENTRIC = 110
|
||||
ICON_BOX_GRID_BIG = 111
|
||||
ICON_OK_TICK = 112
|
||||
ICON_CROSS = 113
|
||||
ICON_ARROW_LEFT = 114
|
||||
ICON_ARROW_RIGHT = 115
|
||||
ICON_ARROW_DOWN = 116
|
||||
ICON_ARROW_UP = 117
|
||||
ICON_ARROW_LEFT_FILL = 118
|
||||
ICON_ARROW_RIGHT_FILL = 119
|
||||
ICON_ARROW_DOWN_FILL = 120
|
||||
ICON_ARROW_UP_FILL = 121
|
||||
ICON_AUDIO = 122
|
||||
ICON_FX = 123
|
||||
ICON_WAVE = 124
|
||||
ICON_WAVE_SINUS = 125
|
||||
ICON_WAVE_SQUARE = 126
|
||||
ICON_WAVE_TRIANGULAR = 127
|
||||
ICON_CROSS_SMALL = 128
|
||||
ICON_PLAYER_PREVIOUS = 129
|
||||
ICON_PLAYER_PLAY_BACK = 130
|
||||
ICON_PLAYER_PLAY = 131
|
||||
ICON_PLAYER_PAUSE = 132
|
||||
ICON_PLAYER_STOP = 133
|
||||
ICON_PLAYER_NEXT = 134
|
||||
ICON_PLAYER_RECORD = 135
|
||||
ICON_MAGNET = 136
|
||||
ICON_LOCK_CLOSE = 137
|
||||
ICON_LOCK_OPEN = 138
|
||||
ICON_CLOCK = 139
|
||||
ICON_TOOLS = 140
|
||||
ICON_GEAR = 141
|
||||
ICON_GEAR_BIG = 142
|
||||
ICON_BIN = 143
|
||||
ICON_HAND_POINTER = 144
|
||||
ICON_LASER = 145
|
||||
ICON_COIN = 146
|
||||
ICON_EXPLOSION = 147
|
||||
ICON_1UP = 148
|
||||
ICON_PLAYER = 149
|
||||
ICON_PLAYER_JUMP = 150
|
||||
ICON_KEY = 151
|
||||
ICON_DEMON = 152
|
||||
ICON_TEXT_POPUP = 153
|
||||
ICON_GEAR_EX = 154
|
||||
ICON_CRACK = 155
|
||||
ICON_CRACK_POINTS = 156
|
||||
ICON_STAR = 157
|
||||
ICON_DOOR = 158
|
||||
ICON_EXIT = 159
|
||||
ICON_MODE_2D = 160
|
||||
ICON_MODE_3D = 161
|
||||
ICON_CUBE = 162
|
||||
ICON_CUBE_FACE_TOP = 163
|
||||
ICON_CUBE_FACE_LEFT = 164
|
||||
ICON_CUBE_FACE_FRONT = 165
|
||||
ICON_CUBE_FACE_BOTTOM = 166
|
||||
ICON_CUBE_FACE_RIGHT = 167
|
||||
ICON_CUBE_FACE_BACK = 168
|
||||
ICON_CAMERA = 169
|
||||
ICON_SPECIAL = 170
|
||||
ICON_LINK_NET = 171
|
||||
ICON_LINK_BOXES = 172
|
||||
ICON_LINK_MULTI = 173
|
||||
ICON_LINK = 174
|
||||
ICON_LINK_BROKE = 175
|
||||
ICON_TEXT_NOTES = 176
|
||||
ICON_NOTEBOOK = 177
|
||||
ICON_SUITCASE = 178
|
||||
ICON_SUITCASE_ZIP = 179
|
||||
ICON_MAILBOX = 180
|
||||
ICON_MONITOR = 181
|
||||
ICON_PRINTER = 182
|
||||
ICON_PHOTO_CAMERA = 183
|
||||
ICON_PHOTO_CAMERA_FLASH = 184
|
||||
ICON_HOUSE = 185
|
||||
ICON_HEART = 186
|
||||
ICON_CORNER = 187
|
||||
ICON_VERTICAL_BARS = 188
|
||||
ICON_VERTICAL_BARS_FILL = 189
|
||||
ICON_LIFE_BARS = 190
|
||||
ICON_INFO = 191
|
||||
ICON_CROSSLINE = 192
|
||||
ICON_HELP = 193
|
||||
ICON_FILETYPE_ALPHA = 194
|
||||
ICON_FILETYPE_HOME = 195
|
||||
ICON_LAYERS_VISIBLE = 196
|
||||
ICON_LAYERS = 197
|
||||
ICON_WINDOW = 198
|
||||
ICON_HIDPI = 199
|
||||
ICON_FILETYPE_BINARY = 200
|
||||
ICON_HEX = 201
|
||||
ICON_SHIELD = 202
|
||||
ICON_FILE_NEW = 203
|
||||
ICON_FOLDER_ADD = 204
|
||||
ICON_ALARM = 205
|
||||
ICON_CPU = 206
|
||||
ICON_ROM = 207
|
||||
ICON_STEP_OVER = 208
|
||||
ICON_STEP_INTO = 209
|
||||
ICON_STEP_OUT = 210
|
||||
ICON_RESTART = 211
|
||||
ICON_BREAKPOINT_ON = 212
|
||||
ICON_BREAKPOINT_OFF = 213
|
||||
ICON_BURGER_MENU = 214
|
||||
ICON_CASE_SENSITIVE = 215
|
||||
ICON_REG_EXP = 216
|
||||
ICON_FOLDER = 217
|
||||
ICON_FILE = 218
|
||||
ICON_219 = 219
|
||||
ICON_220 = 220
|
||||
ICON_221 = 221
|
||||
ICON_222 = 222
|
||||
ICON_223 = 223
|
||||
ICON_224 = 224
|
||||
ICON_225 = 225
|
||||
ICON_226 = 226
|
||||
ICON_227 = 227
|
||||
ICON_228 = 228
|
||||
ICON_229 = 229
|
||||
ICON_230 = 230
|
||||
ICON_231 = 231
|
||||
ICON_232 = 232
|
||||
ICON_233 = 233
|
||||
ICON_234 = 234
|
||||
ICON_235 = 235
|
||||
ICON_236 = 236
|
||||
ICON_237 = 237
|
||||
ICON_238 = 238
|
||||
ICON_239 = 239
|
||||
ICON_240 = 240
|
||||
ICON_241 = 241
|
||||
ICON_242 = 242
|
||||
ICON_243 = 243
|
||||
ICON_244 = 244
|
||||
ICON_245 = 245
|
||||
ICON_246 = 246
|
||||
ICON_247 = 247
|
||||
ICON_248 = 248
|
||||
ICON_249 = 249
|
||||
ICON_250 = 250
|
||||
ICON_251 = 251
|
||||
ICON_252 = 252
|
||||
ICON_253 = 253
|
||||
ICON_254 = 254
|
||||
ICON_255 = 255
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************************
|
||||
*
|
||||
* raygui v3.5 - A simple and easy-to-use immediate-mode gui library
|
||||
* raygui v4.0 - A simple and easy-to-use immediate-mode gui library
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
|
||||
|
@ -10,18 +10,26 @@
|
|||
* - Immediate-mode gui, minimal retained data
|
||||
* - +25 controls provided (basic and advanced)
|
||||
* - Styling system for colors, font and metrics
|
||||
* - Icons supported, embeds a complete 1-bit icons pack
|
||||
* - Standalone usage mode option (custom graphics backends)
|
||||
* - Multiple tools provided for raygui development
|
||||
* - Icons supported, embedded as a 1-bit icons pack
|
||||
* - Standalone mode option (custom input/graphics backend)
|
||||
* - Multiple support tools provided for raygui development
|
||||
*
|
||||
* POSSIBLE IMPROVEMENTS:
|
||||
* - Allow some controls to work in exclusive mode: GuiSlider(), GuiScrollBar()
|
||||
* - Better standalone mode API for easy plug of custom backends
|
||||
* - Externalize required inputs, allow user easier customization
|
||||
*
|
||||
* LIMITATIONS:
|
||||
* - No auto-layout mechanism provided, up to the user to define controls position and size
|
||||
* - No editable multi-line word-wraped text box supported
|
||||
* - No auto-layout mechanism, up to the user to define controls position and size
|
||||
* - Standalone mode requires library modification and some user work to plug another backend
|
||||
*
|
||||
* NOTES:
|
||||
* - WARNING: GuiLoadStyle() and GuiLoadStyle{Custom}() functions, allocate memory for
|
||||
* font atlas recs and glyphs, freeing that memory is (usually) up to the user,
|
||||
* no unload function is explicitly provided... but note that GuiLoadStyleDefaulf() unloads
|
||||
* by default any previously loaded font (texture, recs, glyphs).
|
||||
* - Global UI alpha (guiAlpha) is applied inside GuiDrawRectangle() and GuiDrawText() functions
|
||||
*
|
||||
* CONTROLS PROVIDED:
|
||||
* # Container/separators Controls
|
||||
* - WindowBox --> StatusBar, Panel
|
||||
|
@ -29,13 +37,15 @@
|
|||
* - Line
|
||||
* - Panel --> StatusBar
|
||||
* - ScrollPanel --> StatusBar
|
||||
* - TabBar --> Button
|
||||
*
|
||||
* # Basic Controls
|
||||
* - Label
|
||||
* - Button
|
||||
* - LabelButton --> Label
|
||||
* - Button
|
||||
* - Toggle
|
||||
* - ToggleGroup --> Toggle
|
||||
* - ToggleSlider
|
||||
* - CheckBox
|
||||
* - ComboBox
|
||||
* - DropdownBox
|
||||
|
@ -124,8 +134,54 @@
|
|||
* Includes custom ricons.h header defining a set of custom icons,
|
||||
* this file can be generated using rGuiIcons tool
|
||||
*
|
||||
* #define RAYGUI_DEBUG_RECS_BOUNDS
|
||||
* Draw control bounds rectangles for debug
|
||||
*
|
||||
* #define RAYGUI_DEBUG_TEXT_BOUNDS
|
||||
* Draw text bounds rectangles for debug
|
||||
*
|
||||
* VERSIONS HISTORY:
|
||||
* 4.0 (12-Sep-2023) ADDED: GuiToggleSlider()
|
||||
* ADDED: GuiColorPickerHSV() and GuiColorPanelHSV()
|
||||
* ADDED: Multiple new icons, mostly compiler related
|
||||
* ADDED: New DEFAULT properties: TEXT_LINE_SPACING, TEXT_ALIGNMENT_VERTICAL, TEXT_WRAP_MODE
|
||||
* ADDED: New enum values: GuiTextAlignment, GuiTextAlignmentVertical, GuiTextWrapMode
|
||||
* ADDED: Support loading styles with custom font charset from external file
|
||||
* REDESIGNED: GuiTextBox(), support mouse cursor positioning
|
||||
* REDESIGNED: GuiDrawText(), support multiline and word-wrap modes (read only)
|
||||
* REDESIGNED: GuiProgressBar() to be more visual, progress affects border color
|
||||
* REDESIGNED: Global alpha consideration moved to GuiDrawRectangle() and GuiDrawText()
|
||||
* REDESIGNED: GuiScrollPanel(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiToggleGroup(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiComboBox(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiCheckBox(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiSlider(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiSliderBar(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiProgressBar(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiListView(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiColorPicker(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiColorPanel(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiColorBarAlpha(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiColorBarHue(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiGrid(), get parameters by reference and return result value
|
||||
* REDESIGNED: GuiGrid(), added extra parameter
|
||||
* REDESIGNED: GuiListViewEx(), change parameters order
|
||||
* REDESIGNED: All controls return result as int value
|
||||
* REVIEWED: GuiScrollPanel() to avoid smallish scroll-bars
|
||||
* REVIEWED: All examples and specially controls_test_suite
|
||||
* RENAMED: gui_file_dialog module to gui_window_file_dialog
|
||||
* UPDATED: All styles to include ISO-8859-15 charset (as much as possible)
|
||||
*
|
||||
* 3.6 (10-May-2023) ADDED: New icon: SAND_TIMER
|
||||
* ADDED: GuiLoadStyleFromMemory() (binary only)
|
||||
* REVIEWED: GuiScrollBar() horizontal movement key
|
||||
* REVIEWED: GuiTextBox() crash on cursor movement
|
||||
* REVIEWED: GuiTextBox(), additional inputs support
|
||||
* REVIEWED: GuiLabelButton(), avoid text cut
|
||||
* REVIEWED: GuiTextInputBox(), password input
|
||||
* REVIEWED: Local GetCodepointNext(), aligned with raylib
|
||||
* REDESIGNED: GuiSlider*()/GuiScrollBar() to support out-of-bounds
|
||||
*
|
||||
* 3.5 (20-Apr-2023) ADDED: GuiTabBar(), based on GuiToggle()
|
||||
* ADDED: Helper functions to split text in separate lines
|
||||
* ADDED: Multiple new icons, useful for code editing tools
|
||||
|
@ -137,6 +193,7 @@
|
|||
* REVIEWED: Library header info, more info, better organized
|
||||
* REDESIGNED: GuiTextBox() to support cursor movement
|
||||
* REDESIGNED: GuiDrawText() to divide drawing by lines
|
||||
*
|
||||
* 3.2 (22-May-2022) RENAMED: Some enum values, for unification, avoiding prefixes
|
||||
* REMOVED: GuiScrollBar(), only internal
|
||||
* REDESIGNED: GuiPanel() to support text parameter
|
||||
|
@ -146,6 +203,7 @@
|
|||
* REDESIGNED: GuiColorBarAlpha() to support text parameter
|
||||
* REDESIGNED: GuiColorBarHue() to support text parameter
|
||||
* REDESIGNED: GuiTextInputBox() to support password
|
||||
*
|
||||
* 3.1 (12-Jan-2022) REVIEWED: Default style for consistency (aligned with rGuiLayout v2.5 tool)
|
||||
* REVIEWED: GuiLoadStyle() to support compressed font atlas image data and unload previous textures
|
||||
* REVIEWED: External icons usage logic
|
||||
|
@ -153,10 +211,12 @@
|
|||
* RENAMED: Multiple controls properties definitions to prepend RAYGUI_
|
||||
* RENAMED: RICON_ references to RAYGUI_ICON_ for library consistency
|
||||
* Projects updated and multiple tweaks
|
||||
*
|
||||
* 3.0 (04-Nov-2021) Integrated ricons data to avoid external file
|
||||
* REDESIGNED: GuiTextBoxMulti()
|
||||
* REMOVED: GuiImageButton*()
|
||||
* Multiple minor tweaks and bugs corrected
|
||||
*
|
||||
* 2.9 (17-Mar-2021) REMOVED: Tooltip API
|
||||
* 2.8 (03-May-2020) Centralized rectangles drawing to GuiDrawRectangle()
|
||||
* 2.7 (20-Feb-2020) ADDED: Possible tooltips API
|
||||
|
@ -166,6 +226,7 @@
|
|||
* Replaced property INNER_PADDING by TEXT_PADDING, renamed some properties
|
||||
* ADDED: 8 new custom styles ready to use
|
||||
* Multiple minor tweaks and bugs corrected
|
||||
*
|
||||
* 2.5 (28-May-2019) Implemented extended GuiTextBox(), GuiValueBox(), GuiSpinner()
|
||||
* 2.3 (29-Apr-2019) ADDED: rIcons auxiliar library and support for it, multiple controls reviewed
|
||||
* Refactor all controls drawing mechanism to use control state
|
||||
|
@ -185,17 +246,43 @@
|
|||
* 0.8 (27-Aug-2015) Initial release. Implemented by Kevin Gato, Daniel Nicolás and Ramon Santamaria.
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
* raylib 4.5 Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
|
||||
* raylib 4.6-dev Inputs reading (keyboard/mouse), shapes drawing, font loading and text drawing
|
||||
*
|
||||
* STANDALONE MODE:
|
||||
* By default raygui depends on raylib mostly for the inputs and the drawing functionality but that dependency can be disabled
|
||||
* with the config flag RAYGUI_STANDALONE. In that case is up to the user to provide another backend to cover library needs.
|
||||
*
|
||||
* The following functions should be redefined for a custom backend:
|
||||
*
|
||||
* - Vector2 GetMousePosition(void);
|
||||
* - float GetMouseWheelMove(void);
|
||||
* - bool IsMouseButtonDown(int button);
|
||||
* - bool IsMouseButtonPressed(int button);
|
||||
* - bool IsMouseButtonReleased(int button);
|
||||
* - bool IsKeyDown(int key);
|
||||
* - bool IsKeyPressed(int key);
|
||||
* - int GetCharPressed(void); // -- GuiTextBox(), GuiValueBox()
|
||||
*
|
||||
* - void DrawRectangle(int x, int y, int width, int height, Color color); // -- GuiDrawRectangle()
|
||||
* - void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4); // -- GuiColorPicker()
|
||||
*
|
||||
* - Font GetFontDefault(void); // -- GuiLoadStyleDefault()
|
||||
* - Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // -- GuiLoadStyle()
|
||||
* - Texture2D LoadTextureFromImage(Image image); // -- GuiLoadStyle(), required to load texture from embedded font atlas image
|
||||
* - void SetShapesTexture(Texture2D tex, Rectangle rec); // -- GuiLoadStyle(), required to set shapes rec to font white rec (optimization)
|
||||
* - char *LoadFileText(const char *fileName); // -- GuiLoadStyle(), required to load charset data
|
||||
* - void UnloadFileText(char *text); // -- GuiLoadStyle(), required to unload charset data
|
||||
* - const char *GetDirectoryPath(const char *filePath); // -- GuiLoadStyle(), required to find charset/font file from text .rgs
|
||||
* - int *LoadCodepoints(const char *text, int *count); // -- GuiLoadStyle(), required to load required font codepoints list
|
||||
* - void UnloadCodepoints(int *codepoints); // -- GuiLoadStyle(), required to unload codepoints list
|
||||
* - unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // -- GuiLoadStyle()
|
||||
*
|
||||
* CONTRIBUTORS:
|
||||
* Ramon Santamaria: Supervision, review, redesign, update and maintenance
|
||||
* Vlad Adrian: Complete rewrite of GuiTextBox() to support extended features (2019)
|
||||
* Sergio Martinez: Review, testing (2015) and redesign of multiple controls (2018)
|
||||
* Adria Arranz: Testing and Implementation of additional controls (2018)
|
||||
* Jordi Jorba: Testing and Implementation of additional controls (2018)
|
||||
* Adria Arranz: Testing and implementation of additional controls (2018)
|
||||
* Jordi Jorba: Testing and implementation of additional controls (2018)
|
||||
* Albert Martos: Review and testing of the library (2015)
|
||||
* Ian Eito: Review and testing of the library (2015)
|
||||
* Kevin Gato: Initial implementation of basic components (2014)
|
||||
|
@ -236,24 +323,51 @@
|
|||
// NOTE: Some types are required for RAYGUI_STANDALONE usage
|
||||
//----------------------------------------------------------------------------------
|
||||
// Style property
|
||||
// NOTE: Used when exporting style as code for convenience
|
||||
typedef struct GuiStyleProp {
|
||||
unsigned short controlId;
|
||||
unsigned short propertyId;
|
||||
unsigned int propertyValue;
|
||||
unsigned short controlId; // Control identifier
|
||||
unsigned short propertyId; // Property identifier
|
||||
int propertyValue; // Property value
|
||||
} GuiStyleProp;
|
||||
/*
|
||||
// Controls text style -NOT USED-
|
||||
// NOTE: Text style is defined by control
|
||||
typedef struct GuiTextStyle {
|
||||
unsigned int size;
|
||||
int charSpacing;
|
||||
int lineSpacing;
|
||||
int alignmentH;
|
||||
int alignmentV;
|
||||
int padding;
|
||||
} GuiTextStyle;
|
||||
*/
|
||||
// Gui control state
|
||||
typedef enum {
|
||||
STATE_NORMAL = 0,
|
||||
STATE_FOCUSED,
|
||||
STATE_PRESSED,
|
||||
STATE_DISABLED,
|
||||
STATE_DISABLED
|
||||
} GuiState;
|
||||
// Gui control text alignment
|
||||
typedef enum {
|
||||
TEXT_ALIGN_LEFT = 0,
|
||||
TEXT_ALIGN_CENTER,
|
||||
TEXT_ALIGN_RIGHT,
|
||||
TEXT_ALIGN_RIGHT
|
||||
} GuiTextAlignment;
|
||||
// Gui control text alignment vertical
|
||||
// NOTE: Text vertical position inside the text bounds
|
||||
typedef enum {
|
||||
TEXT_ALIGN_TOP = 0,
|
||||
TEXT_ALIGN_MIDDLE,
|
||||
TEXT_ALIGN_BOTTOM
|
||||
} GuiTextAlignmentVertical;
|
||||
// Gui control text wrap mode
|
||||
// NOTE: Useful for multiline text
|
||||
typedef enum {
|
||||
TEXT_WRAP_NONE = 0,
|
||||
TEXT_WRAP_CHAR,
|
||||
TEXT_WRAP_WORD
|
||||
} GuiTextWrapMode;
|
||||
// Gui controls
|
||||
typedef enum {
|
||||
// Default -> populates to all controls when set
|
||||
|
@ -262,7 +376,7 @@ typedef enum {
|
|||
LABEL, // Used also for: LABELBUTTON
|
||||
BUTTON,
|
||||
TOGGLE, // Used also for: TOGGLEGROUP
|
||||
SLIDER, // Used also for: SLIDERBAR
|
||||
SLIDER, // Used also for: SLIDERBAR, TOGGLESLIDER
|
||||
PROGRESSBAR,
|
||||
CHECKBOX,
|
||||
COMBOBOX,
|
||||
|
@ -278,34 +392,50 @@ typedef enum {
|
|||
// Gui base properties for every control
|
||||
// NOTE: RAYGUI_MAX_PROPS_BASE properties (by default 16 properties)
|
||||
typedef enum {
|
||||
BORDER_COLOR_NORMAL = 0,
|
||||
BASE_COLOR_NORMAL,
|
||||
TEXT_COLOR_NORMAL,
|
||||
BORDER_COLOR_FOCUSED,
|
||||
BASE_COLOR_FOCUSED,
|
||||
TEXT_COLOR_FOCUSED,
|
||||
BORDER_COLOR_PRESSED,
|
||||
BASE_COLOR_PRESSED,
|
||||
TEXT_COLOR_PRESSED,
|
||||
BORDER_COLOR_DISABLED,
|
||||
BASE_COLOR_DISABLED,
|
||||
TEXT_COLOR_DISABLED,
|
||||
BORDER_WIDTH,
|
||||
TEXT_PADDING,
|
||||
TEXT_ALIGNMENT,
|
||||
RESERVED
|
||||
BORDER_COLOR_NORMAL = 0, // Control border color in STATE_NORMAL
|
||||
BASE_COLOR_NORMAL, // Control base color in STATE_NORMAL
|
||||
TEXT_COLOR_NORMAL, // Control text color in STATE_NORMAL
|
||||
BORDER_COLOR_FOCUSED, // Control border color in STATE_FOCUSED
|
||||
BASE_COLOR_FOCUSED, // Control base color in STATE_FOCUSED
|
||||
TEXT_COLOR_FOCUSED, // Control text color in STATE_FOCUSED
|
||||
BORDER_COLOR_PRESSED, // Control border color in STATE_PRESSED
|
||||
BASE_COLOR_PRESSED, // Control base color in STATE_PRESSED
|
||||
TEXT_COLOR_PRESSED, // Control text color in STATE_PRESSED
|
||||
BORDER_COLOR_DISABLED, // Control border color in STATE_DISABLED
|
||||
BASE_COLOR_DISABLED, // Control base color in STATE_DISABLED
|
||||
TEXT_COLOR_DISABLED, // Control text color in STATE_DISABLED
|
||||
BORDER_WIDTH, // Control border size, 0 for no border
|
||||
//TEXT_SIZE, // Control text size (glyphs max height) -> GLOBAL for all controls
|
||||
//TEXT_SPACING, // Control text spacing between glyphs -> GLOBAL for all controls
|
||||
//TEXT_LINE_SPACING // Control text spacing between lines -> GLOBAL for all controls
|
||||
TEXT_PADDING, // Control text padding, not considering border
|
||||
TEXT_ALIGNMENT, // Control text horizontal alignment inside control text bound (after border and padding)
|
||||
//TEXT_WRAP_MODE // Control text wrap-mode inside text bounds -> GLOBAL for all controls
|
||||
} GuiControlProperty;
|
||||
// TODO: Which text styling properties should be global or per-control?
|
||||
// At this moment TEXT_PADDING and TEXT_ALIGNMENT is configured and saved per control while
|
||||
// TEXT_SIZE, TEXT_SPACING, TEXT_LINE_SPACING, TEXT_ALIGNMENT_VERTICAL, TEXT_WRAP_MODE are global and
|
||||
// should be configured by user as needed while defining the UI layout
|
||||
// Gui extended properties depend on control
|
||||
// NOTE: RAYGUI_MAX_PROPS_EXTENDED properties (by default 8 properties)
|
||||
// NOTE: RAYGUI_MAX_PROPS_EXTENDED properties (by default, max 8 properties)
|
||||
//----------------------------------------------------------------------------------
|
||||
// DEFAULT extended properties
|
||||
// NOTE: Those properties are common to all controls or global
|
||||
// WARNING: We only have 8 slots for those properties by default!!! -> New global control: TEXT?
|
||||
typedef enum {
|
||||
TEXT_SIZE = 16, // Text size (glyphs max height)
|
||||
TEXT_SPACING, // Text spacing between glyphs
|
||||
LINE_COLOR, // Line control color
|
||||
BACKGROUND_COLOR, // Background color
|
||||
TEXT_LINE_SPACING, // Text spacing between lines
|
||||
TEXT_ALIGNMENT_VERTICAL, // Text vertical alignment inside text bounds (after border and padding)
|
||||
TEXT_WRAP_MODE // Text wrap-mode inside text bounds
|
||||
//TEXT_DECORATION // Text decoration: 0-None, 1-Underline, 2-Line-through, 3-Overline
|
||||
//TEXT_DECORATION_THICK // Text decoration line thikness
|
||||
} GuiDefaultProperty;
|
||||
// Other possible text properties:
|
||||
// TEXT_WEIGHT // Normal, Italic, Bold -> Requires specific font change
|
||||
// TEXT_INDENT // Text indentation -> Now using TEXT_PADDING...
|
||||
// Label
|
||||
//typedef enum { } GuiLabelProperty;
|
||||
// Button/Spinner
|
||||
|
@ -325,12 +455,12 @@ typedef enum {
|
|||
} GuiProgressBarProperty;
|
||||
// ScrollBar
|
||||
typedef enum {
|
||||
ARROWS_SIZE = 16,
|
||||
ARROWS_VISIBLE,
|
||||
SCROLL_SLIDER_PADDING, // (SLIDERBAR, SLIDER_PADDING)
|
||||
SCROLL_SLIDER_SIZE,
|
||||
SCROLL_PADDING,
|
||||
SCROLL_SPEED,
|
||||
ARROWS_SIZE = 16, // ScrollBar arrows size
|
||||
ARROWS_VISIBLE, // ScrollBar arrows visible
|
||||
SCROLL_SLIDER_PADDING, // ScrollBar slider internal padding
|
||||
SCROLL_SLIDER_SIZE, // ScrollBar slider size
|
||||
SCROLL_PADDING, // ScrollBar scroll padding from arrows
|
||||
SCROLL_SPEED, // ScrollBar scrolling speed
|
||||
} GuiScrollBarProperty;
|
||||
// CheckBox
|
||||
typedef enum {
|
||||
|
@ -348,11 +478,7 @@ typedef enum {
|
|||
} GuiDropdownBoxProperty;
|
||||
// TextBox/TextBoxMulti/ValueBox/Spinner
|
||||
typedef enum {
|
||||
TEXT_INNER_PADDING = 16, // TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
|
||||
TEXT_LINES_SPACING, // TextBoxMulti lines separation
|
||||
TEXT_ALIGNMENT_VERTICAL, // TextBoxMulti vertical alignment: 0-CENTERED, 1-UP, 2-DOWN
|
||||
TEXT_MULTILINE, // TextBox supports multiple lines
|
||||
TEXT_WRAP_MODE // TextBox wrap mode for multiline: 0-NO_WRAP, 1-CHAR_WRAP, 2-WORD_WRAP
|
||||
TEXT_READONLY = 16, // TextBox in read-only mode: 0-text editable, 1-text no-editable
|
||||
} GuiTextBoxProperty;
|
||||
// Spinner
|
||||
typedef enum {
|
||||
|
@ -364,7 +490,7 @@ typedef enum {
|
|||
LIST_ITEMS_HEIGHT = 16, // ListView items height
|
||||
LIST_ITEMS_SPACING, // ListView items separation
|
||||
SCROLLBAR_WIDTH, // ListView scrollbar size (usually width)
|
||||
SCROLLBAR_SIDE, // ListView scrollbar side (0-left, 1-right)
|
||||
SCROLLBAR_SIDE, // ListView scrollbar side (0-SCROLLBAR_LEFT_SIDE, 1-SCROLLBAR_RIGHT_SIDE)
|
||||
} GuiListViewProperty;
|
||||
// ColorPicker
|
||||
typedef enum {
|
||||
|
@ -387,7 +513,7 @@ typedef enum {
|
|||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLock(void); // Lock gui controls (global state)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiUnlock(void); // Unlock gui controls (global state)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiIsLocked(void); // Check if gui is locked (global state)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiFade(float alpha); // Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetAlpha(float alpha); // Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetState(int state); // Set gui state (global state)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGetState(void); // Get gui state (global state)
|
||||
// Font set/get functions
|
||||
|
@ -396,40 +522,6 @@ typedef enum {
|
|||
// Style set/get functions
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiSetStyle(int control, int property, int value); // Set one style property
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGetStyle(int control, int property); // Get one style property
|
||||
// Container/separator controls, useful for controls organization
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiWindowBox(Rectangle bounds, const char *title); // Window Box control, shows a window that can be closed
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiGroupBox(Rectangle bounds, const char *text); // Group Box control with text name
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLine(Rectangle bounds, const char *text); // Line separator control, could contain text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiPanel(Rectangle bounds, const char *text); // Panel control, useful to group controls
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active); // Tab Bar control, returns TAB to be closed or -1
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ Rectangle GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll); // Scroll Panel control
|
||||
// Basic controls set
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLabel(Rectangle bounds, const char *text); // Label control, shows text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiLabelButton(Rectangle bounds, const char *text); // Label button control, show true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiToggle(Rectangle bounds, const char *text, bool active); // Toggle Button control, returns true when active
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleGroup(Rectangle bounds, const char *text, int active); // Toggle Group control, returns active toggle index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiCheckBox(Rectangle bounds, const char *text, bool checked); // Check Box control, returns true when active
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiComboBox(Rectangle bounds, const char *text, int active); // Combo Box control, returns selected item index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control, returns selected item
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Value Box control, updates input text with numbers
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Slider control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Slider Bar control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Progress Bar control, shows current progress value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiStatusBar(Rectangle bounds, const char *text); // Status Bar control, shows info text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDummyRec(Rectangle bounds, const char *text); // Dummy control for placeholders
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ Vector2 GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs); // Grid control, returns mouse cell position
|
||||
// Advance controls set
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int active); // List View control, returns selected list item index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active); // List View with extended parameters
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, int *secretViewActive); // Text Input Box control, ask for text, supports secret
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ Color GuiColorPicker(Rectangle bounds, const char *text, Color color); // Color Picker control (multiple color controls)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ Color GuiColorPanel(Rectangle bounds, const char *text, Color color); // Color Panel control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiColorBarAlpha(Rectangle bounds, const char *text, float alpha); // Color Bar Alpha control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ float GuiColorBarHue(Rectangle bounds, const char *text, float value); // Color Bar Hue control
|
||||
// Styles loading functions
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLoadStyle(const char *fileName); // Load style file over global style variable (.rgs)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiLoadStyleDefault(void); // Load style default over global style
|
||||
|
@ -443,6 +535,46 @@ typedef enum {
|
|||
/* Functions defined as 'extern' by default (implicit specifiers)*/ unsigned int *GuiGetIcons(void); // Get raygui icons data pointer
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ char **GuiLoadIcons(const char *fileName, bool loadIconsName); // Load raygui icons file (.rgi) into internal icons data
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color); // Draw icon using pixel size at specified position
|
||||
// Controls
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
// Container/separator controls, useful for controls organization
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiWindowBox(Rectangle bounds, const char *title); // Window Box control, shows a window that can be closed
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGroupBox(Rectangle bounds, const char *text); // Group Box control with text name
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLine(Rectangle bounds, const char *text); // Line separator control, could contain text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiPanel(Rectangle bounds, const char *text); // Panel control, useful to group controls
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTabBar(Rectangle bounds, const char **text, int count, int *active); // Tab Bar control, returns TAB to be closed or -1
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll, Rectangle *view); // Scroll Panel control
|
||||
// Basic controls set
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabel(Rectangle bounds, const char *text); // Label control, shows text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiButton(Rectangle bounds, const char *text); // Button control, returns true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiLabelButton(Rectangle bounds, const char *text); // Label button control, show true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggle(Rectangle bounds, const char *text, bool *active); // Toggle Button control, returns true when active
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleGroup(Rectangle bounds, const char *text, int *active); // Toggle Group control, returns active toggle index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiToggleSlider(Rectangle bounds, const char *text, int *active); // Toggle Slider control, returns true when clicked
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiCheckBox(Rectangle bounds, const char *text, bool *checked); // Check Box control, returns true when active
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiComboBox(Rectangle bounds, const char *text, int *active); // Combo Box control, returns selected item index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode); // Dropdown Box control, returns selected item
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Spinner control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode); // Value Box control, updates input text with numbers
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode); // Text Box control, updates input text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Slider Bar control, returns selected value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float *value, float minValue, float maxValue); // Progress Bar control, shows current progress value
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiStatusBar(Rectangle bounds, const char *text); // Status Bar control, shows info text
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiDummyRec(Rectangle bounds, const char *text); // Dummy control for placeholders
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs, Vector2 *mouseCell); // Grid control, returns mouse cell position
|
||||
// Advance controls set
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int *active); // List View control, returns selected list item index
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *scrollIndex, int *active, int *focus); // List View with extended parameters
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, bool *secretViewActive); // Text Input Box control, ask for text, supports secret
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPicker(Rectangle bounds, const char *text, Color *color); // Color Picker control (multiple color controls)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPanel(Rectangle bounds, const char *text, Color *color); // Color Panel control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorBarAlpha(Rectangle bounds, const char *text, float *alpha); // Color Bar Alpha control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorBarHue(Rectangle bounds, const char *text, float *value); // Color Bar Hue control
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPickerHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Picker control that avoids conversion to RGB on each call (multiple color controls)
|
||||
/* Functions defined as 'extern' by default (implicit specifiers)*/ int GuiColorPanelHSV(Rectangle bounds, const char *text, Vector3 *colorHsv); // Color Panel control that returns HSV color value, used by GuiColorPickerHSV()
|
||||
//----------------------------------------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------
|
||||
// Icons enumeration
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -666,7 +798,7 @@ typedef enum {
|
|||
ICON_REG_EXP = 216,
|
||||
ICON_FOLDER = 217,
|
||||
ICON_FILE = 218,
|
||||
ICON_219 = 219,
|
||||
ICON_SAND_TIMER = 219,
|
||||
ICON_220 = 220,
|
||||
ICON_221 = 221,
|
||||
ICON_222 = 222,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**********************************************************************************************
|
||||
*
|
||||
* raylib v4.5 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
* raylib v5.0 - A simple and easy-to-use library to enjoy videogames programming (www.raylib.com)
|
||||
*
|
||||
* FEATURES:
|
||||
* - NO external dependencies, all required libraries included with raylib
|
||||
|
@ -84,6 +84,10 @@
|
|||
// NOTE: Require recompiling raylib sources
|
||||
// NOTE: MSVC C++ compiler does not support compound literals (C99 feature)
|
||||
// Plain structures in C++ (without constructors) can be initialized with { }
|
||||
// This is called aggregate initialization (C++11 feature)
|
||||
// Some compilers (mostly macos clang) default to C++98,
|
||||
// where aggregate initialization can't be used
|
||||
// So, give a more clear error stating how to fix this
|
||||
// NOTE: We set some defines with some data types declared by raylib
|
||||
// Other modules (raymath, rlgl) also require some of those types, so,
|
||||
// to be able to use those other modules as standalone (not depending on raylib)
|
||||
|
@ -273,6 +277,7 @@ typedef struct ModelAnimation {
|
|||
int frameCount; // Number of animation frames
|
||||
BoneInfo *bones; // Bones information (skeleton)
|
||||
Transform **framePoses; // Poses array by frame
|
||||
char name[32]; // Animation name
|
||||
} ModelAnimation;
|
||||
// Ray, ray for raycasting
|
||||
typedef struct Ray {
|
||||
|
@ -354,6 +359,18 @@ typedef struct FilePathList {
|
|||
unsigned int count; // Filepaths entries count
|
||||
char **paths; // Filepaths entries
|
||||
} FilePathList;
|
||||
// Automation event
|
||||
typedef struct AutomationEvent {
|
||||
unsigned int frame; // Event frame
|
||||
unsigned int type; // Event type (AutomationEventType)
|
||||
int params[4]; // Event parameters (if required)
|
||||
} AutomationEvent;
|
||||
// Automation event list
|
||||
typedef struct AutomationEventList {
|
||||
unsigned int capacity; // Events max entries (MAX_AUTOMATION_EVENTS)
|
||||
unsigned int count; // Events entries count
|
||||
AutomationEvent *events; // Events entries
|
||||
} AutomationEventList;
|
||||
//----------------------------------------------------------------------------------
|
||||
// Enumerators Definition
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -374,6 +391,7 @@ typedef enum {
|
|||
FLAG_WINDOW_TRANSPARENT = 0x00000010, // Set to allow transparent framebuffer
|
||||
FLAG_WINDOW_HIGHDPI = 0x00002000, // Set to support HighDPI
|
||||
FLAG_WINDOW_MOUSE_PASSTHROUGH = 0x00004000, // Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
|
||||
FLAG_BORDERLESS_WINDOWED_MODE = 0x00008000, // Set to run program in borderless windowed mode
|
||||
FLAG_MSAA_4X_HINT = 0x00000020, // Set to try enabling MSAA 4X
|
||||
FLAG_INTERLACED_HINT = 0x00010000 // Set to try enabling interlaced video format (for V3D)
|
||||
} ConfigFlags;
|
||||
|
@ -638,6 +656,9 @@ typedef enum {
|
|||
PIXELFORMAT_UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
|
||||
PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
|
||||
PIXELFORMAT_UNCOMPRESSED_R16, // 16 bpp (1 channel - half float)
|
||||
PIXELFORMAT_UNCOMPRESSED_R16G16B16, // 16*3 bpp (3 channels - half float)
|
||||
PIXELFORMAT_UNCOMPRESSED_R16G16B16A16, // 16*4 bpp (4 channels - half float)
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
|
||||
PIXELFORMAT_COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
|
||||
PIXELFORMAT_COMPRESSED_DXT3_RGBA, // 8 bpp
|
||||
|
@ -731,8 +752,8 @@ typedef enum {
|
|||
// Callbacks to hook some internal functions
|
||||
// WARNING: These callbacks are intended for advance users
|
||||
typedef void (*TraceLogCallback)(int logLevel, const char *text, void * args); // Logging: Redirect trace log messages
|
||||
typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, unsigned int *bytesRead); // FileIO: Load binary data
|
||||
typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, unsigned int bytesToWrite); // FileIO: Save binary data
|
||||
typedef unsigned char *(*LoadFileDataCallback)(const char *fileName, int *dataSize); // FileIO: Load binary data
|
||||
typedef bool (*SaveFileDataCallback)(const char *fileName, void *data, int dataSize); // FileIO: Save binary data
|
||||
typedef char *(*LoadFileTextCallback)(const char *fileName); // FileIO: Load text data
|
||||
typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileIO: Save text data
|
||||
//------------------------------------------------------------------------------------
|
||||
|
@ -744,8 +765,8 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
//------------------------------------------------------------------------------------
|
||||
// Window-related functions
|
||||
void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context
|
||||
bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed
|
||||
void CloseWindow(void); // Close window and unload OpenGL context
|
||||
bool WindowShouldClose(void); // Check if application should close (KEY_ESCAPE pressed or windows close icon clicked)
|
||||
bool IsWindowReady(void); // Check if window has been initialized successfully
|
||||
bool IsWindowFullscreen(void); // Check if window is currently fullscreen
|
||||
bool IsWindowHidden(void); // Check if window is currently hidden (only PLATFORM_DESKTOP)
|
||||
|
@ -757,17 +778,20 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void SetWindowState(unsigned int flags); // Set window configuration state using flags (only PLATFORM_DESKTOP)
|
||||
void ClearWindowState(unsigned int flags); // Clear window configuration state flags
|
||||
void ToggleFullscreen(void); // Toggle window state: fullscreen/windowed (only PLATFORM_DESKTOP)
|
||||
void ToggleBorderlessWindowed(void); // Toggle window state: borderless windowed (only PLATFORM_DESKTOP)
|
||||
void MaximizeWindow(void); // Set window state: maximized, if resizable (only PLATFORM_DESKTOP)
|
||||
void MinimizeWindow(void); // Set window state: minimized, if resizable (only PLATFORM_DESKTOP)
|
||||
void RestoreWindow(void); // Set window state: not minimized/maximized (only PLATFORM_DESKTOP)
|
||||
void SetWindowIcon(Image image); // Set icon for window (single image, RGBA 32bit, only PLATFORM_DESKTOP)
|
||||
void SetWindowIcons(Image *images, int count); // Set icon for window (multiple images, RGBA 32bit, only PLATFORM_DESKTOP)
|
||||
void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP)
|
||||
void SetWindowTitle(const char *title); // Set title for window (only PLATFORM_DESKTOP and PLATFORM_WEB)
|
||||
void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP)
|
||||
void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode)
|
||||
void SetWindowMonitor(int monitor); // Set monitor for the current window
|
||||
void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE)
|
||||
void SetWindowMaxSize(int width, int height); // Set window maximum dimensions (for FLAG_WINDOW_RESIZABLE)
|
||||
void SetWindowSize(int width, int height); // Set window dimensions
|
||||
void SetWindowOpacity(float opacity); // Set window opacity [0.0f..1.0f] (only PLATFORM_DESKTOP)
|
||||
void SetWindowFocused(void); // Set window focused (only PLATFORM_DESKTOP)
|
||||
void *GetWindowHandle(void); // Get native window handle
|
||||
int GetScreenWidth(void); // Get current screen width
|
||||
int GetScreenHeight(void); // Get current screen height
|
||||
|
@ -783,18 +807,11 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
int GetMonitorRefreshRate(int monitor); // Get specified monitor refresh rate
|
||||
Vector2 GetWindowPosition(void); // Get window position XY on monitor
|
||||
Vector2 GetWindowScaleDPI(void); // Get window scale DPI factor
|
||||
const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the primary monitor
|
||||
const char *GetMonitorName(int monitor); // Get the human-readable, UTF-8 encoded name of the specified monitor
|
||||
void SetClipboardText(const char *text); // Set clipboard text content
|
||||
const char *GetClipboardText(void); // Get clipboard text content
|
||||
void EnableEventWaiting(void); // Enable waiting for events on EndDrawing(), no automatic event polling
|
||||
void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
|
||||
// Custom frame control functions
|
||||
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
||||
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
||||
void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
||||
void PollInputEvents(void); // Register all input events
|
||||
void WaitTime(double seconds); // Wait for some time (halt program execution)
|
||||
// Cursor-related functions
|
||||
void ShowCursor(void); // Shows cursor
|
||||
void HideCursor(void); // Hides cursor
|
||||
|
@ -845,20 +862,32 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
|
||||
// Timing-related functions
|
||||
void SetTargetFPS(int fps); // Set target FPS (maximum)
|
||||
int GetFPS(void); // Get current FPS
|
||||
float GetFrameTime(void); // Get time in seconds for last frame drawn (delta time)
|
||||
double GetTime(void); // Get elapsed time in seconds since InitWindow()
|
||||
// Misc. functions
|
||||
int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
|
||||
int GetFPS(void); // Get current FPS
|
||||
// Custom frame control functions
|
||||
// NOTE: Those functions are intended for advance users that want full control over the frame processing
|
||||
// By default EndDrawing() does this job: draws everything + SwapScreenBuffer() + manage frame timing + PollInputEvents()
|
||||
// To avoid that behaviour and control frame processes manually, enable in config.h: SUPPORT_CUSTOM_FRAME_CONTROL
|
||||
void SwapScreenBuffer(void); // Swap back buffer with front buffer (screen drawing)
|
||||
void PollInputEvents(void); // Register all input events
|
||||
void WaitTime(double seconds); // Wait for some time (halt program execution)
|
||||
// Random values generation functions
|
||||
void SetRandomSeed(unsigned int seed); // Set the seed for the random number generator
|
||||
int GetRandomValue(int min, int max); // Get a random value between min and max (both included)
|
||||
int *LoadRandomSequence(unsigned int count, int min, int max); // Load random values sequence, no values repeated
|
||||
void UnloadRandomSequence(int *sequence); // Unload random values sequence
|
||||
// Misc. functions
|
||||
void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
|
||||
void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
|
||||
void OpenURL(const char *url); // Open URL with default system browser (if available)
|
||||
// NOTE: Following functions implemented in module [utils]
|
||||
//------------------------------------------------------------------
|
||||
void TraceLog(int logLevel, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR...)
|
||||
void SetTraceLogLevel(int logLevel); // Set the current threshold (minimum) log level
|
||||
void *MemAlloc(unsigned int size); // Internal memory allocator
|
||||
void *MemRealloc(void *ptr, unsigned int size); // Internal memory reallocator
|
||||
void MemFree(void *ptr); // Internal memory free
|
||||
void OpenURL(const char *url); // Open URL with default system browser (if available)
|
||||
// Set custom callbacks
|
||||
// WARNING: Callbacks setup is intended for advance users
|
||||
void SetTraceLogCallback(TraceLogCallback callback); // Set custom trace log
|
||||
|
@ -867,13 +896,15 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void SetLoadFileTextCallback(LoadFileTextCallback callback); // Set custom file text data loader
|
||||
void SetSaveFileTextCallback(SaveFileTextCallback callback); // Set custom file text data saver
|
||||
// Files management functions
|
||||
unsigned char *LoadFileData(const char *fileName, unsigned int *bytesRead); // Load file data as byte array (read)
|
||||
unsigned char *LoadFileData(const char *fileName, int *dataSize); // Load file data as byte array (read)
|
||||
void UnloadFileData(unsigned char *data); // Unload file data allocated by LoadFileData()
|
||||
bool SaveFileData(const char *fileName, void *data, unsigned int bytesToWrite); // Save data to file from byte array (write), returns true on success
|
||||
bool ExportDataAsCode(const unsigned char *data, unsigned int size, const char *fileName); // Export data to code (.h), returns true on success
|
||||
bool SaveFileData(const char *fileName, void *data, int dataSize); // Save data to file from byte array (write), returns true on success
|
||||
bool ExportDataAsCode(const unsigned char *data, int dataSize, const char *fileName); // Export data to code (.h), returns true on success
|
||||
char *LoadFileText(const char *fileName); // Load text data from file (read), returns a '\0' terminated string
|
||||
void UnloadFileText(char *text); // Unload file text data allocated by LoadFileText()
|
||||
bool SaveFileText(const char *fileName, char *text); // Save text data to file (write), string must be '\0' terminated, returns true on success
|
||||
//------------------------------------------------------------------
|
||||
// File system functions
|
||||
bool FileExists(const char *fileName); // Check if file exists
|
||||
bool DirectoryExists(const char *dirPath); // Check if a directory path exists
|
||||
bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (including point: .png, .wav)
|
||||
|
@ -884,7 +915,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
const char *GetDirectoryPath(const char *filePath); // Get full path for a given fileName with path (uses static string)
|
||||
const char *GetPrevDirectoryPath(const char *dirPath); // Get previous directory path for a given path (uses static string)
|
||||
const char *GetWorkingDirectory(void); // Get current working directory (uses static string)
|
||||
const char *GetApplicationDirectory(void); // Get the directory if the running application (uses static string)
|
||||
const char *GetApplicationDirectory(void); // Get the directory of the running application (uses static string)
|
||||
bool ChangeDirectory(const char *dir); // Change working directory, return true on success
|
||||
bool IsPathFile(const char *path); // Check if a given path is a file or a directory
|
||||
FilePathList LoadDirectoryFiles(const char *dirPath); // Load directory filepaths
|
||||
|
@ -899,17 +930,27 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
unsigned char *DecompressData(const unsigned char *compData, int compDataSize, int *dataSize); // Decompress data (DEFLATE algorithm), memory must be MemFree()
|
||||
char *EncodeDataBase64(const unsigned char *data, int dataSize, int *outputSize); // Encode data to Base64 string, memory must be MemFree()
|
||||
unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize); // Decode Base64 string data, memory must be MemFree()
|
||||
// Automation events functionality
|
||||
AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
|
||||
void UnloadAutomationEventList(AutomationEventList *list); // Unload automation events list from file
|
||||
bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
|
||||
void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
|
||||
void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording
|
||||
void StartAutomationEventRecording(void); // Start recording automation events (AutomationEventList must be set)
|
||||
void StopAutomationEventRecording(void); // Stop recording automation events
|
||||
void PlayAutomationEvent(AutomationEvent event); // Play a recorded automation event
|
||||
//------------------------------------------------------------------------------------
|
||||
// Input Handling Functions (Module: core)
|
||||
//------------------------------------------------------------------------------------
|
||||
// Input-related functions: keyboard
|
||||
bool IsKeyPressed(int key); // Check if a key has been pressed once
|
||||
bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again (Only PLATFORM_DESKTOP)
|
||||
bool IsKeyDown(int key); // Check if a key is being pressed
|
||||
bool IsKeyReleased(int key); // Check if a key has been released once
|
||||
bool IsKeyUp(int key); // Check if a key is NOT being pressed
|
||||
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
|
||||
int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty
|
||||
int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty
|
||||
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
|
||||
// Input-related functions: gamepads
|
||||
bool IsGamepadAvailable(int gamepad); // Check if a gamepad is available
|
||||
const char *GetGamepadName(int gamepad); // Get gamepad internal name id
|
||||
|
@ -946,7 +987,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Gestures and Touch Handling Functions (Module: rgestures)
|
||||
//------------------------------------------------------------------------------------
|
||||
void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
|
||||
bool IsGestureDetected(int gesture); // Check if a gesture have been detected
|
||||
bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected
|
||||
int GetGestureDetected(void); // Get latest detected gesture
|
||||
float GetGestureHoldDuration(void); // Get gesture hold time in milliseconds
|
||||
Vector2 GetGestureDragVector(void); // Get gesture drag vector
|
||||
|
@ -969,18 +1010,17 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawPixel(int posX, int posY, Color color); // Draw a pixel
|
||||
void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version)
|
||||
void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line
|
||||
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version)
|
||||
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness
|
||||
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out
|
||||
void DrawLineBezierQuad(Vector2 startPos, Vector2 endPos, Vector2 controlPos, float thick, Color color); // Draw line using quadratic bezier curves with a control point
|
||||
void DrawLineBezierCubic(Vector2 startPos, Vector2 endPos, Vector2 startControlPos, Vector2 endControlPos, float thick, Color color); // Draw line using cubic bezier curves with 2 control points
|
||||
void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence
|
||||
void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (using gl lines)
|
||||
void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line (using triangles/quads)
|
||||
void DrawLineStrip(Vector2 *points, int pointCount, Color color); // Draw lines sequence (using gl lines)
|
||||
void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw line segment cubic-bezier in-out interpolation
|
||||
void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle
|
||||
void DrawCircleSector(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw a piece of a circle
|
||||
void DrawCircleSectorLines(Vector2 center, float radius, float startAngle, float endAngle, int segments, Color color); // Draw circle sector outline
|
||||
void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle
|
||||
void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version)
|
||||
void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline
|
||||
void DrawCircleLinesV(Vector2 center, float radius, Color color); // Draw circle outline (Vector version)
|
||||
void DrawEllipse(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse
|
||||
void DrawEllipseLines(int centerX, int centerY, float radiusH, float radiusV, Color color); // Draw ellipse outline
|
||||
void DrawRing(Vector2 center, float innerRadius, float outerRadius, float startAngle, float endAngle, int segments, Color color); // Draw ring
|
||||
|
@ -1003,6 +1043,23 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
|
||||
void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
|
||||
void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
|
||||
// Splines drawing functions
|
||||
void DrawSplineLinear(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Linear, minimum 2 points
|
||||
void DrawSplineBasis(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: B-Spline, minimum 4 points
|
||||
void DrawSplineCatmullRom(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Catmull-Rom, minimum 4 points
|
||||
void DrawSplineBezierQuadratic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Quadratic Bezier, minimum 3 points (1 control point): [p1, c2, p3, c4...]
|
||||
void DrawSplineBezierCubic(Vector2 *points, int pointCount, float thick, Color color); // Draw spline: Cubic Bezier, minimum 4 points (2 control points): [p1, c2, c3, p4, c5, c6...]
|
||||
void DrawSplineSegmentLinear(Vector2 p1, Vector2 p2, float thick, Color color); // Draw spline segment: Linear, 2 points
|
||||
void DrawSplineSegmentBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: B-Spline, 4 points
|
||||
void DrawSplineSegmentCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float thick, Color color); // Draw spline segment: Catmull-Rom, 4 points
|
||||
void DrawSplineSegmentBezierQuadratic(Vector2 p1, Vector2 c2, Vector2 p3, float thick, Color color); // Draw spline segment: Quadratic Bezier, 2 points, 1 control point
|
||||
void DrawSplineSegmentBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float thick, Color color); // Draw spline segment: Cubic Bezier, 2 points, 2 control points
|
||||
// Spline segment point evaluation functions, for a given t [0.0f .. 1.0f]
|
||||
Vector2 GetSplinePointLinear(Vector2 startPos, Vector2 endPos, float t); // Get (evaluate) spline point: Linear
|
||||
Vector2 GetSplinePointBasis(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t); // Get (evaluate) spline point: B-Spline
|
||||
Vector2 GetSplinePointCatmullRom(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, float t); // Get (evaluate) spline point: Catmull-Rom
|
||||
Vector2 GetSplinePointBezierQuad(Vector2 p1, Vector2 c2, Vector2 p3, float t); // Get (evaluate) spline point: Quadratic Bezier
|
||||
Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vector2 p4, float t); // Get (evaluate) spline point: Cubic Bezier
|
||||
// Basic shapes collision detection functions
|
||||
bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
|
||||
bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
|
||||
|
@ -1021,6 +1078,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// NOTE: These functions do not require GPU access
|
||||
Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM)
|
||||
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data
|
||||
Image LoadImageSvg(const char *fileNameOrString, int width, int height); // Load image from SVG file data or string with specified size
|
||||
Image LoadImageAnim(const char *fileName, int *frames); // Load image sequence from file (frames appended to image.data)
|
||||
Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
|
||||
Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
|
||||
|
@ -1028,12 +1086,13 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
bool IsImageReady(Image image); // Check if an image is ready
|
||||
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
|
||||
bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
|
||||
unsigned char *ExportImageToMemory(Image image, const char *fileType, int *fileSize); // Export image to memory buffer
|
||||
bool ExportImageAsCode(Image image, const char *fileName); // Export image as code file defining an array of bytes, returns true on success
|
||||
// Image generation functions
|
||||
Image GenImageColor(int width, int height, Color color); // Generate image: plain color
|
||||
Image GenImageGradientV(int width, int height, Color top, Color bottom); // Generate image: vertical gradient
|
||||
Image GenImageGradientH(int width, int height, Color left, Color right); // Generate image: horizontal gradient
|
||||
Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end); // Generate image: linear gradient, direction in degrees [0..360], 0=Vertical gradient
|
||||
Image GenImageGradientRadial(int width, int height, float density, Color inner, Color outer); // Generate image: radial gradient
|
||||
Image GenImageGradientSquare(int width, int height, float density, Color inner, Color outer); // Generate image: square gradient
|
||||
Image GenImageChecked(int width, int height, int checksX, int checksY, Color col1, Color col2); // Generate image: checked
|
||||
Image GenImageWhiteNoise(int width, int height, float factor); // Generate image: white noise
|
||||
Image GenImagePerlinNoise(int width, int height, int offsetX, int offsetY, float scale); // Generate image: perlin noise
|
||||
|
@ -1059,6 +1118,7 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void ImageDither(Image *image, int rBpp, int gBpp, int bBpp, int aBpp); // Dither image data to 16bpp or lower (Floyd-Steinberg dithering)
|
||||
void ImageFlipVertical(Image *image); // Flip image vertically
|
||||
void ImageFlipHorizontal(Image *image); // Flip image horizontally
|
||||
void ImageRotate(Image *image, int degrees); // Rotate image by input angle in degrees (-359 to 359)
|
||||
void ImageRotateCW(Image *image); // Rotate image clockwise 90deg
|
||||
void ImageRotateCCW(Image *image); // Rotate image counter-clockwise 90deg
|
||||
void ImageColorTint(Image *image, Color color); // Modify image color: tint
|
||||
|
@ -1136,13 +1196,13 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
// Font loading/unloading functions
|
||||
Font GetFontDefault(void); // Get the default Font
|
||||
Font LoadFont(const char *fileName); // Load font from file into GPU memory (VRAM)
|
||||
Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount); // Load font from file with extended parameters, use NULL for fontChars and 0 for glyphCount to load the default character set
|
||||
Font LoadFontEx(const char *fileName, int fontSize, int *codepoints, int codepointCount); // Load font from file with extended parameters, use NULL for codepoints and 0 for codepointCount to load the default character set
|
||||
Font LoadFontFromImage(Image image, Color key, int firstChar); // Load font from Image (XNA style)
|
||||
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
Font LoadFontFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount); // Load font from memory buffer, fileType refers to extension: i.e. '.ttf'
|
||||
bool IsFontReady(Font font); // Check if a font is ready
|
||||
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *fontChars, int glyphCount, int type); // Load font data for further use
|
||||
Image GenImageFontAtlas(const GlyphInfo *chars, Rectangle **recs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
void UnloadFontData(GlyphInfo *chars, int glyphCount); // Unload font chars info data (RAM)
|
||||
GlyphInfo *LoadFontData(const unsigned char *fileData, int dataSize, int fontSize, int *codepoints, int codepointCount, int type); // Load font data for further use
|
||||
Image GenImageFontAtlas(const GlyphInfo *glyphs, Rectangle **glyphRecs, int glyphCount, int fontSize, int padding, int packMethod); // Generate image font atlas using chars info
|
||||
void UnloadFontData(GlyphInfo *glyphs, int glyphCount); // Unload font chars info data (RAM)
|
||||
void UnloadFont(Font font); // Unload font from GPU memory (VRAM)
|
||||
bool ExportFontAsCode(Font font, const char *fileName); // Export font as code file, returns true on success
|
||||
// Text drawing functions
|
||||
|
@ -1151,8 +1211,9 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
|
||||
void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
|
||||
void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
|
||||
void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
|
||||
void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
|
||||
// Text font info functions
|
||||
void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks
|
||||
int MeasureText(const char *text, int fontSize); // Measure string width for default font
|
||||
Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing); // Measure string size for Font
|
||||
int GetGlyphIndex(Font font, int codepoint); // Get glyph index position in font for a codepoint (unicode character), fallback to '?' if not found
|
||||
|
@ -1257,10 +1318,10 @@ typedef bool (*SaveFileTextCallback)(const char *fileName, char *text); // FileI
|
|||
void SetMaterialTexture(Material *material, int mapType, Texture2D texture); // Set texture for a material map type (MATERIAL_MAP_DIFFUSE, MATERIAL_MAP_SPECULAR...)
|
||||
void SetModelMeshMaterial(Model *model, int meshId, int materialId); // Set material for a mesh
|
||||
// Model animations loading/unloading functions
|
||||
ModelAnimation *LoadModelAnimations(const char *fileName, unsigned int *animCount); // Load model animations from file
|
||||
ModelAnimation *LoadModelAnimations(const char *fileName, int *animCount); // Load model animations from file
|
||||
void UpdateModelAnimation(Model model, ModelAnimation anim, int frame); // Update model animation pose
|
||||
void UnloadModelAnimation(ModelAnimation anim); // Unload animation data
|
||||
void UnloadModelAnimations(ModelAnimation *animations, unsigned int count); // Unload animation array data
|
||||
void UnloadModelAnimations(ModelAnimation *animations, int animCount); // Unload animation array data
|
||||
bool IsModelAnimationValid(Model model, ModelAnimation anim); // Check model animation skeleton match
|
||||
// Collision detection functions
|
||||
bool CheckCollisionSpheres(Vector3 center1, float radius1, Vector3 center2, float radius2); // Check collision between two spheres
|
||||
|
@ -1280,16 +1341,19 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
void CloseAudioDevice(void); // Close the audio device and context
|
||||
bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully
|
||||
void SetMasterVolume(float volume); // Set master volume (listener)
|
||||
float GetMasterVolume(void); // Get master volume (listener)
|
||||
// Wave/Sound loading/unloading functions
|
||||
Wave LoadWave(const char *fileName); // Load wave data from file
|
||||
Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
|
||||
bool IsWaveReady(Wave wave); // Checks if wave data is ready
|
||||
Sound LoadSound(const char *fileName); // Load sound from file
|
||||
Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
|
||||
Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
|
||||
bool IsSoundReady(Sound sound); // Checks if a sound is ready
|
||||
void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data
|
||||
void UnloadWave(Wave wave); // Unload wave data
|
||||
void UnloadSound(Sound sound); // Unload sound
|
||||
void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)
|
||||
bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success
|
||||
bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success
|
||||
// Wave/Sound management functions
|
||||
|
@ -1339,7 +1403,7 @@ typedef void (*AudioCallback)(void *bufferData, unsigned int frames);
|
|||
void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (0.5 is centered)
|
||||
void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
|
||||
void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data
|
||||
void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream
|
||||
void AttachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Attach audio stream processor to stream, receives the samples as <float>s
|
||||
void DetachAudioStreamProcessor(AudioStream stream, AudioCallback processor); // Detach audio stream processor from stream
|
||||
void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline
|
||||
void AttachAudioMixedProcessor(AudioCallback processor); // Attach audio stream processor to the entire audio pipeline, receives the samples as <float>s
|
||||
void DetachAudioMixedProcessor(AudioCallback processor); // Detach audio stream processor from the entire audio pipeline
|
|
@ -2,8 +2,22 @@
|
|||
*
|
||||
* raymath v1.5 - Math functions to work with Vector2, Vector3, Matrix and Quaternions
|
||||
*
|
||||
* CONFIGURATION:
|
||||
* CONVENTIONS:
|
||||
* - Matrix structure is defined as row-major (memory layout) but parameters naming AND all
|
||||
* math operations performed by the library consider the structure as it was column-major
|
||||
* It is like transposed versions of the matrices are used for all the maths
|
||||
* It benefits some functions making them cache-friendly and also avoids matrix
|
||||
* transpositions sometimes required by OpenGL
|
||||
* Example: In memory order, row0 is [m0 m4 m8 m12] but in semantic math row0 is [m0 m1 m2 m3]
|
||||
* - Functions are always self-contained, no function use another raymath function inside,
|
||||
* required code is directly re-implemented inside
|
||||
* - Functions input parameters are always received by value (2 unavoidable exceptions)
|
||||
* - Functions use always a "result" variable for return
|
||||
* - Functions are always defined inline
|
||||
* - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
|
||||
* - No compound literals used to make sure libray is compatible with C++
|
||||
*
|
||||
* CONFIGURATION:
|
||||
* #define RAYMATH_IMPLEMENTATION
|
||||
* Generates the implementation of the library into the included file.
|
||||
* If not defined, the library is in header only mode and can be included in other headers
|
||||
|
@ -12,15 +26,6 @@
|
|||
* #define RAYMATH_STATIC_INLINE
|
||||
* This may use up lots of memory.
|
||||
*
|
||||
* CONVENTIONS:
|
||||
*
|
||||
* - Functions are always self-contained, no function use another raymath function inside,
|
||||
* required code is directly re-implemented inside
|
||||
* - Functions input parameters are always received by value (2 unavoidable exceptions)
|
||||
* - Functions use always a "result" variable for return
|
||||
* - Functions are always defined inline
|
||||
* - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
|
||||
*
|
||||
*
|
||||
* LICENSE: zlib/libpng
|
||||
*
|
||||
|
@ -123,7 +128,9 @@ inline /* Functions may be inlined or external definition used*/ float Vector3Di
|
|||
inline /* Functions may be inlined or external definition used*/ float Vector3Angle(Vector3 v1, Vector3 v2);// Negate provided vector (invert direction)
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Negate(Vector3 v);// Divide vector by vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Divide(Vector3 v1, Vector3 v2);// Normalize provided vector
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Normalize(Vector3 v);// Orthonormalize provided vectors
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Normalize(Vector3 v);//Calculate the projection of the vector v1 on to v2
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Project(Vector3 v1, Vector3 v2);//Calculate the rejection of the vector v1 on to v2
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Reject(Vector3 v1, Vector3 v2);// Orthonormalize provided vectors
|
||||
// Makes vectors normalized and orthogonal to each other
|
||||
// Gram-Schmidt function implementation
|
||||
inline /* Functions may be inlined or external definition used*/ void Vector3OrthoNormalize(Vector3 *v1, Vector3 *v2);// Transforms a Vector3 by a given Matrix
|
||||
|
@ -143,12 +150,11 @@ inline /* Functions may be inlined or external definition used*/ Vector3 Vector3
|
|||
// min and max values specified by the given vectors
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max);// Clamp the magnitude of the vector between two values
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3ClampValue(Vector3 v, float min, float max);// Check whether two given vectors are almost equal
|
||||
inline /* Functions may be inlined or external definition used*/ int Vector3Equals(Vector3 p, Vector3 q);// Compute the direction of a refracted ray where v specifies the
|
||||
// normalized direction of the incoming ray, n specifies the
|
||||
// normalized normal vector of the interface of two optical media,
|
||||
// and r specifies the ratio of the refractive index of the medium
|
||||
// from where the ray comes to the refractive index of the medium
|
||||
// on the other side of the surface
|
||||
inline /* Functions may be inlined or external definition used*/ int Vector3Equals(Vector3 p, Vector3 q);// Compute the direction of a refracted ray
|
||||
// v: normalized direction of the incoming ray
|
||||
// n: normalized normal vector of the interface of two optical media
|
||||
// r: ratio of the refractive index of the medium from where the ray comes
|
||||
// to the refractive index of the medium on the other side of the surface
|
||||
inline /* Functions may be inlined or external definition used*/ Vector3 Vector3Refract(Vector3 v, Vector3 n, float r);//----------------------------------------------------------------------------------
|
||||
// Module Functions Definition - Matrix math
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -178,8 +184,8 @@ inline /* Functions may be inlined or external definition used*/ Matrix MatrixRo
|
|||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixScale(float x, float y, float z);// Get perspective projection matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixFrustum(double left, double right, double bottom, double top, double near, double far);// Get perspective projection matrix
|
||||
// NOTE: Fovy angle must be provided in radians
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixPerspective(double fovy, double aspect, double near, double far);// Get orthographic projection matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixOrtho(double left, double right, double bottom, double top, double near, double far);// Get camera look-at matrix (view matrix)
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixPerspective(double fovY, double aspect, double nearPlane, double farPlane);// Get orthographic projection matrix
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixOrtho(double left, double right, double bottom, double top, double nearPlane, double farPlane);// Get camera look-at matrix (view matrix)
|
||||
inline /* Functions may be inlined or external definition used*/ Matrix MatrixLookAt(Vector3 eye, Vector3 target, Vector3 up);// Get float array of matrix data
|
||||
inline /* Functions may be inlined or external definition used*/ float16 MatrixToFloatV(Matrix mat);//----------------------------------------------------------------------------------
|
||||
// Module Functions Definition - Quaternion math
|
||||
|
|
|
@ -2,30 +2,31 @@
|
|||
*
|
||||
* rlgl v4.5 - A multi-OpenGL abstraction layer with an immediate-mode style API
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* An abstraction layer for multiple OpenGL versions (1.1, 2.1, 3.3 Core, 4.3 Core, ES 2.0)
|
||||
* that provides a pseudo-OpenGL 1.1 immediate-mode style API (rlVertex, rlTranslate, rlRotate...)
|
||||
*
|
||||
* ADDITIONAL NOTES:
|
||||
* When choosing an OpenGL backend different than OpenGL 1.1, some internal buffer are
|
||||
* initialized on rlglInit() to accumulate vertex data.
|
||||
*
|
||||
* When an internal state change is required all the stored vertex data is renderer in batch,
|
||||
* additionally, rlDrawRenderBatchActive() could be called to force flushing of the batch.
|
||||
*
|
||||
* Some additional resources are also loaded for convenience, here the complete list:
|
||||
* Some resources are also loaded for convenience, here the complete list:
|
||||
* - Default batch (RLGL.defaultBatch): RenderBatch system to accumulate vertex data
|
||||
* - Default texture (RLGL.defaultTextureId): 1x1 white pixel R8G8B8A8
|
||||
* - Default shader (RLGL.State.defaultShaderId, RLGL.State.defaultShaderLocs)
|
||||
*
|
||||
* Internal buffer (and additional resources) must be manually unloaded calling rlglClose().
|
||||
*
|
||||
* Internal buffer (and resources) must be manually unloaded calling rlglClose().
|
||||
*
|
||||
* CONFIGURATION:
|
||||
*
|
||||
* #define GRAPHICS_API_OPENGL_11
|
||||
* #define GRAPHICS_API_OPENGL_21
|
||||
* #define GRAPHICS_API_OPENGL_33
|
||||
* #define GRAPHICS_API_OPENGL_43
|
||||
* #define GRAPHICS_API_OPENGL_ES2
|
||||
* #define GRAPHICS_API_OPENGL_ES3
|
||||
* Use selected OpenGL graphics backend, should be supported by platform
|
||||
* Those preprocessor defines are only used on rlgl module, if OpenGL version is
|
||||
* required by any other module, use rlGetVersion() to check it
|
||||
|
@ -58,7 +59,7 @@
|
|||
* #define RL_CULL_DISTANCE_NEAR 0.01 // Default projection matrix near cull distance
|
||||
* #define RL_CULL_DISTANCE_FAR 1000.0 // Default projection matrix far cull distance
|
||||
*
|
||||
* When loading a shader, the following vertex attribute and uniform
|
||||
* When loading a shader, the following vertex attributes and uniform
|
||||
* location names are tried to be set automatically:
|
||||
*
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION "vertexPosition" // Bound by default to shader location: 0
|
||||
|
@ -66,6 +67,7 @@
|
|||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL "vertexNormal" // Bound by default to shader location: 2
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR "vertexColor" // Bound by default to shader location: 3
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT "vertexTangent" // Bound by default to shader location: 4
|
||||
* #define RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2 "vertexTexCoord2" // Bound by default to shader location: 5
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_MVP "mvp" // model-view-projection matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW "matView" // view matrix
|
||||
* #define RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION "matProjection" // projection matrix
|
||||
|
@ -77,7 +79,6 @@
|
|||
* #define RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2 "texture2" // texture2 (texture slot active 2)
|
||||
*
|
||||
* DEPENDENCIES:
|
||||
*
|
||||
* - OpenGL libraries (depending on platform and OpenGL version selected)
|
||||
* - GLAD OpenGL extensions loading library (only for OpenGL 3.3 Core, 4.3 Core)
|
||||
*
|
||||
|
@ -112,6 +113,7 @@
|
|||
// OpenGL 2.1 uses most of OpenGL 3.3 Core functionality
|
||||
// WARNING: Specific parts are checked with #if defines
|
||||
// OpenGL 4.3 uses OpenGL 3.3 Core functionality
|
||||
// OpenGL ES 3.0 uses OpenGL ES 2.0 functionality (and more)
|
||||
// Support framebuffer objects by default
|
||||
// NOTE: Some driver implementation do not support it, despite they should
|
||||
//----------------------------------------------------------------------------------
|
||||
|
@ -173,7 +175,8 @@ typedef enum {
|
|||
RL_OPENGL_21, // OpenGL 2.1 (GLSL 120)
|
||||
RL_OPENGL_33, // OpenGL 3.3 (GLSL 330)
|
||||
RL_OPENGL_43, // OpenGL 4.3 (using GLSL 330)
|
||||
RL_OPENGL_ES_20 // OpenGL ES 2.0 (GLSL 100)
|
||||
RL_OPENGL_ES_20, // OpenGL ES 2.0 (GLSL 100)
|
||||
RL_OPENGL_ES_30 // OpenGL ES 3.0 (GLSL 300 es)
|
||||
} rlGlVersion;
|
||||
// Trace log level
|
||||
// NOTE: Organized by priority level
|
||||
|
@ -200,6 +203,9 @@ typedef enum {
|
|||
RL_PIXELFORMAT_UNCOMPRESSED_R32, // 32 bpp (1 channel - float)
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32, // 32*3 bpp (3 channels - float)
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_R32G32B32A32, // 32*4 bpp (4 channels - float)
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_R16, // 16 bpp (1 channel - half float)
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16, // 16*3 bpp (3 channels - half float)
|
||||
RL_PIXELFORMAT_UNCOMPRESSED_R16G16B16A16, // 16*4 bpp (4 channels - half float)
|
||||
RL_PIXELFORMAT_COMPRESSED_DXT1_RGB, // 4 bpp (no alpha)
|
||||
RL_PIXELFORMAT_COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha)
|
||||
RL_PIXELFORMAT_COMPRESSED_DXT3_RGBA, // 8 bpp
|
||||
|
@ -286,24 +292,24 @@ typedef enum {
|
|||
// NOTE: By default up to 8 color channels defined, but it can be more
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_COLOR_CHANNEL0 = 0, // Framebuffer attachment type: color 0
|
||||
RL_ATTACHMENT_COLOR_CHANNEL1, // Framebuffer attachment type: color 1
|
||||
RL_ATTACHMENT_COLOR_CHANNEL2, // Framebuffer attachment type: color 2
|
||||
RL_ATTACHMENT_COLOR_CHANNEL3, // Framebuffer attachment type: color 3
|
||||
RL_ATTACHMENT_COLOR_CHANNEL4, // Framebuffer attachment type: color 4
|
||||
RL_ATTACHMENT_COLOR_CHANNEL5, // Framebuffer attachment type: color 5
|
||||
RL_ATTACHMENT_COLOR_CHANNEL6, // Framebuffer attachment type: color 6
|
||||
RL_ATTACHMENT_COLOR_CHANNEL7, // Framebuffer attachment type: color 7
|
||||
RL_ATTACHMENT_COLOR_CHANNEL1 = 1, // Framebuffer attachment type: color 1
|
||||
RL_ATTACHMENT_COLOR_CHANNEL2 = 2, // Framebuffer attachment type: color 2
|
||||
RL_ATTACHMENT_COLOR_CHANNEL3 = 3, // Framebuffer attachment type: color 3
|
||||
RL_ATTACHMENT_COLOR_CHANNEL4 = 4, // Framebuffer attachment type: color 4
|
||||
RL_ATTACHMENT_COLOR_CHANNEL5 = 5, // Framebuffer attachment type: color 5
|
||||
RL_ATTACHMENT_COLOR_CHANNEL6 = 6, // Framebuffer attachment type: color 6
|
||||
RL_ATTACHMENT_COLOR_CHANNEL7 = 7, // Framebuffer attachment type: color 7
|
||||
RL_ATTACHMENT_DEPTH = 100, // Framebuffer attachment type: depth
|
||||
RL_ATTACHMENT_STENCIL = 200, // Framebuffer attachment type: stencil
|
||||
} rlFramebufferAttachType;
|
||||
// Framebuffer texture attachment type
|
||||
typedef enum {
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_X = 0, // Framebuffer texture attachment type: cubemap, +X side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X, // Framebuffer texture attachment type: cubemap, -X side
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y, // Framebuffer texture attachment type: cubemap, +Y side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y, // Framebuffer texture attachment type: cubemap, -Y side
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z, // Framebuffer texture attachment type: cubemap, +Z side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z, // Framebuffer texture attachment type: cubemap, -Z side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_X = 1, // Framebuffer texture attachment type: cubemap, -X side
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Y = 2, // Framebuffer texture attachment type: cubemap, +Y side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Y = 3, // Framebuffer texture attachment type: cubemap, -Y side
|
||||
RL_ATTACHMENT_CUBEMAP_POSITIVE_Z = 4, // Framebuffer texture attachment type: cubemap, +Z side
|
||||
RL_ATTACHMENT_CUBEMAP_NEGATIVE_Z = 5, // Framebuffer texture attachment type: cubemap, -Z side
|
||||
RL_ATTACHMENT_TEXTURE2D = 100, // Framebuffer texture attachment type: texture2d
|
||||
RL_ATTACHMENT_RENDERBUFFER = 200, // Framebuffer texture attachment type: renderbuffer
|
||||
} rlFramebufferAttachTextureType;
|
||||
|
@ -368,6 +374,7 @@ typedef enum {
|
|||
void rlEnableFramebuffer(unsigned int id); // Enable render texture (fbo)
|
||||
void rlDisableFramebuffer(void); // Disable render texture (fbo), return to default framebuffer
|
||||
void rlActiveDrawBuffers(int count); // Activate multiple draw color buffers
|
||||
void rlBlitFramebuffer(int srcX, int srcY, int srcWidth, int srcHeight, int dstX, int dstY, int dstWidth, int dstHeight, int bufferMask); // Blit active framebuffer to main framebuffer
|
||||
// General render state
|
||||
void rlEnableColorBlend(void); // Enable color blending
|
||||
void rlDisableColorBlend(void); // Disable color blending
|
||||
|
@ -382,7 +389,8 @@ typedef enum {
|
|||
void rlDisableScissorTest(void); // Disable scissor test
|
||||
void rlScissor(int x, int y, int width, int height); // Scissor test
|
||||
void rlEnableWireMode(void); // Enable wire mode
|
||||
void rlDisableWireMode(void); // Disable wire mode
|
||||
void rlEnablePointMode(void); // Enable point mode
|
||||
void rlDisableWireMode(void); // Disable wire mode ( and point ) maybe rename
|
||||
void rlSetLineWidth(float width); // Set the line drawing width
|
||||
float rlGetLineWidth(void); // Get the line drawing width
|
||||
void rlEnableSmoothLines(void); // Enable line aliasing
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "4.5.0.1"
|
||||
__version__ = "5.0.0.0"
|
Reference in a new issue