[go: up one dir, main page]

Skip to content

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorton06 committed Jul 29, 2024
1 parent b22ef21 commit 6edb163
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 24 deletions.
1 change: 1 addition & 0 deletions Lumos/External/imgui/Plugins/ImFileBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <functional>
#include <memory>
#include <string>
#include <cstring>

#ifndef IMGUI_VERSION
# error "include imgui.h before this header"
Expand Down
1 change: 1 addition & 0 deletions Lumos/Source/Lumos/Core/DataStructures/Map.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once
#include "Core/OS/Memory.h"
#include "Utilities/Hash.h"
#include <cstring>

namespace Lumos
{
Expand Down
2 changes: 1 addition & 1 deletion Lumos/Source/Lumos/Core/JobSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <thread>
#include <condition_variable>
#include <deque>

#include <mutex>
#ifdef LUMOS_PLATFORM_WINDOWS
#define NOMINMAX
#include <Windows.h>
Expand Down
1 change: 1 addition & 0 deletions Lumos/Source/Lumos/Core/Reference.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "ReferenceCounter.h"
#include "OS/Memory.h"
#include "Core/LMLog.h"
#include <functional>

namespace Lumos
{
Expand Down
1 change: 1 addition & 0 deletions Lumos/Source/Lumos/Graphics/RHI/RHIDefinitions.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once
#include "Core/LMLog.h"
#include "Core/DataStructures/TDArray.h"
#include <cstring>

namespace Lumos
{
Expand Down
34 changes: 12 additions & 22 deletions Lumos/Source/Lumos/Graphics/Renderers/SceneRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2053,10 +2053,6 @@ namespace Lumos::Graphics
}

m_CurrentUIText = false;
/* opengl_2d_renderer_push_quad(widget->position + size * 0.5f,
size,
0.0f,
border_color);*/

{
m_Stats.NumRenderedObjects++;
Expand Down Expand Up @@ -2137,12 +2133,6 @@ namespace Lumos::Graphics
}

m_CurrentUIText = false;
/* opengl_2d_renderer_push_quad(p + size * 0.5f,
size,
0.0f,
background_color,
widget->texture);*/

{
m_Stats.NumRenderedObjects++;

Expand Down Expand Up @@ -2210,12 +2200,18 @@ namespace Lumos::Graphics
Vec2 p = widget->position /* - size * 0.5f*/ + debugUIOffset;
// size *= 4.0f;

p.y = m_MainTexture->GetHeight() - p.y;
p.y -= size.y - padding.y * 0.5f;
p.x += padding.x * 0.5f;

// LINFO("Text {0} - Pos {1}, {2} - Size {3}, {4}", (char*)widget->text.str, p.x,p.y,size.x, size.y);

if(widget->TextAlignment & UI_Text_Alignment_Center_X)
{
p.y = m_MainTexture->GetHeight() - p.y;
p.y -= size.y - padding.y * 0.5f;
p.x += size.x * 0.5f + padding.x * 0.5f;
}
else
{
p.y = m_MainTexture->GetHeight() - p.y;
p.y -= size.y - padding.y * 0.5f;
p.x += padding.x * 0.5f;
}
if(!m_CurrentUIText)
{
if(m_Renderer2DData.m_IndexCount >= 0)
Expand All @@ -2227,12 +2223,6 @@ namespace Lumos::Graphics

m_CurrentUIText = true;

/* opengl_2d_renderer_push_string(font,
widget->text,
text_size,
p + size * 0.5f,
text_color);*/

Vec2 pos = p; // - size * 0.5f;
{
Mat4 transform = Mat4::Translation(Vec3(pos.x, pos.y, 0.0f)) * Mat4::Scale(Vec3(fontSize, fontSize, fontSize));
Expand Down
1 change: 0 additions & 1 deletion Lumos/Source/Lumos/ImGui/ImGuiManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <imgui/Plugins/ImGuiAl/fonts/RobotoMedium.inl>
#include <imgui/Plugins/ImGuiAl/fonts/RobotoRegular.inl>
#include <imgui/Plugins/ImGuiAl/fonts/RobotoBold.inl>
#include <imgui/misc/freetype/imgui_freetype.h>

#if defined(LUMOS_PLATFORM_MACOS) || defined(LUMOS_PLATFORM_WINDOWS) || defined(LUMOS_PLATFORM_LINUX)
#define USING_GLFW
Expand Down
1 change: 1 addition & 0 deletions Lumos/Source/Lumos/Maths/Vector2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#ifdef LUMOS_SSE_VEC2
#include <smmintrin.h>
#endif
#include <math.h>

namespace Lumos
{
Expand Down

0 comments on commit 6edb163

Please sign in to comment.