Input: refactoring, platform agnostic key configuration.
Update input usage across project. Minor queue usage fixes and tick timings. (#330)
This commit is contained in:
@@ -55,19 +55,19 @@ void menu_event_input_callback(InputEvent* input_event, void* context) {
|
||||
MenuEvent* menu_event = context;
|
||||
MenuMessage message;
|
||||
|
||||
if(!input_event->state) return;
|
||||
if(input_event->type != InputTypeShort) return;
|
||||
|
||||
if(input_event->input == InputUp) {
|
||||
if(input_event->key == InputKeyUp) {
|
||||
message.type = MenuMessageTypeUp;
|
||||
} else if(input_event->input == InputDown) {
|
||||
} else if(input_event->key == InputKeyDown) {
|
||||
message.type = MenuMessageTypeDown;
|
||||
} else if(input_event->input == InputRight) {
|
||||
} else if(input_event->key == InputKeyRight) {
|
||||
message.type = MenuMessageTypeRight;
|
||||
} else if(input_event->input == InputLeft) {
|
||||
} else if(input_event->key == InputKeyLeft) {
|
||||
message.type = MenuMessageTypeLeft;
|
||||
} else if(input_event->input == InputOk) {
|
||||
} else if(input_event->key == InputKeyOk) {
|
||||
message.type = MenuMessageTypeOk;
|
||||
} else if(input_event->input == InputBack) {
|
||||
} else if(input_event->key == InputKeyBack) {
|
||||
message.type = MenuMessageTypeBack;
|
||||
} else {
|
||||
message.type = MenuMessageTypeUnknown;
|
||||
|
Reference in New Issue
Block a user