Skip to content

Commit

Permalink
Deploying to gh-pages from @ 91aba31 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
RedstoneWizard08 committed May 10, 2024
1 parent 1d7402a commit bf514b7
Show file tree
Hide file tree
Showing 13 changed files with 536 additions and 51 deletions.
44 changes: 11 additions & 33 deletions guides/quickstart/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,42 +118,20 @@ <h5>Note</h5>
This is what it will be like in the future!</p>
</div>
<h2 id="your-first-option">Your First Option</h2>
<p>To create an option, you'll need a few things.</p>
<p>You'll start with the class:</p>
<p>Here's a basic option:</p>
<pre><code class="lang-cs">[RegisterOption]
private class MyOption()
private class MyOptionThing() // Class name is different here to show that it doesn't matter in state
: IntOption(&quot;MyOption&quot;, 50, &quot;My Option!&quot;, 0, 100, &quot;MY STUFF&quot;, &quot;GENERAL&quot;);
</code></pre>
<p>You'll notice a few things here. Let's break it down.</p>
<p>The <code>[RegisterOption]</code> comes from <a class="xref" href="../../api/ConfigurableWarning.API.RegisterOption.html">RegisterOption</a>, and
tells ConfigurableWarning to automatically register your option to the game, meaning that
you don't have to do that!</p>
<p>The inherited class, <a class="xref" href="../../api/ConfigurableWarning.API.Options.IntOption.html">IntOption</a>, defines this as an
<a class="xref" href="../../api/ConfigurableWarning.API.Options.IOption-1.html">IOption&lt;T&gt;</a> with the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> type for its
value. This constructor takes a few arguments, namely:</p>
<ol>
<li>The option's name - Here it's <code>MyOption</code>. This is used in the registry, and the end-user will
likely never see it.</li>
<li>The default value - Here it's <code>50</code>.</li>
<li>The option's display name - Here it's <code>&quot;My Option!&quot;</code>. This is what the user will see in the
settings menu.</li>
<li>The minimum value - Here it's <code>0</code>. This is the <u>minumum</u> value that the slider will go to.</li>
<li>The maximum value - Here it's <code>100</code>. This is the <u>maximum</u> value that the slider will go to.</li>
<li>The tab - Here it's <code>&quot;MY STUFF&quot;</code>. This will be the tab that the setting shows up in.</li>
<li>The category - Here it's <code>&quot;GENERAL&quot;</code>. This will be the category that the setting appears under.</li>
</ol>
<div class="TIP">
<h5>Tip</h5>
<p>To see all of the option types and constructors, look at the API reference!
See <a class="xref" href="../../api/ConfigurableWarning.API.Options.html">ConfigurableWarning.API.Options</a>.</p>
</div>
<h2 id="notes">Notes</h2>
<ul>
<li>Unfortunately, due to the nature of how Zorro's Settings API works, each option has to be its
own class.</li>
<li>This API is built on top of ContentSettings, they did some amazing work!</li>
<li>This API is a work-in-progress! Things may change at any time!</li>
</ul>
<p>For more info, head to the <a href="./tutorials/">tutorials</a> section!</p>
<h2 id="accessing-its-state">Accessing it's state</h2>
<p>To access your option's state, you can use the &lt;xref:ConfigurableWarning.API.Options.OptionsState&gt;
manager. To access it, you'll use the same string that you used in your option's name above.
In this case, it's <code>&quot;MyOption&quot;</code>.</p>
<pre><code class="lang-cs">int? state = OptionsState.Instance.Get&lt;int&gt;(&quot;MyOption&quot;);
</code></pre>
<p>This code retrieves the optional state of the option. You can learn more about that
<a href="../tutorials/state.html">here</a>.</p>

</article>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<html>
<head>
<meta charset="utf-8">
<title>Introduction to ConfigurableWarning | ConfigurableWarning Docs </title>
<title>Introduction | ConfigurableWarning Docs </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Introduction to ConfigurableWarning | ConfigurableWarning Docs ">
<meta name="title" content="Introduction | ConfigurableWarning Docs ">


<link rel="icon" href="../../favicon.ico">
Expand All @@ -16,7 +16,7 @@
<meta name="docfx:rel" content="../../">


<meta name="docfx:docurl" content="https://github.com/RedstoneWizard08/ConfigurableWarning/blob/main/docs/guides/quickstart/introduction.md/#L1">
<meta name="docfx:docurl" content="https://github.com/RedstoneWizard08/ConfigurableWarning/blob/main/docs/guides/quickstart/index.md/#L1">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
Expand Down Expand Up @@ -98,7 +98,7 @@ <h1 id="introduction">Introduction</h1>
</article>

<div class="contribution d-print-none">
<a href="https://github.com/RedstoneWizard08/ConfigurableWarning/blob/main/docs/guides/quickstart/introduction.md/#L1" class="edit-link">Edit this page</a>
<a href="https://github.com/RedstoneWizard08/ConfigurableWarning/blob/main/docs/guides/quickstart/index.md/#L1" class="edit-link">Edit this page</a>
</div>

<div class="next-article d-print-none border-top" id="nextArticle"></div>
Expand Down
27 changes: 25 additions & 2 deletions guides/toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,33 @@

<ul class="nav level1">
<li>
<a href="quickstart/introduction.html" name="" title="Introduction">Introduction</a>
<span class="expand-stub"></span>
<a href="quickstart/index.html" name="" title="Quick Start">Quick Start</a>

<ul class="nav level2">
<li>
<a href="quickstart/index.html" name="" title="Introduction">Introduction</a>
</li>
<li>
<a href="quickstart/getting-started.html" name="" title="Getting Started">Getting Started</a>
</li>
</ul>
</li>
<li>
<a href="quickstart/getting-started.html" name="" title="Getting Started">Getting Started</a>
<span class="expand-stub"></span>
<a href="tutorials/index.html" name="" title="Tutorials">Tutorials</a>

<ul class="nav level2">
<li>
<a href="tutorials/index.html" name="" title="Introduction">Introduction</a>
</li>
<li>
<a href="tutorials/options.html" name="" title="Options">Options</a>
</li>
<li>
<a href="tutorials/state.html" name="" title="State">State</a>
</li>
</ul>
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion guides/toc.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

{"items":[{"name":"Introduction","href":"quickstart/introduction.html","topicHref":"quickstart/introduction.html","topicUid":"Guides.Introduction"},{"name":"Getting Started","href":"quickstart/getting-started.html","topicHref":"quickstart/getting-started.html","topicUid":"Guides.GettingStarted"}]}
{"items":[{"name":"Quick Start","href":"quickstart/index.html","topicHref":"quickstart/index.html","items":[{"name":"Introduction","href":"quickstart/index.html","topicHref":"quickstart/index.html"},{"name":"Getting Started","href":"quickstart/getting-started.html","topicHref":"quickstart/getting-started.html"}]},{"name":"Tutorials","href":"tutorials/index.html","topicHref":"tutorials/index.html","items":[{"name":"Introduction","href":"tutorials/index.html","topicHref":"tutorials/index.html"},{"name":"Options","href":"tutorials/options.html","topicHref":"tutorials/options.html"},{"name":"State","href":"tutorials/state.html","topicHref":"tutorials/state.html"}]}]}
118 changes: 118 additions & 0 deletions guides/tutorials/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Introduction | ConfigurableWarning Docs </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Introduction | ConfigurableWarning Docs ">


<link rel="icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../public/docfx.min.css">
<link rel="stylesheet" href="../../public/main.css">
<meta name="docfx:navrel" content="../../toc.html">
<meta name="docfx:tocrel" content="../toc.html">

<meta name="docfx:rel" content="../../">


<meta name="docfx:docurl" content="https://github.com/RedstoneWizard08/ConfigurableWarning/blob/main/docs/guides/tutorials/index.md/#L1">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">

<script type="module" src="./../../public/docfx.min.js"></script>

<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>

</head>

<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../banner.svg" alt="">

</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>

<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>

<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" style="margin-top: -.65em; margin-left: -.8em" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>

<nav id="breadcrumb"></nav>
</div>

<article data-uid="Tutorials.Intro">
<h1 id="tutorials">Tutorials</h1>

<p>Welcome to the tutorials!
You can find tutorials on how to use the API here!</p>

</article>

<div class="contribution d-print-none">
<a href="https://github.com/RedstoneWizard08/ConfigurableWarning/blob/main/docs/guides/tutorials/index.md/#L1" class="edit-link">Edit this page</a>
</div>

<div class="next-article d-print-none border-top" id="nextArticle"></div>

</div>

<div class="affix">
<nav id="affix"></nav>
</div>
</main>

<div class="container-xxl search-results" id="search-results"></div>

<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
150 changes: 150 additions & 0 deletions guides/tutorials/options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Options | ConfigurableWarning Docs </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Options | ConfigurableWarning Docs ">


<link rel="icon" href="../../favicon.ico">
<link rel="stylesheet" href="../../public/docfx.min.css">
<link rel="stylesheet" href="../../public/main.css">
<meta name="docfx:navrel" content="../../toc.html">
<meta name="docfx:tocrel" content="../toc.html">

<meta name="docfx:rel" content="../../">


<meta name="docfx:docurl" content="https://github.com/RedstoneWizard08/ConfigurableWarning/blob/main/docs/guides/tutorials/options.md/#L1">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">

<script type="module" src="./../../public/docfx.min.js"></script>

<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>

</head>

<body class="tex2jax_ignore" data-layout="" data-yaml-mime="">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../../index.html">
<img id="logo" class="svg" src="../../banner.svg" alt="">

</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>

<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>

<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" style="margin-top: -.65em; margin-left: -.8em" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>

<nav id="breadcrumb"></nav>
</div>

<article data-uid="Tutorials.Options">
<h1 id="options">Options</h1>

<h2 id="creating-an-option">Creating an Option</h2>
<p>To create an option, you'll need a few things.</p>
<p>You'll start with the class:</p>
<pre><code class="lang-cs">[RegisterOption]
private class MyOptionThing() // Class name is different here to show that it doesn't matter in state
: IntOption(Keys.MyOption, 50, &quot;My Option!&quot;, 0, 100, &quot;MY STUFF&quot;, &quot;GENERAL&quot;);
</code></pre>
<div class="NOTE">
<h5>Note</h5>
<p>For information about the <code>Keys</code> class, see <a href="state.html">State</a>.</p>
</div>
<p>You'll notice a few things here. Let's break it down.</p>
<p>The <code>[RegisterOption]</code> comes from <a class="xref" href="../../api/ConfigurableWarning.API.RegisterOption.html">RegisterOption</a>, and
tells ConfigurableWarning to automatically register your option to the game, meaning that
you don't have to do that!</p>
<p>The inherited class, <a class="xref" href="../../api/ConfigurableWarning.API.Options.IntOption.html">IntOption</a>, defines this as an
<a class="xref" href="../../api/ConfigurableWarning.API.Options.IOption-1.html">IOption&lt;T&gt;</a> with the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a> type for its
value. This constructor takes a few arguments, namely:</p>
<ol>
<li>The option's name - Here it's <code>&quot;MyOption&quot;</code>. This is used in the state and registry, and the
end-user will likely never see it.</li>
<li>The default value - Here it's <code>50</code>.</li>
<li>The option's display name - Here it's <code>&quot;My Option!&quot;</code>. This is what the user will see in the
settings menu.</li>
<li>The minimum value - Here it's <code>0</code>. This is the <u>minumum</u> value that the slider will go to.</li>
<li>The maximum value - Here it's <code>100</code>. This is the <u>maximum</u> value that the slider will go to.</li>
<li>The tab - Here it's <code>&quot;MY STUFF&quot;</code>. This will be the tab that the setting shows up in.</li>
<li>The category - Here it's <code>&quot;GENERAL&quot;</code>. This will be the category that the setting appears under.</li>
</ol>
<div class="NOTE">
<h5>Note</h5>
<p>Unfortunately, due to the nature of how Zorro's Settings API works, each option has
to be its own class.</p>
</div>

</article>

<div class="contribution d-print-none">
<a href="https://github.com/RedstoneWizard08/ConfigurableWarning/blob/main/docs/guides/tutorials/options.md/#L1" class="edit-link">Edit this page</a>
</div>

<div class="next-article d-print-none border-top" id="nextArticle"></div>

</div>

<div class="affix">
<nav id="affix"></nav>
</div>
</main>

<div class="container-xxl search-results" id="search-results"></div>

<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
Loading

0 comments on commit bf514b7

Please sign in to comment.