Added image UI element.
This commit is contained in:
18
include/dawn/ui/image.h
Normal file
18
include/dawn/ui/image.h
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "../display/primitive.h"
|
||||
|
||||
typedef struct {
|
||||
float x, y;
|
||||
texture_t *texture;
|
||||
primitive_t quad;
|
||||
float u0, v0;
|
||||
float u1, v1;
|
||||
} image_t;
|
@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "frame.h"
|
||||
#include "label.h"
|
||||
#include "menu.h"
|
||||
|
||||
@ -18,7 +19,7 @@ typedef struct {
|
||||
float x, y;
|
||||
char *items[MENULIST_ITEMS_MAX];
|
||||
label_t labels[MENULIST_ITEMS_MAX];
|
||||
frame_t frame;
|
||||
menu_t menu;
|
||||
uint8_t count;
|
||||
uint8_t selected;
|
||||
} menulist_t;
|
Reference in New Issue
Block a user