The programmatic element facilitates picking up, collecting, and dropping items. The control element displays and offers relevant options.
Item pickup is initiated by MoveToDestination.gd/_on_item_arrived(floor_item) -> floor_item.pick_up().pick_up(). The base item's pick_up initiates character/pickup(base_item) and publishes "item_picked_up" and itself to the MessageBus.
character.gd/pickup(base_item) calls (programmatic)Inventory.gd/pickup and _pickup(base_item) which updates the phone inv app if it's currently open.
Inventory.gd/pickup(base_item) published "item_obtained" and the base item to the MessageBus then calls reverse_pickpocket(base_item).
Inventory.gd/reverse_pickpocket(base_item) appends the base item to the inventory and connects the depleted and dropped signals.
If you press the inventory key (I), UI/open_window(UI.open_inv_scene(),"inventory", Vector2(100,150)) is called. It opens a window at the Vector2, assigns "inventory" as its key, and fills it with the given scene. The UI will call open_app and provide the inventory app scene.
If you bring up the smartphone and tap the inventory app from the home screen, the inventory button is connected to 'open_app" on "pressed", sending the associated app.
Smartphone.gd/open_app(scene) sets is_open to true, the current_app to the scene,