F.E.I.S/src/imgui_extras.hpp

35 lines
1.0 KiB
C++
Raw Normal View History

#pragma once
#include <string>
#include <SFML/Graphics/Color.hpp>
#include <imgui-SFML_export.h>
#include <imgui.h>
#include "special_numeric_types.hpp"
namespace feis {
bool ColorEdit4(const char* label, sf::Color& col, ImGuiColorEditFlags flags = 0);
bool InputDecimal(
const char *label,
Decimal* value,
const ImGuiInputTextFlags flags = ImGuiInputTextFlags_None
);
bool InputTextColored(
const char* label,
std::string* str,
bool isValid,
const std::string& hoverHelpText,
const ImGuiInputTextFlags flags = ImGuiInputTextFlags_None
);
2022-10-11 21:23:29 +02:00
void HelpMarker(const char* desc);
}
namespace colors {
const ImColor green = {0.163f, 0.480f, 0.160f, 0.540f};
const ImColor hovered_green = {0.261f, 0.980f, 0.261f, 0.400f};
const ImColor active_green = {0.261f, 0.980f, 0.261f, 0.671f};
const ImColor red = {0.480f, 0.160f, 0.160f, 0.540f};
const ImColor hovered_red = {0.980f, 0.261f, 0.261f, 0.400f};
const ImColor active_red = {0.980f, 0.261f, 0.261f, 0.671f};
};