Files

19 lines
15 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-ox_inventory/Guides/inventory_ui">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-beta.21">
<link rel="search" type="application/opensearchdescription+xml" title="Overextended" href="/opensearch.xml"><title data-rh="true">Building inventory UI | Overextended</title><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://overextended.github.io/docs/ox_inventory/Guides/inventory_ui"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Building inventory UI | Overextended"><meta data-rh="true" name="description" content="Requirements to build:"><meta data-rh="true" property="og:description" content="Requirements to build:"><link data-rh="true" rel="icon" href="/img/ox.ico"><link data-rh="true" rel="canonical" href="https://overextended.github.io/docs/ox_inventory/Guides/inventory_ui"><link data-rh="true" rel="alternate" href="https://overextended.github.io/docs/ox_inventory/Guides/inventory_ui" hreflang="en"><link data-rh="true" rel="alternate" href="https://overextended.github.io/docs/ox_inventory/Guides/inventory_ui" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://8XXXVNJ7UW-dsn.algolia.net" crossorigin="anonymous"><link rel="stylesheet" href="/assets/css/styles.8b837b0a.css">
<link rel="preload" href="/assets/js/runtime~main.81f3545d.js" as="script">
<link rel="preload" href="/assets/js/main.6827ff74.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"dark")}()</script><div id="__docusaurus">
<div role="region"><a href="#" class="skipToContent_AAs2">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle clean-btn" type="button" tabindex="0"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/ox_64.png" alt="Ox Logo" class="themedImage_TGiV themedImage--light_hEfu" height="32" width="32"><img src="/img/ox_64.png" alt="Ox Logo" class="themedImage_TGiV themedImage--dark_IVBJ" height="32" width="32"></div><b class="navbar__title text--truncate">Overextended</b></a><a href="https://www.github.com/overextended" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_HzUF"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><a href="https://www.discord.gg/overextended" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">Discord<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_HzUF"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></div><div class="navbar__items navbar__items--right"><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/">Documentation</a><div class="searchBox_q3Mz"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div class="main-wrapper docsWrapper_HXQ2"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_AGDJ" type="button"></button><div class="docPage_UwMY"><aside class="theme-doc-sidebar-container docSidebarContainer_lBIm"><div class="sidebar_R2ge"><nav class="menu thin-scrollbar menu_nyNM"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/docs">← Documentation</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--active" aria-expanded="true" href="/docs/category/inventory">Inventory</a><button aria-label="Toggle the collapsible sidebar category &#x27;Inventory&#x27;" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/ox_inventory/">Getting Started</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/ox_inventory/config">Configuration</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/docs/ox_inventory/Functions/Client/Inventory/Search">Functions</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--active" aria-expanded="true" tabindex="0" href="/docs/ox_inventory/Guides/">Overview</a><button aria-label="Toggle the collapsible sidebar category &#x27;Overview&#x27;" type="button" class="clean-btn menu__caret"></button></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/ox_inventory/Guides/creatingItems">Creating items</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/docs/ox_inventory/Guides/inventory_ui">Building inventory UI</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/docs/ox_inventory/Guides/stashes">Creating custom stashes</a></li></ul></li></ul></li></ul></nav></div></aside><main class="docMainContainer_ZqYE"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_MuR7"><div class="docItemContainer_LiKe"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_LqIV" aria-label="Breadcrumbs"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_qK7i"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item"><a class="breadcrumbs__link" itemprop="item" href="/docs/category/inventory"><span itemprop="name">Inventory</span></a><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item"><a class="breadcrumbs__link" itemprop="item" href="/docs/ox_inventory/Guides/"><span itemprop="name">Overview</span></a><meta itemprop="position" content="2"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">Building inventory UI</span><meta itemprop="position" content="3"></li></ul></nav><div class="tocCollapsible_TEpM theme-doc-toc-mobile tocMobile_M1oX"><button type="button" class="clean-btn tocCollapsibleButton_r_O4">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Building inventory UI</h1></header><h2 class="anchor anchorWithStickyNavbar_D9Kl" id="requirements-to-build">Requirements to build:<a class="hash-link" href="#requirements-to-build" title="Direct link to heading">​</a></h2><ul><li>Node.js</li><li>Yarn</li></ul><h2 class="anchor anchorWithStickyNavbar_D9Kl" id="installing-nodejs">Installing Node.js:<a class="hash-link" href="#installing-nodejs" title="Direct link to heading">​</a></h2><ul><li>Download the LTS version of Node.js.</li><li>Go through the install and make sure you install all of the features.</li><li>Run <code>node --version</code> in cmd and make sure that it gives you the version number. If it doesn&#x27;t then you didn&#x27;t install it correctly.</li></ul><div style="width:fit-content"><a href="https://www.nodejs.org" target="_blank" rel="noopener noreferrer"><div style="width:fit-content;height:3rem;padding:0.8rem;border-radius:0.2rem;vertical-align:baseline;text-align:center;display:flex;justify-content:center;align-items:center;color:white" class="icon-button"><div style="font-size:1.7rem;padding-right:0.6rem;padding-left:;vertical-align:center;display:flex"><svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 448 512" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M224 508c-6.7 0-13.5-1.8-19.4-5.2l-61.7-36.5c-9.2-5.2-4.7-7-1.7-8 12.3-4.3 14.8-5.2 27.9-12.7 1.4-.8 3.2-.5 4.6.4l47.4 28.1c1.7 1 4.1 1 5.7 0l184.7-106.6c1.7-1 2.8-3 2.8-5V149.3c0-2.1-1.1-4-2.9-5.1L226.8 37.7c-1.7-1-4-1-5.7 0L36.6 144.3c-1.8 1-2.9 3-2.9 5.1v213.1c0 2 1.1 4 2.9 4.9l50.6 29.2c27.5 13.7 44.3-2.4 44.3-18.7V167.5c0-3 2.4-5.3 5.4-5.3h23.4c2.9 0 5.4 2.3 5.4 5.3V378c0 36.6-20 57.6-54.7 57.6-10.7 0-19.1 0-42.5-11.6l-48.4-27.9C8.1 389.2.7 376.3.7 362.4V149.3c0-13.8 7.4-26.8 19.4-33.7L204.6 9c11.7-6.6 27.2-6.6 38.8 0l184.7 106.7c12 6.9 19.4 19.8 19.4 33.7v213.1c0 13.8-7.4 26.7-19.4 33.7L243.4 502.8c-5.9 3.4-12.6 5.2-19.4 5.2zm149.1-210.1c0-39.9-27-50.5-83.7-58-57.4-7.6-63.2-11.5-63.2-24.9 0-11.1 4.9-25.9 47.4-25.9 37.9 0 51.9 8.2 57.7 33.8.5 2.4 2.7 4.2 5.2 4.2h24c1.5 0 2.9-.6 3.9-1.7s1.5-2.6 1.4-4.1c-3.7-44.1-33-64.6-92.2-64.6-52.7 0-84.1 22.2-84.1 59.5 0 40.4 31.3 51.6 81.8 56.6 60.5 5.9 65.2 14.8 65.2 26.7 0 20.6-16.6 29.4-55.5 29.4-48.9 0-59.6-12.3-63.2-36.6-.4-2.6-2.6-4.5-5.3-4.5h-23.9c-3 0-5.3 2.4-5.3 5.3 0 31.1 16.9 68.2 97.8 68.2 58.4-.1 92-23.2 92-63.4z"></path></svg></div><div>Download</div></div></a></div><h2 class="anchor anchorWithStickyNavbar_D9Kl" id="installing-yarn">Installing Yarn:<a class="hash-link" href="#installing-yarn" title="Direct link to heading">​</a></h2><ul><li>Now that you&#x27;ve installed Node.js you can install Yarn by running <code>npm install --global yarn</code> in cmd.</li></ul><h2 class="anchor anchorWithStickyNavbar_D9Kl" id="building-the-ui">Building the UI:<a class="hash-link" href="#building-the-ui" title="Direct link to heading">​</a></h2><ul><li>cd into the web directory of ox_inventory</li><li>In your cmd type <code>yarn</code> and in will start downloading the node modules.</li><li>After it&#x27;s done downloading node modules you can run <code>yarn build</code> to build the UI.</li></ul><div class="admonition admonition-info alert alert--info"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>Hot reloads</h5></div><div class="admonition-content"><p>When working in the browser you can run <code>yarn start</code>, which supports hot reloads meaning that
you will see your changes after saving your file.</p><p>If you want to work in game you can run <code>yarn start:game</code> which writes changes to disk, so
the only thing you have to do is restart the resource for it take affect.</p></div></div></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/overextended/overextended.github.io/tree/main/docs/ox_inventory/Guides/inventory_ui.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_YzTo" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_xdYa"><span class="theme-last-updated">Last updated<!-- --> on <b><time datetime="2022-06-30T08:46:43.000Z">6/30/2022</time></b></span></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/docs/ox_inventory/Guides/creatingItems"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Creating items</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/docs/ox_inventory/Guides/stashes"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Creating custom stashes</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_KORj thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#requirements-to-build" class="table-of-contents__link toc-highlight">Requirements to build:</a></li><li><a href="#installing-nodejs" class="table-of-contents__link toc-highlight">Installing Node.js:</a></li><li><a href="#installing-yarn" class="table-of-contents__link toc-highlight">Installing Yarn:</a></li><li><a href="#building-the-ui" class="table-of-contents__link toc-highlight">Building the UI:</a></li></ul></div></div></div></div></main></div></div></div>
<script src="/assets/js/runtime~main.81f3545d.js"></script>
<script src="/assets/js/main.6827ff74.js"></script>
</body>
</html>