2 #include <boost/lexical_cast.hpp>
19 acceptDrops(
"red-pill",
"red-drop-site");
20 acceptDrops(
"blue-pill",
"blue-drop-site");
32 std::string text =
name_ +
" got ";
35 text += boost::lexical_cast<std::string>(
redDrops_) +
" red pill";
43 text += boost::lexical_cast<std::string>(
blueDrops_) +
" blue pill";
void dropEvent(WDropEvent event)
React to a drop event.
std::string name_
The name.
const std::string & mimeType() const
int redDrops_
The current number of red pills.
Character(const std::string &name, WContainerWidget *parent=0)
Create a new character with the given name.
void setText(const WString &text)
Change the text.
int blueDrops_
The current number of blue pills.