ALLEGRO_GAMEPAD_STICK(3alleg5)

๐Ÿ“ฆ version 5.2.11.3, in ubuntu resolute, ubuntu stonking

โœจ ALLEGRO_GAMEPAD_STICK โœจ

okay bestie, so this is a page straight out of the Allegro 5 API โ€” that's the manual name, that's the whole vibe, and this little enum is what tells you which stick on a gamepad we're talking about. controller anatomy time, let's go ๐Ÿ’…


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

#include <allegro5/allegro.h>

typedef enum ALLEGRO_GAMEPAD_STICK

literally just an enum, no cap. the whole thing is a list of names for the squishy bits you push around ๐Ÿ•น๏ธ


๐ŸŒธ DESCRIPTION ๐ŸŒธ

so here's the roster of sticks, and the way that each one maps to axes and flags is important, so pay attention bestie:

  • ALLEGRO_GAMEPAD_STICK_DPAD โ€” the D-pad stick ๐ŸŽฏ it's got the ALLEGRO_JOYFLAG_DIGITAL set on it, and it rocks two axes. yeah, it's technically called a "stick" here, don't fight it.
  • ALLEGRO_GAMEPAD_STICK_LEFT_THUMB โ€” left thumb stick ๐Ÿ‘ the one your left thumb lives on. two axes.
  • ALLEGRO_GAMEPAD_STICK_RIGHT_THUMB โ€” right thumb stick ๐Ÿ‘‰ the one your right thumb lives on. two axes as well.
  • ALLEGRO_GAMEPAD_STICK_LEFT_TRIGGER โ€” left trigger ๐Ÿซฒ just one axis, and it ranges from 0 to 1. so like, not pressed to fully pressed.
  • ALLEGRO_GAMEPAD_STICK_RIGHT_TRIGGER โ€” right trigger ๐Ÿซฑ also one axis, also ranging from 0 to 1. twin behavior, iconic.

โญ SINCE โญ

5.2.11 โ€” so it's been around a minute, but not forever. iykyk.


๐Ÿ’– SEE ALSO ๐Ÿ’–

๐Ÿ’€ heads up, bestie: [Unstable API]: New API. so like, it works, it slays, but the interface could still shift. go in knowing that, fr fr.

that's the whole page! from the Allegro reference manual, filed under ALLEGRO_GAMEPAD_STICK(3alleg5), version 5.2.11 energy. go map some controllers, main character ๐Ÿ’œ๐ŸŽฎ

๐Ÿ“ฆ where this page comes from