more editor stuff

This commit is contained in:
2026-07-01 15:58:59 -05:00
parent 38b24e1c3d
commit a2d0a12c1a
10 changed files with 3152 additions and 787 deletions
+12 -6
View File
@@ -10,6 +10,7 @@
#include "util/memory.h"
#include "display/spritebatch/spritebatch.h"
#include "display/text/text.h"
#include "display/screen/screen.h"
#include "assert/assert.h"
uisettings_t UI_SETTINGS;
@@ -75,15 +76,20 @@ errorret_t uiSettingsInit(void) {
errorret_t uiSettingsDraw(void) {
if(!uiMenuIsActive(&UI_SETTINGS.menu)) errorOk();
uint8_t rows = UI_SETTINGS_ITEM_COUNT;
const float_t width = 300.0f;
const float_t height = 300.0f;
const float_t x = (float_t)SCREEN.scanX +
((float_t)SCREEN.scanWidth - width) * 0.5f;
const float_t y = (float_t)SCREEN.scanY +
((float_t)SCREEN.scanHeight - height) * 0.5f;
errorChain(uiFrameDraw(0.0f, 0.0f, 300.0f, 300));
errorChain(uiFrameDraw(x, y, width, height));
errorChain(uiMenuDraw(
&UI_SETTINGS.menu,
UI_FRAME_BORDER_WIDTH,
UI_FRAME_BORDER_HEIGHT,
300.0f - (UI_FRAME_BORDER_WIDTH * 2),
300.0f - (UI_FRAME_BORDER_HEIGHT * 2)
x + UI_FRAME_BORDER_WIDTH,
y + UI_FRAME_BORDER_HEIGHT,
width - (UI_FRAME_BORDER_WIDTH * 2),
height - (UI_FRAME_BORDER_HEIGHT * 2)
));
errorChain(spriteBatchFlush());