1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-04 01:29:26 +01:00

[hud] Add method to check whether HUD is empty

This commit is contained in:
Philip Rebohle 2025-01-13 12:37:09 +01:00 committed by Philip Rebohle
parent 5134a4b3c5
commit 8be30d7d5a
2 changed files with 17 additions and 1 deletions

View File

@ -20,7 +20,7 @@ namespace dxvk::hud {
Hud(const Rc<DxvkDevice>& device); Hud(const Rc<DxvkDevice>& device);
~Hud(); ~Hud();
/** /**
* \brief Update HUD * \brief Update HUD
* *
@ -40,6 +40,14 @@ namespace dxvk::hud {
const DxvkContextObjects& ctx, const DxvkContextObjects& ctx,
const Rc<DxvkImageView>& dstView); const Rc<DxvkImageView>& dstView);
/**
* \brief Checks whether the HUD is empty
* \returns \c true if the HUD is empty
*/
bool empty() const {
return m_hudItems.empty();
}
/** /**
* \brief Adds a HUD item if enabled * \brief Adds a HUD item if enabled
* *

View File

@ -82,6 +82,14 @@ namespace dxvk::hud {
const HudOptions& options, const HudOptions& options,
HudRenderer& renderer); HudRenderer& renderer);
/**
* \brief Checks whether the item set is empty
* \returns \c true if there are no items
*/
bool empty() const {
return m_items.empty();
}
/** /**
* \brief Creates a HUD item if enabled * \brief Creates a HUD item if enabled
* *