#Custom Inventory Slot Texture
1 messages · Page 1 of 1 (latest)
its probably really simple but im failing miserably so end my suffering
i tried overlaying it with an image panel but it didnt render
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"
}
}