Skip to content

Commit

Permalink
docs(general): cursor_sprite - manual page doesn't open
Browse files Browse the repository at this point in the history
YoYoGames/GameMaker-Bugs#6249

* Fixed the tag and keyword at the bottom of the page
* Visual update of the page
  • Loading branch information
YYBartT committed Jun 18, 2024
1 parent e576c99 commit 1d534b8
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,46 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cursor_sprite</title>
<meta name="generator" content="Adobe RoboHelp 2020" />
<meta name="generator" content="Adobe RoboHelp 2022" />
<link rel="stylesheet" href="../../../assets/css/default.css" type="text/css" />
<script src="../../../assets/scripts/main_script.js" type="module"></script>
<meta name="rh-authors" content="Mark Alexander" />
<meta name="topic-comment" content="This page outlines the function cursor_sprite" />
<meta name="topic-comment" content="This page outlines the variable cursor_sprite" />
<meta name="rh-index-keywords" content="cursor_sprite" />
<meta name="search-keywords" content="cursor_sprite" />
</head>
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1>cursor_sprite</h1>
<p>Setting this variable will instruct <span data-keyref="GameMaker Name"><span data-keyref="GameMaker Name">GameMaker</span></span> to use the designated sprite as a cursor (basically setting it to the current mouse x/y position every step). The default value is -1 which is no sprite for the cursor, but you can assign any sprite index from the game assets or that has been imported from an external resource. Please note that there is no way to control the animation speed or image_index, so if the sprite has sub-images, these will be cycled at the same speed as the room speed. To remove the cursor sprite, you can set this variable to -1 again.</p>
<p>It is also worth noting that this variable does <i>not</i> replace the game window cursor, and that it will still be drawn as normal. To avoid this you can use the function <a href="../Cameras_And_Display/The_Game_Window/window_set_cursor.htm"><span class="inline">window_set_cursor()</span></a> and set it to the constant <span class="inline">cr_none</span> which will make the standard cursor invisible.</p>
<h1><span data-field="title" data-format="default">cursor_sprite</span></h1>
<p>Setting this variable will instruct <span data-keyref="GameMaker Name">GameMaker</span> to use the designated sprite as a cursor (basically setting it to the current mouse x/y position every step).</p>
<p>The default value is -1 which is no sprite for the cursor, but you can assign any sprite index from the game assets or that has been imported from an external resource. Please note that there is no way to control the animation speed or image index, so if the sprite has sub-images, these will be cycled at the same speed as the game speed. To remove the cursor sprite, you can set this variable to -1 again.</p>
<p class="note"><span data-conref="../../../assets/snippets/Tag_note.hts"> </span> This variable does <i>not</i> replace the game window cursor, and that it will still be drawn as normal. To avoid this you can use the function <span class="inline3_func"><a data-xref="{title}" href="../Cameras_And_Display/The_Game_Window/window_set_cursor.htm">window_set_cursor</a></span> and set it to the constant <span class="inline2">cr_none</span> which will make the standard cursor invisible.</p>
<p> </p>
<h4>Syntax:</h4>
<p class="code">cursor_sprite;</p>
<p class="code"><span data-field="title" data-format="default">cursor_sprite</span></p>
<p> </p>
<h4>Returns:</h4>
<p class="code"><span data-keyref="Type_Asset_Sprite">Sprite Asset</span></p>
<p class="code"><span data-keyref="Type_Asset_Sprite"><a href="../../../The_Asset_Editors/Sprites.htm" target="_blank">Sprite Asset</a></span></p>
<p> </p>
<h4>Example:</h4>
<p class="code">cursor_sprite = spr_CustomCursor;</p>
<p>The above code will set the sprite indexed in the variable &quot;spr_CustomCursor&quot; to be the cursor sprite for the game.</p>
<p> </p>
<p class="code"><span data-field="title" data-format="default">cursor_sprite</span> = spr_custom_cursor;</p>
<p>The above code sets the sprite indexed in the variable <span class="inline2">spr_custom_cursor</span> to be the cursor sprite for the game.</p>
<p> </p>
<p> </p>
<div class="footer">
<div class="buttons">
<div class="clear">
<div style="float:left">Back: <a href="General_Game_Control.htm">General Game Control</a></div>
<div style="float:right">Next: <a href="game_id.htm">game_id</a></div>
<div style="float:left">Back: <a data-xref="{title}" href="General_Game_Control.htm">General Game Control</a></div>
<div style="float:right">Next: <a data-xref="{title}" href="game_id.htm">game_id</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2022 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
highscore_value
cursor_sprite
-->
<!-- TAGS
highscore_value
cursor_sprite
-->
</body>
</html>

0 comments on commit 1d534b8

Please sign in to comment.