Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vladdeSV committed Oct 27, 2016
1 parent d739e3c commit 83cff20
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/element.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ <h1>scone.console.ui.element</h1>
<dd>Set the <u>y</u>.<br><br>

</dd>
<dt><big><a name="UIElement.text"></a>@property auto <u>text</u>();
<dt><big><a name="UIElement.text"></a>@property string <u>text</u>();
</big></dt>
<dd><b>Returns:</b><br>
string.<br><br>

</dd>
<dt><big><a name="UIElement.text.2"></a>@property auto <u>text</u>(string <u>text</u>);
<dt><big><a name="UIElement.text.2"></a>@property void <u>text</u>(string <u>text</u>);
</big></dt>
<dd>Set the <u>text</u>.<br><br>

Expand Down
10 changes: 10 additions & 0 deletions docs/progress_bar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html><head>
<!-- Generated by Ddoc from source\scone\console\ui\progress_bar.d -->
<META http-equiv="content-type" content="text/html; charset=utf-8">
<title>scone.console.ui.progress_bar</title>
</head><body>
<h1>scone.console.ui.progress_bar</h1>
<br><br>

<hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. </small>
</body></html>
18 changes: 17 additions & 1 deletion docs/text_input.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ <h1>scone.console.ui.selectable.text_input</h1>
<b>Note:</b><br>
Spaces are always allowed. Make sure to use something like std.string.strip() for actual storage, and sanitize it while you're at it.<br><br>

<dl><dt><big><a name="UITextInput.displayable"></a>string <u>displayable</u>(bool <i>withCursor</i> = false);
<dl><dt><big><a name="UITextInput.text"></a>@property void <u>text</u>(string <u>text</u>);
</big></dt>
<dd>Set the <u>text</u>.<br><br>

</dd>
<dt><big><a name="UITextInput.displayable"></a>string <u>displayable</u>(bool <i>withCursor</i> = false);
</big></dt>
<dd><b>Returns:</b><br>
string, of what should be displayed.<br><br>
Expand Down Expand Up @@ -79,6 +84,17 @@ <h1>scone.console.ui.selectable.text_input</h1>
<dd><b>Returns:</b><br>
uint.<br><br>

</dd>
<dt><big><a name="UITextInput.cursorPosition"></a>@property auto <u>cursorPosition</u>();
</big></dt>
<dd><b>Returns:</b><br>
uint<br><br>

</dd>
<dt><big><a name="UITextInput.cursorPosition.2"></a>@property auto <u>cursorPosition</u>(uint <u>cursorPosition</u>);
</big></dt>
<dd>Set the cursor position.<br><br>

</dd>
<dt><big><a name="UITextInput.maxLength.2"></a>@property auto <u>maxLength</u>(uint <u>maxLength</u>);
</big></dt>
Expand Down
42 changes: 42 additions & 0 deletions docs/ticker.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<html><head>
<!-- Generated by Ddoc from source\scone\misc\ticker.d -->
<META http-equiv="content-type" content="text/html; charset=utf-8">
<title>scone.misc.ticker</title>
</head><body>
<h1>scone.misc.ticker</h1>
<br><br>
<dl><dt><big><a name="Ticker"></a>struct <u>Ticker</u>;
</big></dt>
<dd>A general ticker, intended for games. Used to count how many times the game should update.
<br><br>
<b>Example:</b><br>
<pre class="d_code"><font color=blue>auto</font> ticker = <u>Ticker</u>(60); <font color=green>// update 60 times per second
</font><font color=blue>foreach</font>(tick; 0 .. ticker.ticks) <font color=green>// `ticker.ticks` returns how many time to ticks since last call
</font>{
<font color=green>// update logic, and only be run 60 times per second
</font>}
</pre>
<br><br>

<dl><dt><big><a name="Ticker.this"></a>this(uint <i>ticksPerSecond</i>);
</big></dt>
<dd>Set custom ticks per second.<br><br>

</dd>
<dt><big><a name="Ticker.ticks"></a>@property auto <u>ticks</u>();
</big></dt>
<dd><b>Returns:</b><br>
int, how many <u>ticks</u> that should be run since last call.<br><br>

</dd>
<dt><big><a name="Ticker.reset"></a>void <u>reset</u>();
</big></dt>
<dd>Resets the ticks since last call <pre style="display:inline;" class="d_inline_code">ticks()</pre><br><br>

</dd>
</dl>
</dd>
</dl>

<hr><small>Page generated by <a href="http://dlang.org/ddoc.html">Ddoc</a>. </small>
</body></html>
19 changes: 17 additions & 2 deletions docs/ui_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,33 @@ <h1>scone.console.ui.base</h1>
<br><br>

</dd>
<dt><big><a name="UI.elementById"></a>auto <u>elementById</u>(string <i>id</i>);
<dt><big><a name="UI.elementById"></a>deprecated auto <u>elementById</u>(string <i>id</i>);
</big></dt>
<dd><b>Returns:</b><br>
UIElement with specified <i>id</i>. If not found, returns <b>null</b>.<br><br>

</dd>
<dt><big><a name="UI.elementById.2"></a>T <u>elementById</u>(T : UIElement)(string <i>id</i>);
</big></dt>
<dd><b>Returns:</b><br>
T with specified <i>id</i>. If not found or type does not match,
returns <b>null</b>.
<br><br>
<b>Example:</b><br>
<pre class="d_code">ui.<u>elementById</u>!UIOption(<font color=red>"startOption"</font>).setAction({ <font color=green>/+ ... +/</font> });
</pre>
<br><br>
<b>Returns:</b><br>
T<br><br>

</dd>
<dt><big><a name="UI.nextSelected"></a>void <u>nextSelected</u>();
</big></dt>
<dd>Goes to the next selectable element.
<br><br>
<b>Note:</b><br>
Only use this if you really need to manually change the selected element. Otherwise use <pre style="display:inline;" class="d_inline_code">update(KeyEvent input)</pre>.<br><br>
Only use this if you really need to manually change the selected
element. Otherwise use <pre style="display:inline;" class="d_inline_code">update(KeyEvent input)</pre>.<br><br>

</dd>
<dt><big><a name="UI.prevSelected"></a>auto <u>prevSelected</u>();
Expand Down

0 comments on commit 83cff20

Please sign in to comment.