Changeset 429ac01 in opengl-game


Ignore:
Timestamp:
Mar 7, 2021, 11:13:29 PM (4 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
40eb092
Parents:
5192672
Message:

Remove UnknownEvent since it doesn't add any new fields and add a UI_EVENT_UNHANDLED type to distinguish between UI events I haven't considered handling at all and ones I am aware of, but do not use right now

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • game-gui-sdl.cpp

    r5192672 r429ac01  
    138138         case SDL_TEXTEDITING:
    139139         case SDL_MOUSEWHEEL:
    140             event->type = UI_EVENT_UNKNOWN;
     140            event->type = UI_EVENT_UNHANDLED;
    141141            break;
    142142         default:
  • game-gui.hpp

    r5192672 r429ac01  
    2727   UI_EVENT_MOUSEBUTTONUP,
    2828   UI_EVENT_MOUSEMOTION,
     29   UI_EVENT_UNHANDLED,
    2930   UI_EVENT_UNKNOWN
    3031};
     
    6061};
    6162
    62 struct UnknownEvent {
    63    EventType type;
    64 };
    65 
    6663// TODO: Switch from union to std::variant
    6764
     
    7269   MouseEvent mouse;
    7370   WindowResizeEvent windowResize;
    74    UnknownEvent unknown;
    7571};
    7672
Note: See TracChangeset for help on using the changeset viewer.