Skip to content

Commit 09074c1

Browse files
committed
fix imgui post update
1 parent 5494dda commit 09074c1

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

framework/imgui/src/mm/imgui/widgets/filesystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void FilePicker(const char* label, MM::Services::FilesystemService& fs, std::str
4949
//ImGui::TextUnformatted(dirlist_path.c_str());
5050

5151
if (dirlist_path != "/") {
52-
if (ImGui::Selectable(ICON_II_FOLDER " ..", false, ImGuiSelectableFlags_DontClosePopups)) {
52+
if (ImGui::Selectable(ICON_II_FOLDER " ..", false, ImGuiSelectableFlags_NoAutoClosePopups)) {
5353
path = internal_remove_last_folder(dirlist_path);
5454
}
5555
}
@@ -69,7 +69,7 @@ void FilePicker(const char* label, MM::Services::FilesystemService& fs, std::str
6969

7070
tmp_text += i;
7171

72-
if (ImGui::Selectable(tmp_text.c_str(), false, ImGuiSelectableFlags_DontClosePopups)) {
72+
if (ImGui::Selectable(tmp_text.c_str(), false, ImGuiSelectableFlags_NoAutoClosePopups)) {
7373
if (path.back() != '/') {
7474
path = internal_remove_last_folder(path);
7575
}

framework/imgui/src/mm/imgui/widgets/texture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void Texture(MM::OpenGL::Texture::handle_t& texture, bool dropTarget) {
1717
ImGui::BeginGroup();
1818

1919
if (texture) {
20-
ImGui::Image(texture->getHandle(), size, {0.f, 1.f}, {1.f, 0.f}, ImVec4(1,1,1,1), ImVec4(1,1,1,1));
20+
ImGui::ImageWithBg(texture->getHandle(), size, {0.f, 1.f}, {1.f, 0.f}, ImVec4(1,1,1,1), ImVec4(1,1,1,1));
2121

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

framework/imgui/src/mm/services/engine_tools.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static void renderUpdateStratGraph(
9898
//ImGui::BeginChild("canvas", {0, 0}, true);
9999

100100
const ImVec2 cp = ImGui::GetCursorScreenPos();
101-
const auto max_cont = ImGui::GetWindowContentRegionMax();
101+
const auto max_cont = ImGui::GetContentRegionAvail();
102102
ImGui::Dummy(max_cont);
103103

104104
auto* dl = ImGui::GetWindowDrawList();

framework/imgui/src/mm/services/imgui_s.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ bool ImGuiService::enable(Engine& engine, std::vector<UpdateStrategies::TaskInfo
2929
ImGui::CreateContext();
3030
ImGuiIO& io = ImGui::GetIO();
3131
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
32-
io.ConfigFlags |= ImGuiConfigFlags_NavNoCaptureKeyboard;
32+
io.ConfigNavCaptureKeyboard = false;
3333
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // TODO: dont, if ingame ?
3434

3535
auto& sdl_ss = engine.getService<MM::Services::SDLService>();

0 commit comments

Comments
 (0)