MCPcopy Create free account
hub / github.com/TurningWheel/Barony / buttonConsoleCommandHighlight

Method buttonConsoleCommandHighlight

src/mod_tools.cpp:8741–8751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8739}
8740
8741void ImGui_t::buttonConsoleCommandHighlight(const char* cmd, bool flag)
8742{
8743 flag ? ImGui::PushStyleColor(ImGuiCol_Button, colorOn) : ImGui::PushStyleColor(ImGuiCol_Button, colorBtnDefault);
8744 flag ? ImGui::PushStyleColor(ImGuiCol_ButtonActive, colorOnActive) : ImGui::PushStyleColor(ImGuiCol_ButtonActive, colorBtnDefaultActive);
8745 flag ? ImGui::PushStyleColor(ImGuiCol_ButtonHovered, colorOnHovered) : ImGui::PushStyleColor(ImGuiCol_ButtonHovered, colorBtnDefaultHovered);
8746 if ( ImGui::Button(cmd) )
8747 {
8748 consoleCommand(cmd);
8749 }
8750 ImGui::PopStyleColor(3);
8751}
8752
8753struct ImGuiHUDTimers_t
8754{

Callers

nothing calls this directly

Calls 2

consoleCommandFunction · 0.85
ButtonClass · 0.50

Tested by

no test coverage detected