You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
771 B
26 lines
771 B
5 years ago
|
#include <malloc.h>
|
||
|
#include <string.h>
|
||
|
#include "liquid.h"
|
||
|
|
||
|
#include "scenes.h"
|
||
|
#include "scene_menu.h"
|
||
|
|
||
|
static struct SceneEvent onSelect(struct MenuScene *self) {
|
||
|
return SceneEvent_Close(0, NULL);
|
||
|
}
|
||
|
|
||
|
struct Scene *NewScene_PopupTest() {
|
||
|
struct MenuItem *items = calloc(5, sizeof(struct MenuItem));
|
||
|
|
||
|
strncpy(items[0].label, "Item 1", MENUITEM_LABEL_LEN);
|
||
|
strncpy(items[1].label, "Item Two", MENUITEM_LABEL_LEN);
|
||
|
strncpy(items[2].label, "Item Three hereee", MENUITEM_LABEL_LEN);
|
||
|
strncpy(items[3].label, "FOURTH", MENUITEM_LABEL_LEN);
|
||
|
strncpy(items[4].label, "EXTRA SECRET FIFTH ITEM", MENUITEM_LABEL_LEN);
|
||
|
|
||
|
struct MenuScene * scene = NewScene_PopupMenu(items, 5);
|
||
|
scene->onSelect = onSelect;
|
||
|
|
||
|
return (struct Scene *) scene;
|
||
|
}
|