Added font sizing, needs full testing
This commit is contained in:
@ -42,6 +42,7 @@
|
||||
#include "game/poker/pokergame.h"
|
||||
#include "game/poker/pokerdiscussion.h"
|
||||
#include "game/poker/pokergameassets.h"
|
||||
#include "game/poker/pokerui.h"
|
||||
|
||||
// Player Input
|
||||
#include "input/input.h"
|
||||
@ -57,6 +58,9 @@
|
||||
#include "poker/poker.h"
|
||||
#include "poker/winner.h"
|
||||
|
||||
// User Interface Objects
|
||||
#include "ui/label.h"
|
||||
|
||||
// Utility Objects
|
||||
#include "util/array.h"
|
||||
#include "util/list.h"
|
||||
|
@ -24,8 +24,11 @@
|
||||
/** Refer to STBTT docs for OpenGL Fill Mode v d3d Fill Modes */
|
||||
#define FONT_FILL_MODE 1
|
||||
|
||||
/** Passed to STBTT for scaling the font nicely, essentially the font size. */
|
||||
#define FONT_TEXTURE_SIZE 32
|
||||
/** Passed to STBTT for scaling the font, essentially the font resolution */
|
||||
#define FONT_TEXTURE_SIZE 64
|
||||
|
||||
/** Default Font Size (on which all font scales are based) */
|
||||
#define FONT_SIZE_DEFAULT (FONT_TEXTURE_SIZE / 2)
|
||||
|
||||
// Chars
|
||||
#define FONT_NEWLINE '\n'
|
||||
|
@ -9,5 +9,5 @@
|
||||
#include "../../libs.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
int32_t INeedSomePropertyToStopCompilerComplaining;
|
||||
} dawngame_t;
|
14
include/dawn/game/poker/pokerui.h
Normal file
14
include/dawn/game/poker/pokerui.h
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../../libs.h"
|
||||
#include "../../ui/label.h"
|
||||
|
||||
typedef struct {
|
||||
label_t labelTest;
|
||||
} pokerui_t;
|
@ -11,4 +11,4 @@
|
||||
#define SETTING_GAME_DAWN 2
|
||||
|
||||
// Settings
|
||||
#define SETTING_GAME SETTING_GAME_DAWN
|
||||
#define SETTING_GAME SETTING_GAME_POKER
|
20
include/dawn/ui/label.h
Normal file
20
include/dawn/ui/label.h
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Copyright (c) 2021 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "../libs.h"
|
||||
#include "../display/primitive.h"
|
||||
#include "../display/gui/font.h"
|
||||
|
||||
/** Representation of a Label UI Element */
|
||||
typedef struct {
|
||||
font_t *font;
|
||||
float x, y, z;
|
||||
float fontSize;
|
||||
fonttextinfo_t info;
|
||||
primitive_t primitive;
|
||||
} label_t;
|
@ -13,6 +13,8 @@
|
||||
/** Amount of characters scrolled, per second */
|
||||
#define VN_TEXTBOX_SCROLL_SPEED 60
|
||||
|
||||
#define VN_TEXTBOX_FONT_SIZE 16.0
|
||||
|
||||
#define VN_TEXTBOX_STATE_CLOSED 0x01
|
||||
|
||||
typedef struct {
|
||||
|
Reference in New Issue
Block a user