123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html>
- <head>
- <title>Module goo.button</title>
- <link rel="stylesheet" href="../luadoc.css" type="text/css" />
- <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
- </head>
- <body>
- <div id="container">
- <div id="product">
- <div id="product_logo"></div>
- <div id="product_name"><big><b></b></big></div>
- <div id="product_description"></div>
- </div> <!-- id="product" -->
- <div id="main">
- <div id="navigation">
- <h1>Goo</h1>
- <ul>
-
- <li><a href="../index.html">Index</a></li>
-
- </ul>
- <!-- Module list -->
- <h1>Modules</h1>
- <ul>
- <li>
- <a href="../modules/anim.html">anim</a>
- </li>
- <li>
- <a href="../modules/goo.html">goo</a>
- </li>
- <li><strong>goo.button</strong></li>
-
- <li>
- <a href="../modules/goo.checkbox.html">goo.checkbox</a>
- </li>
- <li>
- <a href="../modules/goo.colorpick.html">goo.colorpick</a>
- </li>
- <li>
- <a href="../modules/goo.image.html">goo.image</a>
- </li>
- <li>
- <a href="../modules/goo.null.html">goo.null</a>
- </li>
- <li>
- <a href="../modules/goo.object.html">goo.object</a>
- </li>
- <li>
- <a href="../modules/goo.panel.html">goo.panel</a>
- </li>
- <li>
- <a href="../modules/goo.progressbar.html">goo.progressbar</a>
- </li>
- <li>
- <a href="../modules/goo.text.html">goo.text</a>
- </li>
- <li>
- <a href="../modules/goo.textinput.html">goo.textinput</a>
- </li>
- </ul>
- <!-- File list -->
- </div><!-- id="navigation" -->
- <div id="content">
- <h1>Module <code>goo.button</code></h1>
- <p>Button object</p>
- <h2>Functions</h2>
- <table class="function_list">
- <tr>
- <td class="name" nowrap><a href="#goo.button:onClick">goo.button:onClick</a> ()</td>
- <td class="summary">Callback function when clicked <br/>See <a href="goo.object.html#onClick">goo.object:onClick()</a> </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.button:setText">goo.button:setText</a> (text)</td>
- <td class="summary">Set the text of the button </td>
- </tr>
- <tr>
- <td class="name" nowrap><a href="#goo.button:sizeToText">goo.button:sizeToText</a> (padding)</td>
- <td class="summary">Automatically size the button to fit the text.</td>
- </tr>
- </table>
- <br/>
- <br/>
- <h2><a name="functions"></a>Functions</h2>
- <dl class="function">
- <dt><a name="goo.button:onClick"></a><span>goo.button:</span><strong>onClick</strong> ( )</dt>
- <dd>
- <p class="func_description">Callback function when clicked <br/>See <a href="goo.object.html#onClick">goo.object:onClick()</a></p>
- <h3>Usage:</h3>
- <pre class='example'> local button = goo.button:new()<br /> button.name = 'bob'<br /> function button:onClick(x,y,button)<br /> if button == 'l' then<br /> print(self.name .. ' has been clicked')<br /> end<br /> end<br /> -- when the button is clicked with left mouse button it prints:<br /> -- bob has been clicked</pre><br />
- </dd>
- <dt><a name="goo.button:setText"></a><span>goo.button:</span><strong>setText</strong> ( text )</dt>
- <dd>
- <p class="func_description">Set the text of the button</p>
- </dd>
- <dt><a name="goo.button:sizeToText"></a><span>goo.button:</span><strong>sizeToText</strong> ( padding )</dt>
- <dd>
- <p class="func_description">Automatically size the button to fit the text.</p>
- <h3>Parameters</h3>
- <ul>
-
-
- <li>
- <b>padding</b> <i><small>:number</small></i><br/>The inside padding, similar to CSS padding.
- </li>
-
-
- </ul>
- </dd>
- </dl>
- </div> <!-- id="content" -->
- </div> <!-- id="main" -->
- <div id="about">
- <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
- </div> <!-- id="about" -->
- </div> <!-- id="container" -->
- </body>
- </html>
|