VMUPro SDK v1.0.0
Application Development SDK for the VMUPro
Loading...
Searching...
No Matches
vmupro_buttons.h File Reference

VMUPro button input API. More...

#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Enumerations

enum  vmupro_btn_t {
  DPad_Up , DPad_Down , DPad_Right , DPad_Left ,
  Btn_Power , Btn_Mode , Btn_A , Btn_B ,
  Btn_Bottom
}
 Predefined button values. More...
 

Functions

void vmupro_btn_read ()
 Call every frame, or when a new dialogue opens to read the button inputs. Press & release actions are automatically tracked.
 
bool vmupro_btn_held (vmupro_btn_t btn)
 Check if a button is currently held.
 
bool vmupro_btn_pressed (vmupro_btn_t btn)
 Check if a button is currently held but was not held last time vmupro_btn_read() was called.
 
bool vmupro_btn_released (vmupro_btn_t btn)
 Check if a button is currently not heldheld but was held last time vmupro_btn_read() was called.
 
bool vmupro_btn_anything_held ()
 Check if any button is currently held/pressed Useful between menus to wait untill the user has finished pressing buttons.
 
bool vmupro_btn_confirm_pressed ()
 Was the user-configurable confirm button (A or B) pressed since the last vmupro_btn_read()
 
bool vmupro_btn_confirm_released ()
 Was the user-configurable confirm button (A or B) released since the last vmupro_btn_read()
 
bool vmupro_btn_dismiss_pressed ()
 Was the user-configurable dismiss button (A or B) pressed since the last vmupro_btn_read()
 
bool vmupro_btn_dismiss_released ()
 Was the user-configurable dismiss button (A or B) released since the last vmupro_btn_read()
 

Detailed Description

VMUPro button input API.

This header provides the API to read and update button inputs. It includes functions to read user-configurable confirm/dismiss inputs, and functions to automatically track press/release/held states

Author
8BitMods
Version
1.0.0
Date
2025-06-24

Definition in file vmupro_buttons.h.

Enumeration Type Documentation

◆ vmupro_btn_t

Predefined button values.

Enumerator
DPad_Up 
DPad_Down 
DPad_Right 
DPad_Left 
Btn_Power 
Btn_Mode 
Btn_A 
Btn_B 
Btn_Bottom 

Definition at line 26 of file vmupro_buttons.h.

Function Documentation

◆ vmupro_btn_anything_held()

bool vmupro_btn_anything_held ( )

Check if any button is currently held/pressed Useful between menus to wait untill the user has finished pressing buttons.

◆ vmupro_btn_confirm_pressed()

bool vmupro_btn_confirm_pressed ( )

Was the user-configurable confirm button (A or B) pressed since the last vmupro_btn_read()

◆ vmupro_btn_confirm_released()

bool vmupro_btn_confirm_released ( )

Was the user-configurable confirm button (A or B) released since the last vmupro_btn_read()

◆ vmupro_btn_dismiss_pressed()

bool vmupro_btn_dismiss_pressed ( )

Was the user-configurable dismiss button (A or B) pressed since the last vmupro_btn_read()

◆ vmupro_btn_dismiss_released()

bool vmupro_btn_dismiss_released ( )

Was the user-configurable dismiss button (A or B) released since the last vmupro_btn_read()

◆ vmupro_btn_held()

bool vmupro_btn_held ( vmupro_btn_t  btn)

Check if a button is currently held.

Parameters
Thebutton to check

◆ vmupro_btn_pressed()

bool vmupro_btn_pressed ( vmupro_btn_t  btn)

Check if a button is currently held but was not held last time vmupro_btn_read() was called.

Parameters
Thebutton to check

◆ vmupro_btn_read()

void vmupro_btn_read ( )

Call every frame, or when a new dialogue opens to read the button inputs. Press & release actions are automatically tracked.

◆ vmupro_btn_released()

bool vmupro_btn_released ( vmupro_btn_t  btn)

Check if a button is currently not heldheld but was held last time vmupro_btn_read() was called.

Parameters
Thebutton to check