mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Scratching out layout
This commit is contained in:
28
source/UI/UI_Elements.h
Normal file
28
source/UI/UI_Elements.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "UI.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;
|
||||
|
||||
void ui_render_element(ElementTypes_t element, screen_arg_t *args);
|
||||
Reference in New Issue
Block a user