mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Internals: swapped blocks in TextEx() to make it easier to step through common cases. Tweak demo.
This commit is contained in:
@ -1882,6 +1882,15 @@ static void ShowDemoWindowWidgets()
|
||||
if (ImGui::Button("Default: Float + HDR + Hue Wheel"))
|
||||
ImGui::SetColorEditOptions(ImGuiColorEditFlags_Float | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_PickerHueWheel);
|
||||
|
||||
// Always both a small version of both types of pickers (to make it more visible in the demo to people who are skimming quickly through it)
|
||||
ImGui::Text("Both types:");
|
||||
float w = (ImGui::GetContentRegionAvail().x - ImGui::GetStyle().ItemSpacing.y) * 0.40f;
|
||||
ImGui::SetNextItemWidth(w);
|
||||
ImGui::ColorPicker3("##MyColor##5", (float*)&color, ImGuiColorEditFlags_PickerHueBar | ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoAlpha);
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(w);
|
||||
ImGui::ColorPicker3("##MyColor##6", (float*)&color, ImGuiColorEditFlags_PickerHueWheel | ImGuiColorEditFlags_NoSidePreview | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoAlpha);
|
||||
|
||||
// HSV encoded support (to avoid RGB<>HSV round trips and singularities when S==0 or V==0)
|
||||
static ImVec4 color_hsv(0.23f, 1.0f, 1.0f, 1.0f); // Stored as HSV!
|
||||
ImGui::Spacing();
|
||||
@ -4419,14 +4428,16 @@ static void ShowDemoWindowTables()
|
||||
{
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::PushID(column);
|
||||
ImGui::AlignTextToFramePadding(); // FIXME-TABLE: Workaround for wrong text baseline propagation
|
||||
ImGui::AlignTextToFramePadding(); // FIXME-TABLE: Workaround for wrong text baseline propagation across columns
|
||||
ImGui::Text("'%s'", column_names[column]);
|
||||
ImGui::Spacing();
|
||||
ImGui::Text("Input flags:");
|
||||
EditTableColumnsFlags(&column_flags[column]);
|
||||
ImGui::Spacing();
|
||||
ImGui::Text("Output flags:");
|
||||
ImGui::BeginDisabled();
|
||||
ShowTableColumnsStatusFlags(column_flags_out[column]);
|
||||
ImGui::EndDisabled();
|
||||
ImGui::PopID();
|
||||
}
|
||||
PopStyleCompact();
|
||||
|
Reference in New Issue
Block a user