4 Commits

Author SHA1 Message Date
Green Sky
4ec8f98ab0 update entt to v3.15.0 2025-05-24 22:33:48 +02:00
Green Sky
8801d5cde5 update googletest to v1.17.0 2025-05-22 13:27:22 +02:00
Green Sky
09074c1ab5 fix imgui post update 2025-05-21 21:28:27 +02:00
Green Sky
5494dda227 update imgui to v1.91.9b 2025-05-21 21:24:07 +02:00
11 changed files with 14 additions and 11 deletions

2
external/entt vendored

View File

@@ -49,7 +49,7 @@ void FilePicker(const char* label, MM::Services::FilesystemService& fs, std::str
//ImGui::TextUnformatted(dirlist_path.c_str()); //ImGui::TextUnformatted(dirlist_path.c_str());
if (dirlist_path != "/") { if (dirlist_path != "/") {
if (ImGui::Selectable(ICON_II_FOLDER " ..", false, ImGuiSelectableFlags_DontClosePopups)) { if (ImGui::Selectable(ICON_II_FOLDER " ..", false, ImGuiSelectableFlags_NoAutoClosePopups)) {
path = internal_remove_last_folder(dirlist_path); path = internal_remove_last_folder(dirlist_path);
} }
} }
@@ -69,7 +69,7 @@ void FilePicker(const char* label, MM::Services::FilesystemService& fs, std::str
tmp_text += i; tmp_text += i;
if (ImGui::Selectable(tmp_text.c_str(), false, ImGuiSelectableFlags_DontClosePopups)) { if (ImGui::Selectable(tmp_text.c_str(), false, ImGuiSelectableFlags_NoAutoClosePopups)) {
if (path.back() != '/') { if (path.back() != '/') {
path = internal_remove_last_folder(path); path = internal_remove_last_folder(path);
} }

View File

@@ -17,7 +17,7 @@ void Texture(MM::OpenGL::Texture::handle_t& texture, bool dropTarget) {
ImGui::BeginGroup(); ImGui::BeginGroup();
if (texture) { if (texture) {
ImGui::Image(texture->getHandle(), size, {0.f, 1.f}, {1.f, 0.f}, ImVec4(1,1,1,1), ImVec4(1,1,1,1)); ImGui::ImageWithBg(texture->getHandle(), size, {0.f, 1.f}, {1.f, 0.f}, ImVec4(1,1,1,1), ImVec4(1,1,1,1));
// "tooltip" // "tooltip"
if (ImGui::IsItemHovered()) { if (ImGui::IsItemHovered()) {
@@ -32,7 +32,7 @@ void Texture(MM::OpenGL::Texture::handle_t& texture, bool dropTarget) {
auto id = MM::ResourceManager<MM::OpenGL::Texture>::ref().id_from_handle(texture); auto id = MM::ResourceManager<MM::OpenGL::Texture>::ref().id_from_handle(texture);
if (id) { if (id) {
ImGui::SetDragDropPayload(IMGUI_PAYLOAD_TYPE_MM_REND_TEXTURE, &(id.value()), sizeof(id.value())); ImGui::SetDragDropPayload(IMGUI_PAYLOAD_TYPE_MM_REND_TEXTURE, &(id.value()), sizeof(id.value()));
ImGui::Image(texture->getHandle(), size, {0.f, 1.f}, {1.f, 0.f}, ImVec4(1,1,1,1), ImVec4(1,1,1,1)); ImGui::ImageWithBg(texture->getHandle(), size, {0.f, 1.f}, {1.f, 0.f}, ImVec4(1,1,1,1), ImVec4(1,1,1,1));
} }
ImGui::EndDragDropSource(); ImGui::EndDragDropSource();
} }

View File

@@ -98,7 +98,7 @@ static void renderUpdateStratGraph(
//ImGui::BeginChild("canvas", {0, 0}, true); //ImGui::BeginChild("canvas", {0, 0}, true);
const ImVec2 cp = ImGui::GetCursorScreenPos(); const ImVec2 cp = ImGui::GetCursorScreenPos();
const auto max_cont = ImGui::GetWindowContentRegionMax(); const auto max_cont = ImGui::GetContentRegionAvail();
ImGui::Dummy(max_cont); ImGui::Dummy(max_cont);
auto* dl = ImGui::GetWindowDrawList(); auto* dl = ImGui::GetWindowDrawList();

View File

@@ -29,7 +29,7 @@ bool ImGuiService::enable(Engine& engine, std::vector<UpdateStrategies::TaskInfo
ImGui::CreateContext(); ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); ImGuiIO& io = ImGui::GetIO();
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io.ConfigFlags |= ImGuiConfigFlags_NavNoCaptureKeyboard; io.ConfigNavCaptureKeyboard = false;
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // TODO: dont, if ingame ? //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // TODO: dont, if ingame ?
auto& sdl_ss = engine.getService<MM::Services::SDLService>(); auto& sdl_ss = engine.getService<MM::Services::SDLService>();

View File

@@ -111,7 +111,7 @@ namespace MM::Services {
if (ImGui::Begin("Scene Metrics##ImGuiSceneToolsService", &_show_scene_metrics)) { if (ImGui::Begin("Scene Metrics##ImGuiSceneToolsService", &_show_scene_metrics)) {
ImGui::Text("capacity: %zu", scene.storage<::MM::Entity>().capacity()); ImGui::Text("capacity: %zu", scene.storage<::MM::Entity>().capacity());
ImGui::Text("size: %zu", scene.storage<::MM::Entity>().size()); ImGui::Text("size: %zu", scene.storage<::MM::Entity>().size());
ImGui::Text("alive: %zu", scene.storage<::MM::Entity>().in_use()); ImGui::Text("alive: %zu", scene.storage<::MM::Entity>().free_list());
if (ImGui::CollapsingHeader("orphans")) { if (ImGui::CollapsingHeader("orphans")) {
// iterating all entities is expensive // iterating all entities is expensive
size_t orphans = 0; size_t orphans = 0;

View File

@@ -23,7 +23,7 @@ static std::ostream& operator<<(std::ostream& out, const std::vector<entt::organ
} }
for (size_t i = 0; i < nodes.size(); i++) { for (size_t i = 0; i < nodes.size(); i++) {
for (const size_t child : nodes[i].children()) { for (const size_t child : nodes[i].in_edges()) {
out << "n" << child << " -> " << "n" << i << ";\n"; out << "n" << child << " -> " << "n" << i << ";\n";
} }
} }

View File

@@ -4,6 +4,8 @@
#include <mm/services/input_service.hpp> #include <mm/services/input_service.hpp>
#include <mm/components/velocity2d_position_intent.hpp> #include <mm/components/velocity2d_position_intent.hpp>
#include <entt/entity/storage.hpp>
namespace MM::Systems { namespace MM::Systems {
// this system transforms the input from the input_service into velocity intent // this system transforms the input from the input_service into velocity intent

View File

@@ -7,6 +7,7 @@
#include <mm/components/time_delta.hpp> #include <mm/components/time_delta.hpp>
#include <entt/fwd.hpp> #include <entt/fwd.hpp>
#include <entt/entity/storage.hpp>
namespace MM::Systems { namespace MM::Systems {