Commit graph

12 commits

Author SHA1 Message Date
3094a8af13 refactor: Non-breaking refactor
- Everything should work as before
- Added blank submodules in layout
- Added blank submodules in player
- Moved inventory::ui submodule to ui::inventory
- Added blank submodules in ui::inventory
- Re-exported ui::inventory as inventory::ui for temporary compatibility
- Split tests submodules into different files
2026-03-19 12:36:51 +03:00
d65ca6fe97 feat: Implemented crates functionality 2026-03-19 11:24:10 +03:00
3fdfa4a4ad ui: Buggy 'natural' item dragging
- Items are now placed relative to cursor instead of upper left corner
- Bug: after item drop all hovered slots are cleared and you cannot drag
  and drop item right away
2026-03-16 09:44:58 +03:00
337986d2b9 ui: Multiple inventories support
- Added scrollable container for inventories
- Fixed slots being visibly hovered when dragging items
2026-03-13 16:17:44 +03:00
0c8259583a feat: Updated dragged item behavior
- Added Inventory.can_replace
- Added tests for Inventory.can_replace
- Dragged item is now a copy of original item
- Dragged item can be rotated while dragged
2026-03-13 13:42:53 +03:00
beacc28ace ui: Inventory item rotation
- Fixed rotated item position
2026-03-12 13:08:08 +03:00
55c4e3a1d1 ui: Unfinished item rotating 2026-03-12 10:32:55 +03:00
55cbd39172 ui: Visible item dragging
- Also tinting inventory slot on hover
2026-03-12 10:04:35 +03:00
a462c64786 feat: Implemented basic item drag-and-drop
- Added bundle names
- Added system to update bundle names with entity name
2026-03-11 22:40:17 +03:00
0add3e4c20 feat: unfinished item drag and drop 2026-03-11 17:29:27 +03:00
c46fa75e54 feat!: Item processing
- Added try_insert_item system
- Added rotated field on Item
- Implemented UI item drawing with scale and rotation

BREAKING CHANGE: Item.swap_size renamed to Item.rotate
    Item.clone_swapped renamed to Item.clone_rotated
2026-03-11 14:55:27 +03:00
ab993be476 ui: Beginning of UI-related stuff
- UiRoot component
- WindowSize resource and update_window_size system
- UiInventory and UiInventorySlot components
- UiInventory now shows player inventory slots
2026-03-09 13:59:51 +03:00