mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
impr: Prettier data inspector edit button
This commit is contained in:
@@ -832,6 +832,26 @@ namespace ImGuiExt {
|
||||
return res;
|
||||
}
|
||||
|
||||
bool DimmedButtonToggle(const char *icon, bool *v, ImVec2 size) {
|
||||
bool pushed = false;
|
||||
bool toggled = false;
|
||||
|
||||
if (*v) {
|
||||
PushStyleColor(ImGuiCol_Border, GetStyleColorVec4(ImGuiCol_ButtonActive));
|
||||
pushed = true;
|
||||
}
|
||||
|
||||
if (DimmedIconButton(icon, GetStyleColorVec4(ImGuiCol_Text), size)) {
|
||||
*v = !*v;
|
||||
toggled = true;
|
||||
}
|
||||
|
||||
if (pushed)
|
||||
PopStyleColor();
|
||||
|
||||
return toggled;
|
||||
}
|
||||
|
||||
bool DimmedIconToggle(const char *icon, bool *v) {
|
||||
bool pushed = false;
|
||||
bool toggled = false;
|
||||
|
||||
Reference in New Issue
Block a user