35 lines
779 B
C
35 lines
779 B
C
//
|
|
// Created by william on 1/7/24.
|
|
//
|
|
|
|
#ifndef NESEMULATOR_DIALOG_H
|
|
#define NESEMULATOR_DIALOG_H
|
|
|
|
#include <panel.h>
|
|
#include "../include/types.h"
|
|
|
|
typedef struct dialog {
|
|
PANEL *panel;
|
|
} Dialog;
|
|
|
|
/**
|
|
* Creates a dialog box and present it to the user.
|
|
*
|
|
* @param message The message to show in the dialog
|
|
* @return The dialog instance
|
|
*/
|
|
Dialog dialog_create(char *message);
|
|
|
|
/**
|
|
* Gets the address typed by the user. Will block until the input has been confirmed by them.
|
|
*
|
|
* @param dialog A pointer to the dialog
|
|
* @param cancelled A boolean indicating if the user has cancelled its input
|
|
* @return The address typed by the user
|
|
*/
|
|
address dialog_get_address(Dialog *dialog, bool *cancelled);
|
|
|
|
void dialog_remove(Dialog *dialog);
|
|
|
|
#endif //NESEMULATOR_DIALOG_H
|