|
|
|
@ -1847,13 +1847,13 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
|
|
|
|
ImGui::LogToClipboard();
|
|
|
|
|
else
|
|
|
|
|
ImGui::LogToTTY();
|
|
|
|
|
ImGui::LogText("ImGuiStyle& style = ImGui::GetStyle();" IM_NEWLINE);
|
|
|
|
|
ImGui::LogText("ImVec4* colors = ImGui::GetStyle().Colors;" IM_NEWLINE);
|
|
|
|
|
for (int i = 0; i < ImGuiCol_COUNT; i++)
|
|
|
|
|
{
|
|
|
|
|
const ImVec4& col = style.Colors[i];
|
|
|
|
|
const char* name = ImGui::GetStyleColorName(i);
|
|
|
|
|
if (!output_only_modified || memcmp(&col, (ref ? &ref->Colors[i] : &default_style.Colors[i]), sizeof(ImVec4)) != 0)
|
|
|
|
|
ImGui::LogText("style.Colors[ImGuiCol_%s]%*s= ImVec4(%.2ff, %.2ff, %.2ff, %.2ff);" IM_NEWLINE, name, 22 - (int)strlen(name), "", col.x, col.y, col.z, col.w);
|
|
|
|
|
ImGui::LogText("colors[ImGuiCol_%s]%*s= ImVec4(%.2ff, %.2ff, %.2ff, %.2ff);" IM_NEWLINE, name, 23-(int)strlen(name), "", col.x, col.y, col.z, col.w);
|
|
|
|
|
}
|
|
|
|
|
ImGui::LogFinish();
|
|
|
|
|
}
|
|
|
|
|