mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 12:44:02 +00:00
COMMON: Remove TODO from struct Event
I moved this TODO to the Wiki TODO page and extended it there. Yet while I originally wrote it, I now think that we are probably best off keeping things as they are.
This commit is contained in:
parent
649a5adb10
commit
4172414e35
@ -81,30 +81,6 @@ enum EventType {
|
||||
/**
|
||||
* Data structure for an event. A pointer to an instance of Event
|
||||
* can be passed to pollEvent.
|
||||
* @todo Rework/document this structure. It should be made 100% clear which
|
||||
* field is valid for which event type.
|
||||
* Implementation wise, we might want to use the classic
|
||||
* union-of-structs trick. It goes roughly like this:
|
||||
* struct BasicEvent {
|
||||
* EventType type;
|
||||
* };
|
||||
* struct MouseMovedEvent : BasicEvent {
|
||||
* Common::Point pos;
|
||||
* };
|
||||
* struct MouseButtonEvent : MouseMovedEvent {
|
||||
* int button;
|
||||
* };
|
||||
* struct KeyEvent : BasicEvent {
|
||||
* ...
|
||||
* };
|
||||
* ...
|
||||
* union Event {
|
||||
* EventType type;
|
||||
* MouseMovedEvent mouse;
|
||||
* MouseButtonEvent button;
|
||||
* KeyEvent key;
|
||||
* ...
|
||||
* };
|
||||
*/
|
||||
struct Event {
|
||||
/** The type of the event. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user