aboutsummaryrefslogtreecommitdiff
path: root/source/EditorUtils.hpp
diff options
context:
space:
mode:
authorhnOsmium0001 <[email protected]>2022-04-09 13:29:41 -0700
committerhnOsmium0001 <[email protected]>2022-04-09 13:29:41 -0700
commit906557f094e407ce21d429ef647bc75fe3179cf1 (patch)
tree5e6aaed6537a0328318b6cd6561f6a76bf8aa27d /source/EditorUtils.hpp
parente47a98793e58a5dbbe76bfed27e59408e43538e4 (diff)
More work on editor
Diffstat (limited to 'source/EditorUtils.hpp')
-rw-r--r--source/EditorUtils.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/source/EditorUtils.hpp b/source/EditorUtils.hpp
new file mode 100644
index 0000000..27510fe
--- /dev/null
+++ b/source/EditorUtils.hpp
@@ -0,0 +1,32 @@
+#pragma once
+
+#include "Color.hpp"
+
+#include <imgui.h>
+#include <string>
+
+namespace ImGui {
+
+const char* GetKeyNameGlfw(int key);
+
+void SetNextWindowSizeRelScreen(float xPercent, float yPercent, ImGuiCond cond = ImGuiCond_None);
+void SetNextWindowCentered(ImGuiCond cond = ImGuiCond_None);
+
+void PushDisabled();
+void PopDisabled();
+
+bool Button(const char* label, bool disabled);
+bool Button(const char* label, const ImVec2& sizeArg, bool disabled);
+
+bool ColorEdit3(const char* label, RgbaColor* color, ImGuiColorEditFlags flags = 0);
+bool ColorEdit4(const char* label, RgbaColor* color, ImGuiColorEditFlags flags = 0);
+bool ColorPicker3(const char* label, RgbaColor* color, ImGuiColorEditFlags flags = 0);
+bool ColorPicker4(const char* label, RgbaColor* color, ImGuiColorEditFlags flags = 0);
+
+bool InputText(const char* label, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* user_data = nullptr);
+bool InputTextMultiline(const char* label, std::string* str, const ImVec2& size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* userData = nullptr);
+bool InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = nullptr, void* userData = nullptr);
+
+bool Splitter(bool splitVertically, float thickness, float* size1, float* size2, float minSize1, float minSize2, float splitterLongAxisSize = -1.0f);
+
+} // namespace ImGui