gm-docs-parser 1.0.0

A collection of typings for GameMaker Studio 2 manual pages
Documentation
<?xml version="1.0" encoding="utf-8" ?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>

  <script type="text/javascript" language="JavaScript">
    //<![CDATA[
    function reDo() {
      if (innerWidth != origWidth || innerHeight != origHeight)
        location.reload();
    }
    if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
      origWidth = innerWidth;
      origHeight = innerHeight;
      onresize = reDo;
    }
    onerror = null;
  //]]>
  </script>
  <style type="text/css">/*<![CDATA[*/

    < !-- div.WebHelpPopupMenu {
      position: absolute;
      left: 0px;
      top: 0px;
      z-index: 4;
      visibility: hidden;
    }

    p.WebHelpNavBar {
      text-align: right;
    }

    -->
  
/*]]>*/</style>

  <script type="text/javascript">//<![CDATA[

    gRootRelPath = "../../../..";
    gCommonRootRelPath = "../../../..";
    gTopicId = "9.2.5.6.0_8";
  
//]]></script>

  <script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/common.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script>
  <script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script>
<script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script>
  <link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"/>
  <link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"/>
  <meta name="topic-status" content="Draft"/>

  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>draw_text_ext</title>
  <meta name="generator" content="Adobe RoboHelp 2019"/>
  <link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"/>
  <meta name="rh-authors" content="Mark Alexander"/>
  <meta name="topic-comment" content="Reference page for draw_text_ext"/>
  <meta name="rh-index-keywords" content="draw_text_ext"/>
  <meta name="search-keywords" content="draw_text_ext"/>
</head>

<body>
  <div class="topic-header rh-hide" id="rh-topic-header" onclick="rh._.goToFullLayout()">
    <div class="logo">
    </div>
    <div class="nav">
      <div class="title" title="draw_text_ext">
        <span>draw_text_ext</span>
      </div>
      <div class="gotohome" title="Click here to see this page in full context">
        <span>Click here to see this page in full context</span>
      </div>
    </div>
  </div>
  <div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div>



  <!--<div class="body-scroll" style="top: 150px;">-->
  <h1>draw_text_ext</h1>
  <p>This function will draw text in a similar way to <a href="draw_text.htm"><tt>draw_text</tt><tt>()</tt><tt></tt></a> only now you can set the space between each line of text - should the text occupy more than one line - and limit the width (in pixels)
    of the string per line so that should any line exceed this value, GameMaker Studio 2 will automatically split the text to the next line at the nearest available white-space (if the text has no white-spaces then it will overrun this maximum
    width value). Note that any white space placed at the start of the string will be stripped out before being parsed for drawing because of this. Also note that a value of -1 for the line separation argument will default to a separation based on the
    height of the &quot;M&quot; character in the chosen font.</p>
  <p> </p>
  <h4>Syntax:</h4>
  <p class="code">draw_text_ext(x, y, string, sep, w);</p>
  <table>
    <tbody>
      <tr>
        <th>Argument</th>
        <th>Description</th>
      </tr>
      <tr>
        <td>x</td>
        <td>The x coordinate of the drawn string.</td>
      </tr>
      <tr>
        <td>y</td>
        <td>The y coordinate of the drawn string.</td>
      </tr>
      <tr>
        <td>string</td>
        <td>The string to draw.</td>
      </tr>
      <tr>
        <td>sep</td>
        <td>The distance in pixels between lines of text.</td>
      </tr>
      <tr>
        <td>w</td>
        <td>The maximum width in pixels of the string before a line break.</td>
      </tr>
    </tbody>
  </table>
  <p> </p>
  <h4>Returns:</h4>
  <p class="code">N/A</p>
  <p> </p>
  <h4>Example:</h4>
  <p class="code">draw_text_ext(100, 50, keyboard_string, 3, 300);</p>
  <p>The above code will draw whatever text the user types into the keyboard, splitting it onto new lines every time the string length for that line exceeds 300 pixels. the code will also maintain a separation of 3 pixels between lines should this occur.</p>
  <p> </p>
  <p> </p>
  <p> </p>
  <div class="footer">
    <div class="buttons">
      <div class="clear">
        <div style="float:left">Back: <a href="Text.htm">Text</a></div>
        <div style="float:right">Next: <a href="draw_text_colour.htm">draw_text_colour</a></div>
      </div>
    </div>
    <h5>© Copyright YoYo Games Ltd. 2020 All Rights Reserved</h5>
  </div>
  <!-- KEYWORDS
draw_text_ext
-->
  <!-- TAGS
draw_text_ext
-->

</body></html>