mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-12-06 21:26:34 +01:00
Compare commits
4 Commits
a5e89b5aa6
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ec8f98ab0 | ||
|
|
8801d5cde5 | ||
|
|
09074c1ab5 | ||
|
|
5494dda227 |
2
external/entt
vendored
2
external/entt
vendored
Submodule external/entt updated: 344e03ac64...d4014c74dc
2
external/googletest
vendored
2
external/googletest
vendored
Submodule external/googletest updated: 58d77fa807...52eb8108c5
2
external/imgui/imgui
vendored
2
external/imgui/imgui
vendored
Submodule external/imgui/imgui updated: c6e0284ac5...f5befd2d29
@@ -49,7 +49,7 @@ void FilePicker(const char* label, MM::Services::FilesystemService& fs, std::str
|
||||
//ImGui::TextUnformatted(dirlist_path.c_str());
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -69,7 +69,7 @@ void FilePicker(const char* label, MM::Services::FilesystemService& fs, std::str
|
||||
|
||||
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() != '/') {
|
||||
path = internal_remove_last_folder(path);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ void Texture(MM::OpenGL::Texture::handle_t& texture, bool dropTarget) {
|
||||
ImGui::BeginGroup();
|
||||
|
||||
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"
|
||||
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);
|
||||
if (id) {
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ static void renderUpdateStratGraph(
|
||||
//ImGui::BeginChild("canvas", {0, 0}, true);
|
||||
|
||||
const ImVec2 cp = ImGui::GetCursorScreenPos();
|
||||
const auto max_cont = ImGui::GetWindowContentRegionMax();
|
||||
const auto max_cont = ImGui::GetContentRegionAvail();
|
||||
ImGui::Dummy(max_cont);
|
||||
|
||||
auto* dl = ImGui::GetWindowDrawList();
|
||||
|
||||
@@ -29,7 +29,7 @@ bool ImGuiService::enable(Engine& engine, std::vector<UpdateStrategies::TaskInfo
|
||||
ImGui::CreateContext();
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavNoCaptureKeyboard;
|
||||
io.ConfigNavCaptureKeyboard = false;
|
||||
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // TODO: dont, if ingame ?
|
||||
|
||||
auto& sdl_ss = engine.getService<MM::Services::SDLService>();
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace MM::Services {
|
||||
if (ImGui::Begin("Scene Metrics##ImGuiSceneToolsService", &_show_scene_metrics)) {
|
||||
ImGui::Text("capacity: %zu", scene.storage<::MM::Entity>().capacity());
|
||||
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")) {
|
||||
// iterating all entities is expensive
|
||||
size_t orphans = 0;
|
||||
|
||||
@@ -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 (const size_t child : nodes[i].children()) {
|
||||
for (const size_t child : nodes[i].in_edges()) {
|
||||
out << "n" << child << " -> " << "n" << i << ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <mm/services/input_service.hpp>
|
||||
#include <mm/components/velocity2d_position_intent.hpp>
|
||||
|
||||
#include <entt/entity/storage.hpp>
|
||||
|
||||
namespace MM::Systems {
|
||||
|
||||
// this system transforms the input from the input_service into velocity intent
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <mm/components/time_delta.hpp>
|
||||
|
||||
#include <entt/fwd.hpp>
|
||||
#include <entt/entity/storage.hpp>
|
||||
|
||||
namespace MM::Systems {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user