C -> CPP
This commit is contained in:
51
src/ui/ui.hpp
Normal file
51
src/ui/ui.hpp
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @return An errorret_t indicating success or failure.
|
||||
*/
|
||||
errorret_t 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.
|
||||
*
|
||||
* @return An errorret_t indicating success or failure.
|
||||
*/
|
||||
errorret_t uiSetFont(const tileset_t *fontTileset);
|
||||
|
||||
/**
|
||||
* Cleans up and frees all UI resources.
|
||||
*/
|
||||
void uiDispose(void);
|
||||
Reference in New Issue
Block a user