{"id":2403,"date":"2025-11-17T21:42:10","date_gmt":"2025-11-17T21:42:10","guid":{"rendered":"https:\/\/golemitegames.com\/?post_type=docs&#038;p=2403"},"modified":"2025-11-21T21:13:10","modified_gmt":"2025-11-21T21:13:10","password":"","slug":"item-amount-info-panel","status":"publish","type":"docs","link":"https:\/\/golemitegames.com\/index.php\/docs\/item-amount-info-panel\/","title":{"rendered":"Item Amount Info Panel"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Introduction<\/h2>\n\n\n\n<p>This component handles refreshing the Inventory UI for individual <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item-amount\/\" title=\"Item Amount\">ItemAmount<\/a> information once clicked on a <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/inventory-item-slot\/\" title=\"Inventory Item Slot\">InventoryItemSlot<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Setting up<\/h2>\n\n\n\n<p>There is a prefab ItemAmountInfoPanel located in \/prefabs\/UI.<br><br>Setting up without the prefab otherwise is a little more complicated, as it would involve creating and linking all the visual UI elements. If you wanted to go ahead and do this, you can simply create the elements you need and assign them to this component. Only assigned fields are updated, so do not worry about leaving unnassigned fields on this component. <br><br>This component should be placed under a Canvas.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Settings<\/h2>\n\n\n\n<p><strong>Item Name<\/strong><br>The TextMeshProUGUI component to display the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item\/\" title=\"Item\">Item&#8217;s<\/a> Name.<br><br><strong>Item Icon<\/strong><br>The Image component to display the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item\/\" title=\"Item\">Item&#8217;s<\/a> Icon. <br><br><strong>Description<\/strong><br>The TextMeshProUGUI component to display the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item\/\" title=\"Item\">Item&#8217;s<\/a> Description.<br><br><strong>Count<\/strong><br>The TextMeshProUGUI component to display the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item-amount\/\" title=\"Item Amount\">ItemAmount&#8217;s<\/a> Amount.<br><br><strong>Value<\/strong><br>The TextMeshProUGUI component to display the <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item\/\" title=\"Item\">Item&#8217;s<\/a> Value of 1 unit. <br><br><strong>Stack Size<\/strong><br>The TextMeshProUGUI component to display the Item&#8217;s Stack Size. <br><br><strong>Slider<\/strong><br>The Slider component to select a range of <a href=\"https:\/\/golemitegames.com\/index.php\/docs\/item-amount\/\" title=\"Item Amount\">ItemAmount<\/a> to sell.<br><br><strong>Sell Btn<\/strong><br>The Button component to initiate the Sell function using the Slider&#8217;s value as the Amount to sell. <br><br><strong>Sell Btn Text<\/strong><br>The TextMeshProUGUI component to display the sell text.<br><br><strong>Close Btn<\/strong><br>The Button component to close this panel.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" style=\"font-size:22px;text-transform:capitalize\">Scripting<\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-csharp\" data-lang=\"C#\" data-show-lang=\"0\"><code>\/\/\/ &lt;summary&gt;\n\/\/\/ Refresh the Item Information Panel\n\/\/\/ &lt;\/summary&gt;\n\/\/\/ &lt;param name=&quot;itemAmount&quot;&gt;The Item Amount to display&lt;\/param&gt;\n\/\/\/ &lt;param name=&quot;initSliderValue&quot;&gt;Sets the slider current value to 0 if true&lt;\/param&gt;\npublic void RefreshItemPanel(ItemAmount itemAmount, bool initSliderValue = false)\n\n\/\/\/ &lt;summary&gt;\n\/\/\/ A variation of RefreshItemPanel where it can take in a InventoryItemSlot, this is used if using Consolidated in the Inventory Manager\n\/\/\/ &lt;\/summary&gt;\n\/\/\/ &lt;param name=&quot;inventoryItemSlot&quot;&gt;The InventoryItemSlot to use for the ItemAmount to display&lt;\/param&gt;\n\/\/\/ &lt;param name=&quot;initSliderValue&quot;&gt;Sets the slider current value to 0 if true&lt;\/param&gt;\npublic void RefreshItemPanel(InventoryItemSlot inventoryItemSlot, bool initSliderValue = false)\n\n\/\/\/ &lt;summary&gt;\n\/\/\/ A variation of RefreshItemPanel where it will update the currently selected InventoryItemSlot if there is one\n\/\/\/ &lt;\/summary&gt;\npublic void RefreshFromSelectedInventoryItemSlot()\n\n\/\/\/ &lt;summary&gt;\n\/\/\/ Sell part of the currently selected item based on the slider value\n\/\/\/ &lt;\/summary&gt;\npublic void SellItemAmount()\n\n\/\/\/ &lt;summary&gt;\n\/\/\/ Sell part of the given item based on the slider value\n\/\/\/ &lt;\/summary&gt;\n\/\/\/ &lt;param name=&quot;itemAmount&quot;&gt;The itemAmount item to sell&lt;\/param&gt;\npublic void SellItemAmount(ItemAmount itemAmount)\n\n\/\/If you wanted to manually sell an ItemAmount using your own logic,\n\/\/use InventoryManager &gt; public void SellItemAmount(ItemAmount itemAmount)<\/code><\/pre><\/div>\n\n\n\n<p><br><br><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This component handles refreshing the Inventory UI for individual ItemAmount information once clicked on a InventoryItemSlot. Setting up There is a prefab ItemAmountInfoPanel located in \/prefabs\/UI. Setting up without the prefab otherwise is a little more complicated, as it would involve creating and linking all the visual UI elements. If you wanted to go [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"doc_category":[46],"doc_tag":[],"class_list":["post-2403","docs","type-docs","status-publish","hentry","doc_category-resource-and-production"],"acf":[],"aioseo_notices":[],"year_month":"2026-04","word_count":428,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"rickitz5h","author_nicename":"rickitz5h","author_url":"https:\/\/golemitegames.com\/index.php\/author\/rickitz5h\/"},"doc_category_info":[{"term_name":"Resource And Production","term_url":"https:\/\/golemitegames.com\/index.php\/docs-category\/resource-and-production\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/comments?post=2403"}],"version-history":[{"count":4,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2403\/revisions"}],"predecessor-version":[{"id":2560,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/docs\/2403\/revisions\/2560"}],"wp:attachment":[{"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/media?parent=2403"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_category?post=2403"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/golemitegames.com\/index.php\/wp-json\/wp\/v2\/doc_tag?post=2403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}