message: Demo: Consoles: Added "Copy" button to demonstrate LogToClipboard
diff: @@ -2351,6 +2351,7 @@ struct ExampleAppConsole
  if (ImGui::SmallButton("Add Dummy Text")) { AddLog("%d some text", Items.Size); AddLog("some more text"); AddLog("display very important message here!"); } ImGui::SameLine();
  if (ImGui::SmallButton("Add Dummy Error")) AddLog("[error] something went wrong"); ImGui::SameLine();
  if (ImGui::SmallButton("Clear")) ClearLog(); ImGui::SameLine();
  + bool copy_to_clipboard = ImGui::SmallButton("Copy"); ImGui::SameLine();
  if (ImGui::SmallButton("Scroll to bottom")) ScrollToBottom = true;
  //static float t = 0.0f; if (ImGui::GetTime() - t > 0.02f) { t = ImGui::GetTime(); AddLog("Spam %f", t); }
  @@ -2381,6 +2382,8 @@ struct ExampleAppConsole
  // and appending newly elements as they are inserted. This is left as a task to the user until we can manage to improve this example code!
  // If your items are of variable size you may want to implement code similar to what ImGuiListClipper does. Or split your data into fixed height items to allow random-seeking into your list.
  ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(4,1)); // Tighten spacing
  + if (copy_to_clipboard)
  + ImGui::LogToClipboard();
  for (int i = 0; i < Items.Size; i++)
  {
  const char* item = Items[i];
  @@ -2393,6 +2396,8 @@ struct ExampleAppConsole
  ImGui::TextUnformatted(item);
  ImGui::PopStyleColor();
  }
  + if (copy_to_clipboard)
  + ImGui::LogFinish();
  if (ScrollToBottom)
  ImGui::SetScrollHere();
  ScrollToBottom = false;
  