Added frame to the VN Textbox

This commit is contained in:
2021-08-12 08:56:34 -07:00
parent 7229981177
commit 5a12682f9b
15 changed files with 55 additions and 50 deletions

View File

@ -11,10 +11,11 @@
#include "../display/gui/font.h"
#define FRAME_BORDER_SIZE 16
#define FRAME_BORDER_SIZE_FULL FRAME_BORDER_SIZE * 2
#define FRAME_PRIMITIVE_COUNT 9
typedef struct {
float x, y, z;
float x, y;
texture_t *texture;
primitive_t primitive;
} frame_t;

View File

@ -9,6 +9,7 @@
#include "../libs.h"
#include "../display/animation/timeline.h"
#include "../display/gui/font.h"
#include "../ui/frame.h"
/** Amount of characters scrolled, per second */
#define VN_TEXTBOX_SCROLL_SPEED 60
@ -43,9 +44,8 @@ typedef struct {
/** Primitive to hold talking text */
primitive_t primitive;
// Testing assets
primitive_t testPrimitive;
texture_t testTexture;
/** The frame for the textbox */
frame_t frame;
/** Current spoken text, tracked in-case of re-render */
char *text;