mirror of
https://github.com/OpenSolo/OpenSolo.git
synced 2025-04-30 06:34:38 +02:00
16 lines
440 B
C++
16 lines
440 B
C++
#include <iostream>
|
|
#include <iomanip>
|
|
#include "ButtonEventMessage.h"
|
|
|
|
using namespace std;
|
|
|
|
// Send a ButtonEventMessage to a stream in a friendly format.
|
|
ostream &operator<<(ostream &os, const struct ButtonEventMessage &msg)
|
|
{
|
|
os << "timestamp=" << msg.timestamp;
|
|
os << " id=" << msg.idName();
|
|
os << " event=" << msg.eventName();
|
|
os << " allButtons=" << setfill('0') << setw(4) << hex << msg.allButtons;
|
|
return os;
|
|
}
|