PokeMe64/include/core/DragonUtils.h
Philippe Symons 90bb9ccceb
Feature/scroll indication (#3)
Add scroll arrows when there are more items in the list than the list can show at a time.

These arrows can be shown in the main menu (although there aren't enough items in there to have them shown) or in the various DistributionEventPokemonListScene menus.

I also did provisions to support the same for the ScrollWidget in the about screen. Although I haven't implemented that (yet?)
2024-08-22 21:45:31 +02:00

29 lines
604 B
C
Executable File

#ifndef _DRAGONUTILS_H
#define _DRAGONUTILS_H
#include <libdragon.h>
enum class UINavigationDirection
{
UP,
RIGHT,
DOWN,
LEFT,
MAX
};
enum class NavigationInputSourceType
{
NONE,
ANALOG_STICK,
DPAD,
BOTH
};
/**
* This function determines whether the joypad_inputs_t has analog or dpad positions/presses that could be considered for UI navigation.
* If so, it will return the most prominent direction.
*/
const UINavigationDirection determineUINavigationDirection(joypad_inputs_t inputs, NavigationInputSourceType sourceType);
#endif