Files
dusk/archive/ui/uiframe.h
Dominic Masters 053778a502
Some checks failed
Build Dusk / run-tests (push) Failing after 1m23s
Build Dusk / build-linux (push) Failing after 1m47s
Build Dusk / build-psp (push) Failing after 1m41s
Refactored and simplified lua stuff a lot.
2026-02-01 21:28:21 -06:00

61 lines
1.8 KiB
C

/**
* Copyright (c) 2025 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "display/tileset/tileset.h"
#include "display/texture.h"
/**
* Draw a UI Frame (using the 9-slice technique).
*
* @param x The x position to draw the frame at.
* @param y The y position to draw the frame at.
* @param width The width of the frame.
* @param height The height of the frame.
* @param tileset The tileset to use for rendering the frame.
* @param column The column in the tileset to use for the frame.
* @param row The row in the tileset to use for the frame.
* @param drawInner Whether to draw the inner area.
* @param texture The texture associated with the tileset.
*/
void uiFrameDraw(
const float_t x,
const float_t y,
const float_t width,
const float_t height,
const tileset_t *tileset,
const uint16_t column,
const uint16_t row,
const bool_t drawInner,
texture_t *texture
);
/**
* Draw a tiled UI Frame (using the 9-slice technique). This will tile the
* center components to allow them to repeat without distortion.
*
* @param x The x position to draw the frame at.
* @param y The y position to draw the frame at.
* @param width The width of the frame.
* @param height The height of the frame.
* @param tileset The tileset to use for rendering the frame.
* @param column The column in the tileset to use for the frame.
* @param row The row in the tileset to use for the frame.
* @param drawInner Whether to draw the inner tiled area.
* @param texture The texture associated with the tileset.
*/
void uiFrameDrawTiled(
const float_t x,
const float_t y,
const float_t width,
const float_t height,
const tileset_t *tileset,
const uint16_t column,
const uint16_t row,
const bool_t drawInner,
texture_t *texture
);