Add inventory.
All checks were successful
Build Dusk / run-tests (push) Successful in 2m12s
Build Dusk / build-linux (push) Successful in 1m49s
Build Dusk / build-psp (push) Successful in 1m52s

This commit is contained in:
2026-01-06 07:47:16 -06:00
parent 024ace1078
commit af5bf987c8
91 changed files with 1108 additions and 139 deletions

View File

@@ -8,38 +8,38 @@
#include "uitextbox.h"
#include "ui/ui.h"
#include "ui/uitext.h"
#include "rpg/rpgtextbox.h"
// #include "rpg/rpgtextbox.h"
#include "display/screen.h"
#include "display/spritebatch.h"
#include "input/input.h"
void uiTextboxUpdate() {
if(!rpgTextboxIsVisible()) return;
// void uiTextboxUpdate() {
// if(!rpgTextboxIsVisible()) return;
if(inputPressed(INPUT_ACTION_ACCEPT)) {
rpgTextboxHide();
}
}
// if(inputPressed(INPUT_ACTION_ACCEPT)) {
// rpgTextboxHide();
// }
// }
void uiTextboxRender() {
if(!rpgTextboxIsVisible()) return;
// void uiTextboxRender() {
// if(!rpgTextboxIsVisible()) return;
const char_t *text = RPG_TEXTBOX.text;
int32_t textWidth, textHeight;
// const char_t *text = RPG_TEXTBOX.text;
// int32_t textWidth, textHeight;
uiTextMeasure(text, UI.fontTileset, &textWidth, &textHeight);
// uiTextMeasure(text, UI.fontTileset, &textWidth, &textHeight);
float_t y = 0;
if(RPG_TEXTBOX.position == RPG_TEXTBOX_POS_BOTTOM) {
y = SCREEN.height - (float_t)textHeight;
}
// float_t y = 0;
// if(RPG_TEXTBOX.position == RPG_TEXTBOX_POS_BOTTOM) {
// y = SCREEN.height - (float_t)textHeight;
// }
spriteBatchPush(
NULL,
0.0f, y,
(float_t)SCREEN.width, (float_t)(y + textHeight),
COLOR_BLACK,
0.0f, 0.0f, 1.0f, 1.0f
);
uiTextDraw(0, y, text, COLOR_RED, UI.fontTileset, &UI.fontTexture);
}
// spriteBatchPush(
// NULL,
// 0.0f, y,
// (float_t)SCREEN.width, (float_t)(y + textHeight),
// COLOR_BLACK,
// 0.0f, 0.0f, 1.0f, 1.0f
// );
// uiTextDraw(0, y, text, COLOR_RED, UI.fontTileset, &UI.fontTexture);
// }