From 5753cc661a4a690ec3dd35eaf6d6a5962e1c87c6 Mon Sep 17 00:00:00 2001 From: David Madison Date: Thu, 25 Mar 2021 19:20:05 -0400 Subject: [PATCH] Reorganized ButtonEnum list Trying to form a more logical order based on how these are used. --- controllerEnums.h | 129 ++++++++++++++++++++++++++-------------------- 1 file changed, 73 insertions(+), 56 deletions(-) diff --git a/controllerEnums.h b/controllerEnums.h index cda84253..22c1043a 100644 --- a/controllerEnums.h +++ b/controllerEnums.h @@ -77,7 +77,7 @@ enum RumbleEnum { /** This enum is used to read all the different buttons on the different controllers */ enum ButtonEnum { /**@{*/ - /** These buttons are available on all the the controllers */ + /** Directional Pad Buttons - available on most controllers */ UP = 0, RIGHT = 1, DOWN = 2, @@ -85,71 +85,32 @@ enum ButtonEnum { /**@}*/ /**@{*/ - /** Wii buttons */ - PLUS, - TWO, - ONE, - MINUS, - HOME, - Z, - C, - B, - A, - /**@}*/ - - /**@{*/ - /** These are only available on the Wii U Pro Controller */ - L, - R, - ZL, - ZR, - /**@}*/ - - /**@{*/ - /** PS3 controllers buttons */ - SELECT, - START, - L3, - R3, - - L2, - R2, - L1, - R1, + /** Playstation buttons */ TRIANGLE, CIRCLE, CROSS, SQUARE, - PS, + SELECT, + START, + L3, + R3, + + L1, + R1, + L2, + R2, + + PS, + /**@}*/ + + /**@{*/ + /** PS3 Move Controller */ MOVE, // Covers 12 bits - we only need to read the top 8 T, // Covers 12 bits - we only need to read the top 8 /**@}*/ - /** PS4 controllers buttons - SHARE and OPTIONS are present instead of SELECT and START */ - SHARE, - OPTIONS, - TOUCHPAD, - /**@}*/ - - /**@{*/ - /** Xbox buttons */ - BACK, - X, - Y, - XBOX, - SYNC, - BLACK, // Available on the original Xbox controller - WHITE, // Available on the original Xbox controller - /**@}*/ - - /**@{*/ - /** Xbox One S buttons */ - VIEW, - MENU, - /**@}*/ - /**@{*/ /** PS Buzz controllers */ RED, @@ -159,11 +120,67 @@ enum ButtonEnum { BLUE, /**@}*/ + /**@{*/ + /** PS4 buttons - SHARE and OPTIONS are present instead of SELECT and START */ + SHARE, + OPTIONS, + TOUCHPAD, + /**@}*/ + /**@{*/ /** PS5 buttons */ CREATE, MICROPHONE, /**@}*/ + + /**@{*/ + /** Xbox buttons */ + A, + B, + X, + Y, + + BACK, + // START, // listed under Playstation buttons + + // L1, // listed under Playstation buttons + // R1, // listed under Playstation buttons + // L2, // listed under Playstation buttons + // R2, // listed under Playstation buttons + + XBOX, + SYNC, + + BLACK, // Available on the original Xbox controller + WHITE, // Available on the original Xbox controller + /**@}*/ + + /**@{*/ + /** Xbox One S buttons */ + VIEW, + MENU, + /**@}*/ + + /**@{*/ + /** Wii buttons */ + PLUS, + TWO, + ONE, + MINUS, + HOME, + Z, + C, + // B, // listed under Xbox buttons + // A, // listed under Xbox buttons + /**@}*/ + + /**@{*/ + /** Wii U Pro Controller */ + L, + R, + ZL, + ZR, + /**@}*/ }; inline uint8_t legacyButtonValues(ButtonEnum key) {