This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imguifilesystem dialogs for imgui v.1.17 wip (https://github.com/ocornut/imgui). | |
See also: https://github.com/ocornut/imgui/issues/88 | |
It's composed by three files: | |
- imguifilesystem.h (usage instructions are here) | |
- imguifilesystem.cpp | |
- dirent_portable.h | |
It needs testing and feedback (expecially for Windows/VisualC++ and MacOS). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it | |
// freely, subject to the following restrictions: | |
// 1. The origin of this software must not be misrepresented; you must not | |
// claim that you wrote the original software. If you use this software | |
// in a product, an acknowledgment in the product documentation would be | |
// appreciated but is not required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it | |
// freely, subject to the following restrictions: | |
// 1. The origin of this software must not be misrepresented; you must not | |
// claim that you wrote the original software. If you use this software | |
// in a product, an acknowledgment in the product documentation would be | |
// appreciated but is not required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This software is provided 'as-is', without any express or implied | |
// warranty. In no event will the authors be held liable for any damages | |
// arising from the use of this software. | |
// Permission is granted to anyone to use this software for any purpose, | |
// including commercial applications, and to alter it and redistribute it | |
// freely, subject to the following restrictions: | |
// 1. The origin of this software must not be misrepresented; you must not | |
// claim that you wrote the original software. If you use this software | |
// in a product, an acknowledgment in the product documentation would be | |
// appreciated but is not required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <imgui.h> | |
// USAGE EXAMPLE | |
/* | |
ImGui::Text("Tabs (based on the code by krys-spectralpixel):"); | |
static const char* tabNames[] = {"Render","Layers","Scene","World","Object","Constraints","Modifiers","Data","Material","Texture","Particle","Physics"}; | |
static const int numTabs = sizeof(tabNames)/sizeof(tabNames[0]); | |
static const char* tabTooltips[numTabs] = {"Render Tab Tooltip","","","","Object Type Tooltip","","","","","Tired to add tooltips...",""}; | |
static int tabItemOrdering[numTabs] = {0,1,2,3,4,5,6,7,8,9,10,11}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "imguitabwindow.h" | |
#include <imgui_internal.h> | |
#include <imgui.h> // intellisense | |
// TODO: Clean this code, it's a mess! | |
namespace ImGui { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <imgui.h> | |
#include <imgui_internal.h> | |
// ImDrawList methods to display vertical text | |
/* | |
// TEST: inside a window: | |
ImGuiWindow* window = ImGui::GetCurrentWindow(); | |
ImDrawList* dl = window->DrawList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* edtaa3() | |
* | |
* Sweep-and-update Euclidean distance transform of an | |
* image. Positive pixels are treated as object pixels, | |
* zero or negative pixels are treated as background. | |
* An attempt is made to treat antialiased edges correctly. | |
* The input image must have pixels in the range [0,1], | |
* and the antialiased image should be a box-filter | |
* sampling of the ideal, crisp edge. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// On Ubuntu, I can compile it with the following command line (provided that imgui.h is two folders up, and that I want to use glfw): | |
// gcc -o basicExample mainBasic.cpp -I"../../" ../../imgui.cpp ../../imgui_draw.cpp -D"IMGUI_INCLUDE_IMGUI_USER_H" -D"IMGUI_INCLUDE_IMGUI_USER_INL" -I"/usr/include/GLFW" -D"IMGUI_USE_GLFW_BINDING" -L"/usr/lib/x86_64-linux-gnu" -lglfw -lX11 -lm -lGL -lstdc++ -s | |
// This file is intended to test/answer to https://github.com/Flix01/imgui/issues/15 | |
// RESULT: | |
// Dynamic enum works! | |
// And if you can use dynamic_cast<>() making new Node types that use it is easier (non-intrusive) | |
// Otherwise you must modify the code of CustomEnumEditorNode::render(...) for every new user class you add. | |
// | |
// Added also some code to serialize/deserialize the enum names ("TestEnumNames") together |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// EXPERIMENTAL (ALMOST UNTESTED) InputTextMultiline(...) for std::strings. | |
// USE IT AT YOUR OWN RISK! | |
// Example usage: | |
/* | |
static std::string text = "Dear ImGui lacks InputTextMultiline(...) for std::string."; | |
static bool isTextBoxActive = false; // A better implementation should remove this | |
ImGui::InputTextMultiline("###ADummyLabelForMe",text,isTextBoxActive); | |
*/ |
OlderNewer