#Custom Inventory Slot Texture

1 messages · Page 1 of 1 (latest)

primal kernel
#

ive been desperately searching for like 3 days but i geniunely cant find anything 😭

#

its probably really simple but im failing miserably so end my suffering

#

i tried overlaying it with an image panel but it didnt render

somber orchid
# primal kernel ive been desperately searching for like 3 days but i geniunely cant find anythin...

Here is an example:
ui/ui_common.json

{
  "custom_grid_item_for_inventory": {
    "type": "panel",
    "$item_collection_name": "inventory_items",
    "controls": [
      {
        "[email protected]_item": {
          // Make the normal slot not appear when the slot number is 16
          "bindings": [
            {
              "binding_collection_name": "$item_collection_name",
              "binding_type": "collection_details"
            },
            {
              "binding_name": "#collection_index",
              "binding_collection_name": "$item_collection_name",
              "binding_type": "collection"
            },
            {
              "binding_type": "view",
              "source_property_name": "(not (#collection_index = 16))",
              "target_property_name": "#visible"
            }
          ]
        }
      },
      {
        "apple_that_appears_at_slot_16": {
          "type": "image",
          "texture": "textures/items/apple",
          "size": [
            18,
            18
          ],
          "bindings": [
            {
              "binding_collection_name": "$item_collection_name",
              "binding_type": "collection_details"
            },
            {
              "binding_name": "#collection_index",
              "binding_collection_name": "$item_collection_name",
              "binding_type": "collection"
            },
            {
              "binding_type": "view",
              "source_property_name": "(#collection_index = 16)",
              "target_property_name": "#visible"
            }
          ]
        }
      }
    ]
  },
  "inventory_panel/inventory_grid": {
    "grid_item_template": "common.custom_grid_item_for_inventory"
  }
}
primal kernel
#

oh shoot i didnt realize you could make the image overlay a custom size

#

for some reason i thought it was limited to 16x16

#

im a genius dw