Menu basically done, grid is a bit buggy but good enough.

This commit is contained in:
2023-01-28 21:28:10 -08:00
parent 9ebd4eb6ad
commit 329383da30
6 changed files with 51 additions and 13 deletions

View File

@ -6,4 +6,10 @@
#pragma once
#include "input/InputManager.hpp"
#define INPUT_BIND_ACCEPT ((inputbind_t)1)
#define dbind(n) ((inputbind_t)n)
#define INPUT_BIND_ACCEPT dbind(1)
#define INPUT_BIND_NEGATIVE_X dbind(2)
#define INPUT_BIND_POSITIVE_X dbind(3)
#define INPUT_BIND_NEGATIVE_Y dbind(4)
#define INPUT_BIND_POSITIVE_Y dbind(5)

View File

@ -55,7 +55,7 @@ void TestUIScene::stage() {
label->setFont(&assetFont->font);
label->setText("test.1");
label->setFontSize(24);
grid->addToGrid(label, x, y, UI_COMPONENT_ALIGN_END, UI_COMPONENT_ALIGN_END);
grid->addToGrid(label, x, y, UI_COMPONENT_ALIGN_MIDDLE, UI_COMPONENT_ALIGN_MIDDLE);
auto menuItem = new TestMenuItem;
menuItem->label = label;