mirror of
https://github.com/Bloodysharp/imgui-menu-for-rainbow-six-siege.git
synced 2024-12-22 07:57:32 +08:00
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <cstdlib>
|
|
#include <imgui.h>
|
|
|
|
typedef int ImGuiKnobFlags;
|
|
|
|
enum ImGuiKnobFlags_ {
|
|
ImGuiKnobFlags_NoTitle = 1 << 0,
|
|
ImGuiKnobFlags_NoInput = 1 << 1,
|
|
ImGuiKnobFlags_ValueTooltip = 1 << 2,
|
|
ImGuiKnobFlags_DragHorizontal = 1 << 3,
|
|
};
|
|
|
|
typedef int ImGuiKnobVariant;
|
|
|
|
enum ImGuiKnobVariant_ {
|
|
ImGuiKnobVariant_WiperOnly = 1 << 0,
|
|
};
|
|
|
|
namespace ImGuiKnobs {
|
|
|
|
struct color_set {
|
|
ImColor base;
|
|
ImColor hovered;
|
|
ImColor active;
|
|
|
|
color_set(ImColor base, ImColor hovered, ImColor active) : base(base), hovered(hovered), active(active) {}
|
|
|
|
color_set(ImColor color) {
|
|
base = color;
|
|
hovered = color;
|
|
active = color;
|
|
}
|
|
};
|
|
|
|
bool Knob(const char *label, float *p_value, float v_min, float v_max, float speed = 0, const char *format = NULL, ImGuiKnobVariant variant = ImGuiKnobVariant_WiperOnly, float size = 0, ImGuiKnobFlags flags = 0, int steps = 10);
|
|
bool KnobInt(const char *label, int *p_value, int v_min, int v_max, float speed = 0, const char *format = NULL, ImGuiKnobVariant variant = ImGuiKnobVariant_WiperOnly, float size = 0, ImGuiKnobFlags flags = 0, int steps = 10);
|
|
} |