Added grid cell alignment

This commit is contained in:
2021-09-12 20:32:30 -07:00
parent 8d69d12728
commit 8d4df83473
8 changed files with 199 additions and 42 deletions

View File

@ -12,6 +12,10 @@
#include "../../../display/framebuffer.h"
#include "../../../display/camera.h"
#include "../../../ui/grid.h"
#include "../../../ui/align.h"
#define POKER_PLAYER_UI_IMAGE_SIZE 64
#define POKER_PLAYER_UI_IMAGE_RESOLUTION POKER_PLAYER_UI_IMAGE_SIZE * 2
#define POKER_PLAYER_UI_IMAGE_DIST 0.8f
@ -20,7 +24,9 @@
#define POKER_PLAYER_UI_CHIPS_ANIMATION_SPEED 0.5f
typedef struct {
label_t label;
framebuffer_t frame;
primitive_t quad;
label_t label;
grid_t grid;
} pokerplayerui_t;

View File

@ -64,6 +64,8 @@ typedef struct {
/** Internal size reference, used for caching resize events */
float width;
float height;
float x;
float y;
/** Pointer to any custom user data */
void *user;