Skip to content

Commit

Permalink
[UPD] : update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aiekick committed Feb 20, 2024
1 parent 4a46495 commit ca74bbc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
31 changes: 18 additions & 13 deletions ImGuiFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/*
MIT License
Copyright (c) 2019-2020 Stephane Cuillerdier (aka aiekick)
Copyright (c) 2019-2024 Stephane Cuillerdier (aka aiekick)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -3387,8 +3387,7 @@ bool IGFD::KeyExplorerFeature::m_FlashableSelectable(const char* label, bool sel
ItemSize(size, 0.0f);

// Fill horizontal space
// We don't support (size < 0.0f) in Selectable() because the ItemSpacing extension would make explicitly right-aligned sizes not visibly match
// other widgets.
// We don't support (size < 0.0f) in Selectable() because the ItemSpacing extension would make explicitly right-aligned sizes not visibly match other widgets.
const bool span_all_columns = (flags & ImGuiSelectableFlags_SpanAllColumns) != 0;
const float min_x = span_all_columns ? window->ParentWorkRect.Min.x : pos.x;
const float max_x = span_all_columns ? window->ParentWorkRect.Max.x : window->WorkRect.Max.x;
Expand All @@ -3412,7 +3411,7 @@ bool IGFD::KeyExplorerFeature::m_FlashableSelectable(const char* label, bool sel
}
// if (g.IO.KeyCtrl) { GetForegroundDrawList()->AddRect(bb.Min, bb.Max, IM_COL32(0, 255, 0, 255)); }

// Modify ClipRect for the ItemAdd(), faster than doing a PushColumnsBackground/PushTableBackground for every Selectable..
// Modify ClipRect for the ItemAdd(), faster than doing a PushColumnsBackground/PushTableBackgroundChannel for every Selectable..
const float backup_clip_rect_min_x = window->ClipRect.Min.x;
const float backup_clip_rect_max_x = window->ClipRect.Max.x;
if (span_all_columns) {
Expand All @@ -3435,10 +3434,14 @@ bool IGFD::KeyExplorerFeature::m_FlashableSelectable(const char* label, bool sel

// FIXME: We can standardize the behavior of those two, we could also keep the fast path of override ClipRect + full push on render only,
// which would be advantageous since most selectable are not selected.
if (span_all_columns && window->DC.CurrentColumns)
PushColumnsBackground();
else if (span_all_columns && g.CurrentTable)
TablePushBackgroundChannel();
if (span_all_columns) {
if (g.CurrentTable)
TablePushBackgroundChannel();
else if (window->DC.CurrentColumns)
PushColumnsBackground();
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HasClipRect;
g.LastItemData.ClipRect = window->ClipRect;
}

// We use NoHoldingActiveID on menus so user can click and _hold_ on a menu then drag to browse child entries
ImGuiButtonFlags button_flags = 0;
Expand Down Expand Up @@ -3498,12 +3501,14 @@ bool IGFD::KeyExplorerFeature::m_FlashableSelectable(const char* label, bool sel
const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
RenderFrame(bb.Min, bb.Max, col, false, 0.0f);
}
if (g.NavId == id) RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_TypeThin | ImGuiNavHighlightFlags_NoRounding);
if (g.NavId == id) RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_Compact | ImGuiNavHighlightFlags_NoRounding);

if (span_all_columns && window->DC.CurrentColumns)
PopColumnsBackground();
else if (span_all_columns && g.CurrentTable)
TablePopBackgroundChannel();
if (span_all_columns) {
if (g.CurrentTable)
TablePopBackgroundChannel();
else if (window->DC.CurrentColumns)
PopColumnsBackground();
}

RenderTextClipped(text_min, text_max, label, NULL, &label_size, style.SelectableTextAlign, &bb);

Expand Down
8 changes: 4 additions & 4 deletions ImGuiFileDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/*
MIT License
Copyright (c) 2018-2023 Stephane Cuillerdier (aka aiekick)
Copyright (c) 2018-2024 Stephane Cuillerdier (aka aiekick)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -72,7 +72,7 @@ solutions.
## ImGui Supported Version
ImGuiFileDialog follow the master and docking branch of ImGui . currently ImGui 1.90.1 WIP
ImGuiFileDialog follow the master and docking branch of ImGui . currently ImGui 1.90.4 WIP
## Structure
Expand Down Expand Up @@ -1217,8 +1217,8 @@ The Custom Icon Font (in CustomFont.cpp and CustomFont.h) was made with ImGuiFon

#pragma region IGFD VERSION

// compatible with 1.90.1 WIP
#define IMGUIFILEDIALOG_VERSION "v0.6.6.1"
// compatible with 1.90.4 WIP
#define IMGUIFILEDIALOG_VERSION "v0.6.7"

#pragma endregion

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2023 Stephane Cuillerdier (aka Aiekick)
Copyright (c) 2018-2024 Stephane Cuillerdier (aka Aiekick)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Win](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Win.yml/badge.svg?branch=DemoApp)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Win.yml)
[![Linux](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Linux.yml/badge.svg?branch=DemoApp)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Linux.yml)
[![Osx](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Osx.yml/badge.svg?branch=DemoApp)](https://github.com/aiekick/ImGuiFileDialog/actions/workflows/Osx.yml)
[![Wrapped Dear ImGui Version](https://img.shields.io/badge/Dear%20ImGui%20Version-1.90.1-blue.svg)](https://github.com/ocornut/imgui)
[![Wrapped Dear ImGui Version](https://img.shields.io/badge/Dear%20ImGui%20Version-1.90.4-blue.svg)](https://github.com/ocornut/imgui)

# ImGuiFileDialog

Expand All @@ -14,7 +14,7 @@ solutions.

## ImGui Supported Version

ImGuiFileDialog follow the master and docking branch of ImGui. Currently ImGui 1.90.1
ImGuiFileDialog follow the master and docking branch of ImGui. Currently ImGui 1.90.4

## Structure

Expand Down

0 comments on commit ca74bbc

Please sign in to comment.