30 lines
532 B
C++
30 lines
532 B
C++
|
|
#include <libsaria/libsaria.h>
|
|
#include <ocarina/button.h>
|
|
|
|
void cb_play()
|
|
{
|
|
print("Ocarina PLAY callback!");
|
|
hide_button_list(PLAY_BUTTON_LIST);
|
|
show_pause_buttons();
|
|
}
|
|
|
|
void cb_pause()
|
|
{
|
|
print("Ocarina PAUSE callback!");
|
|
hide_pause_buttons();
|
|
show_button_list(PLAY_BUTTON_LIST);
|
|
}
|
|
|
|
static void add_callback(callback_t type, void (* func)())
|
|
{
|
|
libsaria_get()->register_callback(type, func);
|
|
}
|
|
|
|
void setup_callbacks()
|
|
{
|
|
print("Ocarina setting up callbacks");
|
|
add_callback(PLAY, cb_play);
|
|
add_callback(PAUSE, cb_pause);
|
|
}
|