Skip to content

Commit

Permalink
docs(general): Minor fixes to PR #227
Browse files Browse the repository at this point in the history
  • Loading branch information
gurpreetsinghmatharoo committed Dec 20, 2024
1 parent b883425 commit 547168a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ <h2 id="drawing_targets">Draw Targets</h2>
<ol>
<li>The <a data-xref="{text}" href="Surfaces/Surfaces.htm#application_surface">Application Surface</a>, if enabled</li>
<li>A view surface, if set for a view with <span class="inline2"><a data-xref="{title}" href="../Cameras_And_Display/Cameras_And_Viewports/view_surface_id.htm">view_surface_id</a></span></li>
<li>A custom surface created with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/surface_create.htm">surface_create</a></span></li>
<li>A custom surface created with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/surface_create.htm">surface_create</a></span> and set as the target with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/surface_set_target.htm">surface_set_target</a></span></li>
</ol>
</li>
</ul>
<p><span data-keyref="GameMaker Name">GameMaker</span> sets the draw target to the application surface automatically after all instances have executed their Pre-Draw event and resets it to the display buffer before all instances execute their Post-Draw event.</p>
<p>At any point in a Draw event you can create your own custom surface with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/surface_create.htm">surface_create</a></span>, set it as the draw target with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/surface_set_target.htm">surface_set_target</a></span>, draw to it and reset the target afterwards with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/surface_reset_target.htm">surface_reset_target</a></span>. See <a data-xref="{title}" href="Surfaces/Surfaces.htm">Surfaces</a> for more information.</p>
<p><span data-keyref="GameMaker Name">GameMaker</span> sets the draw target to the application surface automatically (if enabled) after all instances have executed their Pre-Draw event and resets it to the display buffer before all instances execute their Post-Draw event.</p>
<p>At any point in a Draw event you can set a <a href="Surfaces/surface_create.htm">custom surface</a> as the draw target with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/surface_set_target.htm">surface_set_target</a></span>, draw to it and reset the target afterwards with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/surface_reset_target.htm">surface_reset_target</a></span>. See <a data-xref="{title}" href="Surfaces/Surfaces.htm">Surfaces</a> for more information.</p>
<h3>The Application Surface</h3>
<p>This is the default draw target that <span data-keyref="GameMaker Name">GameMaker</span> draws to in the regular Draw events. You can choose to not draw it automatically with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/application_surface_draw_enable.htm">application_surface_draw_enable</a></span> or disable it entirely with <span class="inline3_func"><a data-xref="{title}" href="Surfaces/application_surface_enable.htm">application_surface_enable</a></span>. When the application surface is disabled, everything is drawn directly to the display buffer.</p>
<h2>Reference</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!--<div class="body-scroll" style="top: 150px;">-->
<h1 id="h"><span data-field="title" data-format="default">surface_reset_target</span></h1>
<p>This function resets all further drawing from the current surface back to the previous draw target.</p>
<p>This draw target can be another surface (the <a href="application_surface.htm" title="application_surface">application surface</a>, a <a href="../../Cameras_And_Display/Cameras_And_Viewports/view_surface_id.htm" title="view_surface_id">view surface,</a> a <a href="surface_create.htm" title="surface_create()">custom surface</a>) or the <a class="glossterm" data-glossterm="display buffer" href="#">display buffer</a>, depending on where the call to the corresponding <span class="inline3_func"><a data-xref="{title}" href="surface_set_target.htm">surface_set_target</a></span> was made. See <a data-xref="{text}" href="../Drawing.htm#drawing_targets">Draw Targets</a>.</p>
<p>The previous target can be another surface (the <a href="application_surface.htm" title="application_surface">application surface</a>, a <a href="../../Cameras_And_Display/Cameras_And_Viewports/view_surface_id.htm" title="view_surface_id">view surface,</a> a <a href="surface_create.htm" title="surface_create()">custom surface</a>) or the <a class="glossterm" data-glossterm="display buffer" href="#">display buffer</a>, depending on where the call to the corresponding <span class="inline3_func"><a data-xref="{title}" href="surface_set_target.htm">surface_set_target</a></span> was made. See: <a data-xref="{text}" href="../Drawing.htm#drawing_targets">Draw Targets</a></p>
<p>Please note that to start drawing to a surface you must first have called the function <span class="inline3_func"><a data-xref="{text}" href="surface_set_target.htm#h">surface_set_target</a></span> and then this one after you have finished, <i>for each surface target that you have set</i> or else nothing will be drawn on the screen as all further drawing (even in other instances) will be done on the surface. You should also realise that nothing will be seen if the surface itself is not drawn on the screen in the Draw event of an instance.</p>
<div data-conref="../../../../assets/snippets/Note_Surface_Function_Silently_Fails.hts"> </div>
<p> </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">ini_close</span></h1>
<p>This function should be called the moment you are finished reading from or writing to any open INI file.</p>
<p>If you do not use the function after you have used any of the INI write functions, then nothing will be written to disk, as the file information is held in memory until this function is called, which forces the write. Note that, even if you don&#39;t call this function, a  next call to <span class="inline3_func"><a data-xref="{title}" href="ini_open.htm">ini_open</a></span> will close the currently open INI file.</p>
<p>If you do not use the function after you have used any of the INI write functions, then nothing will be written to disk, as the file information is held in memory until this function is called, which forces the write. Note that, even if you don&#39;t call this function, a next call to <span class="inline3_func"><a data-xref="{title}" href="ini_open.htm">ini_open</a></span> will close the currently open INI file.</p>
<p>The function will also return a string with the INI file encoded into it. This string can then be saved to a server and/or used again along with the function <span class="inline3_func"><a data-xref="{title}" href="ini_open_from_string.htm">ini_open_from_string</a></span> to re-create the INI.</p>
<p> </p>
<h4>Syntax:</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2 id="h">Format String</h2>
// Results in:<br />
// &quot;This is a string with two placeholders that will be replaced. They are this and that.&quot;
</p>
<p>Any curly braces <span class="inline2">{ }</span> with text written between them that doesn&#39;t refer to a valid argument index don&#39;t represent a placeholder and are preserved, for example <span class="inline2"><span data-field="title" data-format="default">string</span>(&quot;{Not} {1} has been replaced.&quot;, &quot;&quot;)</span> becomes <span class="inline2">&quot;{Not} {1} has been replaced.&quot;</span>. Curly braces in a format string can be doubled to escape them: <span class="inline2">{{</span> and <span class="inline2">}}</span>.</p>
<p>Any curly braces <span class="inline2">{ }</span> with text written between them that doesn&#39;t refer to a valid argument index won&#39;t represent a placeholder and are preserved, for example <span class="inline2"><span data-field="title" data-format="default">string</span>(&quot;{Not} {1} has been replaced.&quot;, &quot;&quot;)</span> becomes <span class="inline2">&quot;{Not} {1} has been replaced.&quot;</span>. Curly braces in a format string can be doubled to escape them: <span class="inline2">{{</span> and <span class="inline2">}}</span>.</p>
<p>If you only pass a single argument to the function, then this argument will not be considered a format string. If you add placeholders of the kind &quot;{0}&quot; in this case, then they will be output as normal text as there are no values to replace them with: </p>
<p class="code">string_variable = string(&quot;This is a string with two placeholders that won&#39;t be replaced. They are {0} and {1}.&quot;);<br />
<br />
Expand Down

0 comments on commit 547168a

Please # to comment.