diff options
| author | hachem <im@hachem.wtf> | 2026-09-04 17:05:30 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-04 17:05:30 +0200 |
| commit | 199d6f15346dda994ab12f8c9701e6081d0817ae (patch) | |
| tree | b627068fc58f7496762237c67bbddce5e7003f89 /src/ui/widgets.h | |
| parent | 6698d8348a349b440597a51ed8447552bc9ad479 (diff) | |
feat: more widgets and icons
Diffstat (limited to 'src/ui/widgets.h')
| -rw-r--r-- | src/ui/widgets.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/ui/widgets.h b/src/ui/widgets.h index dac58e3..366e69a 100644 --- a/src/ui/widgets.h +++ b/src/ui/widgets.h @@ -2,22 +2,27 @@ #include <imgui.h> +#include <string> + namespace Hsdbg::Widgets { auto set_fonts(ImFont* ui, ImFont* strong, ImFont* mono) -> void; - auto section_header(const char* label) -> void; + auto accent() -> ImVec4; + + auto section_header(const char* label, bool rule = true) -> void; auto slider_float(const char* label, float* value, float min, float max, const char* fmt) -> bool; auto icon_button(const char* id, const char* icon, bool active = false, const char* tooltip = nullptr, bool disabled = false, - float size = 34.0f) -> bool; + float size = 34.0f, ImVec4 glyph = ImVec4(0.0f, 0.0f, 0.0f, 0.0f)) -> bool; auto toggle(const char* id, bool* value) -> bool; auto segmented(const char* id, const char* const* labels, int count, int current) -> int; + auto segmented_width(const char* const* labels, int count) -> float; auto selectable_row(const char* label, bool selected, ImGuiSelectableFlags flags = 0) -> bool; @@ -27,4 +32,13 @@ namespace Hsdbg::Widgets auto empty_state(const char* icon, const char* text) -> void; auto remove_button(const char* id) -> bool; + + auto input_with_icon(const char* id, const char* icon, const char* hint, std::string* text, + ImGuiInputTextFlags flags = 0) -> bool; + + auto dot_toggle(const char* id, bool* value, ImU32 on, ImU32 off, bool pending = false) -> bool; + + auto hex_value(unsigned long long value, int digits) -> void; + + auto link_text(const char* text) -> bool; } |
