mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
working
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* text_descriptor.h :+: :+: :+: */
|
||||
/* TextDescriptor.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/11 00:13:34 by maldavid #+# #+# */
|
||||
/* Updated: 2024/03/25 19:08:11 by maldavid ### ########.fr */
|
||||
/* Updated: 2024/03/28 22:25:09 by maldavid ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef __MLX_TEXT_DESCRIPTOR__
|
||||
#define __MLX_TEXT_DESCRIPTOR__
|
||||
|
||||
#include <utils/combine_hash.h>
|
||||
#include <renderer/core/drawable_resource.h>
|
||||
#include <renderer/texts/text_library.h>
|
||||
#include <renderer/texts/font_library.h>
|
||||
#include <Utils/CombineHash.h>
|
||||
#include <Renderer/Core/DrawableResource.h>
|
||||
#include <Renderer/Texts/TextLibrary.h>
|
||||
#include <Renderer/Texts/FontLibrary.h>
|
||||
|
||||
namespace mlx
|
||||
{
|
||||
@@ -33,15 +33,15 @@ namespace mlx
|
||||
public:
|
||||
TextDrawDescriptor(std::string text, std::uint32_t _color, int _x, int _y);
|
||||
|
||||
void init(FontID font) noexcept;
|
||||
bool operator==(const TextDrawDescriptor& rhs) const { return _text == rhs._text && x == rhs.x && y == rhs.y && color == rhs.color; }
|
||||
void render(std::array<VkDescriptorSet, 2>& sets, Renderer& renderer) override;
|
||||
void resetUpdate() override;
|
||||
void Init(FontID font) noexcept;
|
||||
bool operator==(const TextDrawDescriptor& rhs) const { return m_text == rhs.m_text && x == rhs.x && y == rhs.y && color == rhs.color; }
|
||||
void Render(std::array<VkDescriptorSet, 2>& sets, Renderer& renderer) override;
|
||||
void ResetUpdate() override;
|
||||
|
||||
TextDrawDescriptor() = default;
|
||||
|
||||
private:
|
||||
std::string _text;
|
||||
std::string m_text;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace std
|
||||
std::size_t operator()(const mlx::TextDrawDescriptor& d) const noexcept
|
||||
{
|
||||
std::size_t hash = 0;
|
||||
mlx::hashCombine(hash, d.x, d.y, d.color, d._text);
|
||||
mlx::HashCombine(hash, d.x, d.y, d.color, d.m_text);
|
||||
return hash;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user