nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::BagWindow Class Reference

#include <bag_window.h>

Public Member Functions

 BagWindow (ItemTable items)
bool * mutable_visible ()
bool visible () const
void Toggle ()
std::optional< protocol::ItemAction > Build (const protocol::Inventory &bag, const protocol::TradeSide &offered={})
 What's offered in a trade stays in its slot until the trade's over.

Detailed Description

The bag, in a window of its own, which I opens and closes. An item dragged out of it, or off the player, and let go of over nothing is thrown away, once the player says so. Build it each frame, open or not, so that it sees an item let go of from what's worn too.

Definition at line 58 of file bag_window.h.

Constructor & Destructor Documentation

◆ BagWindow()

nanommo::BagWindow::BagWindow ( ItemTable items)
inlineexplicit

Definition at line 60 of file bag_window.h.

Member Function Documentation

◆ Build()

std::optional< protocol::ItemAction > nanommo::BagWindow::Build ( const protocol::Inventory & bag,
const protocol::TradeSide & offered = {} )

What's offered in a trade stays in its slot until the trade's over.

Definition at line 406 of file bag_window.cc.

◆ mutable_visible()

bool * nanommo::BagWindow::mutable_visible ( )
inline

Definition at line 62 of file bag_window.h.

◆ Toggle()

void nanommo::BagWindow::Toggle ( )
inline

Definition at line 64 of file bag_window.h.

◆ visible()

bool nanommo::BagWindow::visible ( ) const
inline

Definition at line 63 of file bag_window.h.


The documentation for this class was generated from the following files: