1
0
forked from me/IronOS
Files
IronOS/source/UI/UI_Elements.h
2023-06-29 20:26:00 +10:00

27 lines
859 B
C

#pragma once
#include <stdint.h>
typedef enum {
Text, // Basic text splat, using re-encoded strings
Number, // Draws numbers using best size for the height (always one line)
Image, // Pre-rendered bitmap that can be memcpy'ed in
PowerSource, // Draws a battery icon, or text for voltage, or DC power plug
Temperature, // Draws the number with temperature symbol following (height picks font)
InputVoltage, // Draws the number with V following and also 1 dp(height picks font)
ScrollBar, // Draws a vertical scrollbar, number sets percentage 0-100
CheckBox, // Draws checkbox, ticked = number!=0
TextScroller, // Renders text, scrolling with time
} ElementTypes_t;
typedef struct {
struct {
uint8_t x;
uint8_t y;
} position;
struct {
uint8_t w;
uint8_t h;
} size;
} ElementSettings_t;