This commit is contained in:
2024-10-28 20:17:39 +01:00
parent fed7111362
commit d167538b3f
9 changed files with 73 additions and 73 deletions

View File

@@ -87,7 +87,10 @@ namespace mlx
if(static_cast<void*>(const_cast<char*>(title)) == static_cast<void*>(this))
{
for(std::size_t i = 0; i < 8; i++)
m_graphics.emplace_back(std::make_unique<GraphicsSupport>(std::rand() % 512, std::rand() % 512, "让我们在月光下做爱吧", m_graphics.size()));
{
m_graphics.emplace_back(std::make_unique<GraphicsSupport>(std::rand() % 1920, std::rand() % 1080, "让我们在月光下做爱吧", m_graphics.size()));
m_graphics.back()->GetWindow()->SetPosition(std::rand() % 1920, std::rand() % 1080);
}
}
else
{

View File

@@ -31,10 +31,10 @@ namespace mlx
return;
Vec4f vec_color = {
static_cast<float>((color & 0x000000FF)) / 255.f,
static_cast<float>((color & 0x0000FF00) >> 8) / 255.f,
static_cast<float>((color & 0x00FF0000) >> 16) / 255.f,
static_cast<float>((color & 0xFF000000) >> 24) / 255.f
static_cast<float>((color & 0x000000FF)) / 255.0f,
static_cast<float>((color & 0x0000FF00) >> 8) / 255.0f,
static_cast<float>((color & 0x00FF0000) >> 16) / 255.0f,
static_cast<float>((color & 0xFF000000) >> 24) / 255.0f
};
NonOwningPtr<Text> text = p_scene->GetTextFromPositionAndColor(str, Vec2f{ static_cast<float>(x), static_cast<float>(y) }, vec_color);
@@ -43,10 +43,10 @@ namespace mlx
Text& new_text = p_scene->CreateText(str);
new_text.SetPosition(Vec2f{ static_cast<float>(x), static_cast<float>(y) });
new_text.SetColor(std::move(vec_color));
// if(m_pixelput_called)
if(m_pixelput_called)
{
m_draw_layer++;
// m_pixelput_called = false;
m_pixelput_called = false;
}
}
else if(!p_scene->IsTextAtGivenDrawLayer(str, m_draw_layer))