mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
InventoryView now uses items instead of blocks (part I)
This commit is contained in:
parent
dd5cd55aeb
commit
eae00dbb11
5 changed files with 36 additions and 21 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <string>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "../graphics/UVRegion.h"
|
||||
#include "../typedefs.h"
|
||||
|
||||
#define BLOCK_ITEM_SUFFIX ".item"
|
||||
|
|
@ -13,7 +14,9 @@ struct item_funcs_set {
|
|||
};
|
||||
|
||||
enum class item_icon_type {
|
||||
sprite, block,
|
||||
none, // invisible (core:empty) must not be rendered
|
||||
sprite, // textured quad: icon is `atlas_name:texture_name`
|
||||
block, // block preview: icon is string block id
|
||||
};
|
||||
|
||||
class ItemDef {
|
||||
|
|
@ -30,6 +33,7 @@ public:
|
|||
struct {
|
||||
itemid_t id;
|
||||
item_funcs_set funcsset {};
|
||||
UVRegion iconRegion {0, 0, 1, 1};
|
||||
} rt;
|
||||
|
||||
ItemDef(std::string name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue