mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-06-18 18:56:36 +02:00
fix imgui post update
This commit is contained in:
@ -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>();
|
||||
|
Reference in New Issue
Block a user