Files
dusk/src/ui/ui.hpp
Dominic Masters 2e0f5f302b
Some checks failed
Build Dusk / build-linux (push) Failing after 2m7s
Build Dusk / build-psp (push) Failing after 2m19s
Nuke error.hpp
2025-12-22 14:19:07 +10:00

50 lines
1010 B
C++

/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "asset/asset.hpp"
#include "display/texture.hpp"
#include "display/tileset/tileset.hpp"
#include "display/camera.hpp"
typedef struct {
camera_t camera;
texture_t fontTexture;
const tileset_t *fontTileset;
} ui_t;
extern ui_t UI;
/**
* Initializes the UI system, loading necessary resources.
*
* @throws Any exceptions if initialization fails.
*/
void uiInit(void);
/**
* Updates the UI state, handling user interactions and animations.
*/
void uiUpdate(void);
/**
* Renders the UI elements to the screen.
*/
void uiRender(void);
/**
* Sets the font tileset for UI text rendering.
*
* @param fontTileset Pointer to the tileset to use for UI fonts.
* @throws Any exceptions if setting the font fails.
*/
void uiSetFont(const tileset_t *fontTileset);
/**
* Cleans up and frees all UI resources.
*/
void uiDispose(void);