2D_Game_Engine
Loading...
Searching...
No Matches
src
textqueue.cpp
Go to the documentation of this file.
1
#include <pch.hpp>
2
#include <
textqueue.hpp
>
3
4
void
TextQueue::Push
(
TextRenderer
*renderer,
const
std::string &text,
float
x,
float
y,
float
scale,
Vec3
color,
int
layer){
5
m_TextQueue.push({renderer,text,x,y,scale,color,layer});
6
}
7
8
void
TextQueue::Render
(
int
layer){
9
while
(!m_TextQueue.empty() && (m_TextQueue.top().layer!=std::numeric_limits<int>::max()-1 || layer==std::numeric_limits<int>::max()-1) && m_TextQueue.top().layer<=layer){
10
auto
&
data
=m_TextQueue.top();
11
data
.renderer->_DrawText(
data
.text,
data
.x,
data
.y,
data
.scale,
data
.color);
12
m_TextQueue.pop();
13
}
14
}
TextQueue::Render
void Render(int layer)
Definition
textqueue.cpp:8
TextQueue::Push
void Push(TextRenderer *renderer, const std::string &text, float x, float y, float scale, Vec3 color, int layer)
Definition
textqueue.cpp:4
TextRenderer
Definition
textrenderer.hpp:14
data
YAML::Node data
Definition
sceneserializer.cpp:405
Vec3
Definition
structs.hpp:16
textqueue.hpp
Generated by
1.10.0