Sha256: 36b6d654aa80631759d11b6cf4ffa13b3fbcc68ca1f5cb7d514b10367fe7251c

Contents?: true

Size: 1.79 KB

Versions: 1

Compression:

Stored size: 1.79 KB

Contents

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>new (MyGUIWindow)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File examples/BasicExample.rb, line 18</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
    <span class="ruby-keyword kw">super</span>(<span class="ruby-value">640</span>, <span class="ruby-value">480</span>, <span class="ruby-keyword kw">false</span>, <span class="ruby-value">20</span>)
    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">caption</span> = <span class="ruby-value str">&quot;GGLib Tutorial&quot;</span>
    <span class="ruby-comment cmt">#Rather than override methods such as update, button_down,</span>
    <span class="ruby-comment cmt">#and draw, as we would with plain Gosu code, we will override</span>
    <span class="ruby-comment cmt">#these methods in state objects. This allows the user to switch</span>
    <span class="ruby-comment cmt">#between various game states, such as between menus and the</span>
    <span class="ruby-comment cmt">#actual game, without having to litter their functions with</span>
    <span class="ruby-comment cmt">#switch statements or if-else statements.</span>
    <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">state</span> = <span class="ruby-constant">MyStateObj</span>.<span class="ruby-identifier">new</span>
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gglib-1.3.0 doc/classes/MyGUIWindow.src/M000011.html