Prism

Prism

  • Docs
  • API

›API

API

  • App structure
  • Graphics
  • DateTime
  • Timer
  • Buttons
  • Http

Buttons

Buttons object can be used to check for user keypresses.
Prism OS uses a directional pad with select button as the main input method.
Although it can run on devices with various kinds of physical input options, from devices with full directional pad to once with no physical directional pad.
Even if any directional input or select input is missing physically from the device, the mobile app has a Remote option that provides the complete directional pad with select button.
Prism allows for apps to be developed without worrying about the input options on the device as it will gracefully handle all these variations.

Import it using:

#include <prism/buttons.hpp>

The following methods are available on the Buttons object:

  1. leftPressed:
bool leftPressed(void)

Returns true if left button is pressed, else false.

  1. rightPressed:
bool rightPressed(void)

Returns true if right button is pressed, else false.

  1. upPressed:
bool upPressed(void)

Returns true if up button is pressed, else false.

  1. downPressed:
bool downPressed(void)

Returns true if down button is pressed, else false.

  1. enterPressed:
bool enterPressed(void)

Returns true if select button is pressed, else false.

← TimerHttp →
Prism
Docs
Getting StartedGuidesAPI Reference
Community
Stack OverflowProject ChatTwitter
More
GitHubStar
Follow @prism_os
Copyright © 2023 Prism