| 257 | |
| 258 | template <typename ClickFn> |
| 259 | void CheatButton(const char* label, bool enabled, const char* tooltip, ClickFn&& click) |
| 260 | { |
| 261 | ImGui::BeginDisabled(!enabled); |
| 262 | if (ImGui::Button(label)) |
| 263 | click(); |
| 264 | ImGui::EndDisabled(); |
| 265 | if (tooltip && ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) |
| 266 | ImGui::SetTooltip("%s", tooltip); |
| 267 | } |
| 268 | |
| 269 | void DrawCheatsTab() |
| 270 | { |
no outgoing calls
no test coverage detected