FPS
This commit is contained in:
22
src/ui/ui.h
22
src/ui/ui.h
@@ -7,17 +7,26 @@
|
||||
|
||||
#pragma once
|
||||
#include "dusk.h"
|
||||
#include "asset/assetmanager.h"
|
||||
#include "display/tileset/tileset.h"
|
||||
#include "display/camera.h"
|
||||
|
||||
typedef struct {
|
||||
int32_t nothing;
|
||||
camera_t camera;
|
||||
|
||||
ref_t fontRef;
|
||||
asset_t *font;
|
||||
const tileset_t *fontTileset;
|
||||
} ui_t;
|
||||
|
||||
extern ui_t UI;
|
||||
|
||||
/**
|
||||
* Initializes the UI system, loading necessary resources.
|
||||
*
|
||||
* @return An errorret_t indicating success or failure.
|
||||
*/
|
||||
void uiInit(void);
|
||||
errorret_t uiInit(void);
|
||||
|
||||
/**
|
||||
* Updates the UI state, handling user interactions and animations.
|
||||
@@ -29,6 +38,15 @@ void uiUpdate(void);
|
||||
*/
|
||||
void uiRender(void);
|
||||
|
||||
/**
|
||||
* Sets the font tileset for UI text rendering.
|
||||
*
|
||||
* @param fontTileset Pointer to the tileset to use for UI fonts.
|
||||
*
|
||||
* @return An errorret_t indicating success or failure.
|
||||
*/
|
||||
errorret_t uiSetFont(const tileset_t *fontTileset);
|
||||
|
||||
/**
|
||||
* Cleans up and frees all UI resources.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user