This file contains hidden or 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
// WARNING: Revision 5+ Requires unreleased code from imgui, stick to 3 or 2 for now (don't look at revision 4) | |
#define IMGUI_DEFINE_MATH_OPERATORS | |
#include <imgui.h> | |
#include <imgui_internal.h> | |
#include "iminputvalue.h" | |
namespace ImGui | |
{ | |
//------------------------------------------------------------------------------------------------- |
This file contains hidden or 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 "ImguiCanvas.h" | |
#define IMGUI_DEFINE_MATH_OPERATORS | |
#include <imgui_internal.h> | |
// Not true epsilon, this one is much more useful | |
constexpr float ImEpsilonf = 0.00001f; | |
//------------------------------------------------------------------------------------------------- | |
// Return -1 or +1 (0 returns +1) |
This file contains hidden or 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
//------------------------------------------------------------------------------------------------- | |
// Helper for managing style changes. Can set and forget. | |
// Usage 1: ImGuiStyleScope scope(ImGuiCol_Text, ImGuiColors::Red); | |
// Usage 2: | |
// ImGuiStyleScope scope; | |
// scope.Color(ImGuiCol_Text, ImGuiColors::Yellow) | |
// .Style(ImGuiStyleVar_Alpha, 0.4f); | |
//------------------------------------------------------------------------------------------------- | |
class ImGuiStyleScope : GC_NonCopyable | |
{ |
NewerOlder