Localization: Workaround to localization of the labels inside of imgui color picker (part of #10568)
* Overridden ImGui::ColorEdit4 and ImGui::ColorPicker4 to send localized labels inside functions + Updated POT
This commit is contained in:
parent
3c1008f226
commit
1a82b5b5ff
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-05-25 13:53+0200\n"
|
||||
"POT-Creation-Date: 2023-05-25 17:04+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -212,8 +212,8 @@ msgstr ""
|
||||
#: src/slic3r/GUI/ConfigWizard.cpp:1838 src/slic3r/GUI/ConfigWizard.cpp:1874
|
||||
#: src/slic3r/GUI/ConfigWizard.cpp:1888
|
||||
#: src/slic3r/GUI/ExtruderSequenceDialog.cpp:100
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3471 src/slic3r/GUI/GCodeViewer.cpp:3477
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3485 src/slic3r/GUI/Gizmos/GLGizmoCut.cpp:234
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3467 src/slic3r/GUI/GCodeViewer.cpp:3473
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3481 src/slic3r/GUI/Gizmos/GLGizmoCut.cpp:234
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoCut.cpp:493
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoCut.cpp:513
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoCut.cpp:1819
|
||||
@ -300,7 +300,7 @@ msgstr ""
|
||||
msgid "Load shape from STL..."
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/BedShapeDialog.cpp:252 src/slic3r/GUI/GCodeViewer.cpp:3936
|
||||
#: src/slic3r/GUI/BedShapeDialog.cpp:252 src/slic3r/GUI/GCodeViewer.cpp:3932
|
||||
#: src/slic3r/GUI/MainFrame.cpp:2241
|
||||
msgid "Settings"
|
||||
msgstr ""
|
||||
@ -602,6 +602,7 @@ msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/ConfigSnapshotDialog.cpp:30
|
||||
#: src/slic3r/GUI/GUI_ObjectManipulation.cpp:855
|
||||
#: src/libslic3r/ExtrusionRole.cpp:37
|
||||
msgid "Unknown"
|
||||
msgstr ""
|
||||
|
||||
@ -1344,6 +1345,27 @@ msgstr ""
|
||||
msgid "Place bearings in slots and resume printing"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/DoubleSlider.cpp:711 src/libslic3r/Utils.cpp:1015
|
||||
#, possible-boost-format
|
||||
msgid "%1%d"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/DoubleSlider.cpp:712 src/libslic3r/Utils.cpp:1016
|
||||
#, possible-boost-format
|
||||
msgid "%1%h"
|
||||
msgstr ""
|
||||
|
||||
#. TRN "m" means "minutes"
|
||||
#: src/slic3r/GUI/DoubleSlider.cpp:713 src/libslic3r/Utils.cpp:1018
|
||||
#, possible-boost-format
|
||||
msgid "%1%m"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/DoubleSlider.cpp:714 src/libslic3r/Utils.cpp:1026
|
||||
#, possible-boost-format
|
||||
msgid "%1%s"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/DoubleSlider.cpp:1448
|
||||
msgid "One layer mode"
|
||||
msgstr ""
|
||||
@ -2073,221 +2095,221 @@ msgstr ""
|
||||
msgid "Click to show"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3471
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3467
|
||||
msgid "up to"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3477
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3473
|
||||
msgid "above"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3485
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3481
|
||||
msgid "from"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3485
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3481
|
||||
msgid "to"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3535 src/slic3r/GUI/GCodeViewer.cpp:3536
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3614
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3531 src/slic3r/GUI/GCodeViewer.cpp:3532
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3610
|
||||
msgid "Percentage"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3546 src/slic3r/GUI/GCodeViewer.cpp:3592
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3542 src/slic3r/GUI/GCodeViewer.cpp:3588
|
||||
msgid "Feature type"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3546 src/slic3r/GUI/GCodeViewer.cpp:3614
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3542 src/slic3r/GUI/GCodeViewer.cpp:3610
|
||||
#: src/slic3r/GUI/RammingChart.cpp:90
|
||||
msgid "Time"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3593
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3589
|
||||
msgid "Height (mm)"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3594
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3590
|
||||
msgid "Width (mm)"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3595
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3591
|
||||
msgid "Speed (mm/s)"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3596
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3592
|
||||
msgid "Fan speed (%)"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3597
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3593
|
||||
msgid "Temperature (°C)"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3598
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3594
|
||||
msgid "Volumetric flow rate (mm³/s)"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3599
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3595
|
||||
msgid "Layer time (linear)"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3600
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3596
|
||||
msgid "Layer time (logarithmic)"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3601
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3597
|
||||
msgid "Tool"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3602
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3598
|
||||
msgid "Color Print"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3614 src/slic3r/GUI/GCodeViewer.cpp:3616
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3882
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3610 src/slic3r/GUI/GCodeViewer.cpp:3612
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3878
|
||||
msgid "Used filament"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3645 src/slic3r/GUI/GCodeViewer.cpp:4092
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3641 src/slic3r/GUI/GCodeViewer.cpp:4088
|
||||
#: src/libslic3r/PrintConfig.cpp:1470 src/libslic3r/PrintConfig.cpp:3080
|
||||
msgid "Travel"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3662 src/slic3r/GUI/GCodeViewer.cpp:3707
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3711
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3658 src/slic3r/GUI/GCodeViewer.cpp:3703
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3707
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp:74
|
||||
#: src/slic3r/GUI/GUI_ObjectList.cpp:349 src/slic3r/GUI/Tab.cpp:1959
|
||||
#: src/slic3r/GUI/wxExtensions.cpp:510 src/libslic3r/PrintConfig.cpp:886
|
||||
msgid "Extruder"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3684
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3680
|
||||
msgid "Default color"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3707
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3703
|
||||
msgid "default color"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3807 src/slic3r/GUI/GCodeViewer.cpp:3863
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3803 src/slic3r/GUI/GCodeViewer.cpp:3859
|
||||
msgid "Color change"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3826 src/slic3r/GUI/GCodeViewer.cpp:3861
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3822 src/slic3r/GUI/GCodeViewer.cpp:3857
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3862 src/slic3r/GUI/GCodeViewer.cpp:3896
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3858 src/slic3r/GUI/GCodeViewer.cpp:3892
|
||||
msgid "Pause"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3879 src/slic3r/GUI/GCodeViewer.cpp:3882
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3875 src/slic3r/GUI/GCodeViewer.cpp:3878
|
||||
msgid "Event"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3879 src/slic3r/GUI/GCodeViewer.cpp:3882
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3875 src/slic3r/GUI/GCodeViewer.cpp:3878
|
||||
msgid "Remaining time"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3879 src/slic3r/GUI/GCodeViewer.cpp:3882
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3875 src/slic3r/GUI/GCodeViewer.cpp:3878
|
||||
msgid "Duration"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3950 src/slic3r/GUI/GUI.cpp:332
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3946 src/slic3r/GUI/GUI.cpp:332
|
||||
#: src/slic3r/GUI/Plater.cpp:855 src/libslic3r/PrintConfig.cpp:332
|
||||
msgid "Printer"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3953 src/slic3r/GUI/GUI.cpp:328
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3949 src/slic3r/GUI/GUI.cpp:328
|
||||
#: src/slic3r/GUI/Plater.cpp:851
|
||||
msgid "Print settings"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3958 src/slic3r/GUI/GUI.cpp:330
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3954 src/slic3r/GUI/GUI.cpp:330
|
||||
#: src/slic3r/GUI/Plater.cpp:852 src/slic3r/GUI/Tab.cpp:1998
|
||||
#: src/slic3r/GUI/Tab.cpp:1999
|
||||
msgid "Filament"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3973
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3969
|
||||
msgid "Hide Custom G-code"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3973
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3969
|
||||
msgid "Show Custom G-code"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3986
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:3982
|
||||
msgid "Estimated printing times"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4005
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4001
|
||||
msgid "Normal mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4006
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4002
|
||||
msgid "Stealth mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4015 src/libslic3r/PrintConfig.cpp:1247
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4011 src/libslic3r/PrintConfig.cpp:1247
|
||||
#: src/libslic3r/PrintConfig.cpp:1265 src/libslic3r/PrintConfig.cpp:1275
|
||||
#: src/libslic3r/PrintConfig.cpp:1320
|
||||
msgid "First layer"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4019
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4015
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4038
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4034
|
||||
msgid "Show stealth mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4042
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4038
|
||||
msgid "Show normal mode"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4096
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4092
|
||||
msgid "Wipe"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4100
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4096
|
||||
msgid "Retractions"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4104
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4100
|
||||
msgid "Deretractions"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4108
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4104
|
||||
msgid "Seams"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4112
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4108
|
||||
msgid "Tool changes"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4116
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4112
|
||||
msgid "Color changes"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4120
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4116
|
||||
msgid "Print pauses"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4124
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4120
|
||||
msgid "Custom G-codes"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4128
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4124
|
||||
msgid "Center of gravity"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4133
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4129
|
||||
msgid "Shells"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4138
|
||||
#: src/slic3r/GUI/GCodeViewer.cpp:4134
|
||||
msgid "Tool marker"
|
||||
msgstr ""
|
||||
|
||||
@ -3862,6 +3884,16 @@ msgstr ""
|
||||
msgid "Bucket fill"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp:338
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp:351
|
||||
msgid "Current"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp:338
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp:351
|
||||
msgid "Original"
|
||||
msgstr ""
|
||||
|
||||
#: src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp:399
|
||||
msgid "Paints neighboring facets that have the same color."
|
||||
msgstr ""
|
||||
@ -11918,28 +11950,6 @@ msgid ""
|
||||
"objects printable."
|
||||
msgstr ""
|
||||
|
||||
#: src/libslic3r/Utils.cpp:1016
|
||||
#, possible-boost-format
|
||||
msgid "%1%d"
|
||||
msgstr ""
|
||||
|
||||
#: src/libslic3r/Utils.cpp:1016 src/libslic3r/Utils.cpp:1018
|
||||
#, possible-boost-format
|
||||
msgid "%1%h"
|
||||
msgstr ""
|
||||
|
||||
#. TRN "m" means "minutes"
|
||||
#: src/libslic3r/Utils.cpp:1016 src/libslic3r/Utils.cpp:1018
|
||||
#: src/libslic3r/Utils.cpp:1021
|
||||
#, possible-boost-format
|
||||
msgid "%1%m"
|
||||
msgstr ""
|
||||
|
||||
#: src/libslic3r/Utils.cpp:1022
|
||||
#, possible-boost-format
|
||||
msgid "%1%s"
|
||||
msgstr ""
|
||||
|
||||
#: src/libslic3r/PrintBase.cpp:80
|
||||
msgid "Failed processing of the output_filename_format template."
|
||||
msgstr ""
|
||||
|
@ -568,9 +568,9 @@ namespace ImGui
|
||||
// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible.
|
||||
// - You can pass the address of a first float element out of a contiguous structure, e.g. &myvector.x
|
||||
IMGUI_API bool ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0);
|
||||
IMGUI_API bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0);
|
||||
IMGUI_API bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const char* current_label = NULL, const char* original_label = NULL);
|
||||
IMGUI_API bool ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0);
|
||||
IMGUI_API bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL);
|
||||
IMGUI_API bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL, const char* current_label = NULL, const char* original_label = NULL);
|
||||
IMGUI_API bool ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0, 0)); // display a color square/button, hover for details, return true when pressed.
|
||||
IMGUI_API void SetColorEditOptions(ImGuiColorEditFlags flags); // initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.
|
||||
|
||||
|
@ -4689,7 +4689,7 @@ bool ImGui::ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flag
|
||||
// Edit colors components (each component in 0.0f..1.0f range).
|
||||
// See enum ImGuiColorEditFlags_ for available options. e.g. Only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set.
|
||||
// With typical options: Left-click on color square to open color picker. Right-click to open option menu. CTRL-Click over input fields to edit them and TAB to go to next item.
|
||||
bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags)
|
||||
bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags, const char* current_label/* = NULL*/, const char* original_label/* = NULL*/)
|
||||
{
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
@ -4859,7 +4859,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flag
|
||||
ImGuiColorEditFlags picker_flags_to_forward = ImGuiColorEditFlags__DataTypeMask | ImGuiColorEditFlags__PickerMask | ImGuiColorEditFlags__InputMask | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaBar;
|
||||
ImGuiColorEditFlags picker_flags = (flags_untouched & picker_flags_to_forward) | ImGuiColorEditFlags__DisplayMask | ImGuiColorEditFlags_NoLabel | ImGuiColorEditFlags_AlphaPreviewHalf;
|
||||
SetNextItemWidth(square_sz * 12.0f); // Use 256 + bar sizes?
|
||||
value_changed |= ColorPicker4("##picker", col, picker_flags, &g.ColorPickerRef.x);
|
||||
value_changed |= ColorPicker4("##picker", col, picker_flags, &g.ColorPickerRef.x, current_label, original_label);
|
||||
EndPopup();
|
||||
}
|
||||
}
|
||||
@ -4952,7 +4952,7 @@ static void RenderArrowsForVerticalBar(ImDrawList* draw_list, ImVec2 pos, ImVec2
|
||||
// (In C++ the 'float col[4]' notation for a function argument is equivalent to 'float* col', we only specify a size to facilitate understanding of the code.)
|
||||
// FIXME: we adjust the big color square height based on item width, which may cause a flickering feedback loop (if automatic height makes a vertical scrollbar appears, affecting automatic width..)
|
||||
// FIXME: this is trying to be aware of style.Alpha but not fully correct. Also, the color wheel will have overlapping glitches with (style.Alpha < 1.0)
|
||||
bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags, const float* ref_col)
|
||||
bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags, const float* ref_col, const char* current_label/*=NULL*/, const char* original_label/*=NULL*/)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
@ -5126,13 +5126,13 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl
|
||||
PushItemFlag(ImGuiItemFlags_NoNavDefaultFocus, true);
|
||||
ImVec4 col_v4(col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
|
||||
if ((flags & ImGuiColorEditFlags_NoLabel))
|
||||
Text("Current");
|
||||
Text(current_label ? current_label : "Current");
|
||||
|
||||
ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags__InputMask | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf | ImGuiColorEditFlags_NoTooltip;
|
||||
ColorButton("##current", col_v4, (flags & sub_flags_to_forward), ImVec2(square_sz * 3, square_sz * 2));
|
||||
if (ref_col != NULL)
|
||||
{
|
||||
Text("Original");
|
||||
Text(original_label ? original_label : "Original");
|
||||
ImVec4 ref_col_v4(ref_col[0], ref_col[1], ref_col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : ref_col[3]);
|
||||
if (ColorButton("##original", ref_col_v4, (flags & sub_flags_to_forward), ImVec2(square_sz * 3, square_sz * 2)))
|
||||
{
|
||||
|
@ -335,7 +335,8 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott
|
||||
const ColorRGBA& select_first_color = m_modified_extruders_colors[m_first_selected_extruder_idx];
|
||||
ImVec4 first_color = ImGuiWrapper::to_ImVec4(select_first_color);
|
||||
const std::string first_label = into_u8(m_desc.at("first_color")) + "##color_picker";
|
||||
if (ImGui::ColorEdit4(first_label.c_str(), (float*)&first_color, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel))
|
||||
if (ImGui::ColorEdit4(first_label.c_str(), (float*)&first_color, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel,
|
||||
_u8L("Current").c_str(), _u8L("Original").c_str()))
|
||||
m_modified_extruders_colors[m_first_selected_extruder_idx] = ImGuiWrapper::from_ImVec4(first_color);
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
@ -348,7 +349,8 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott
|
||||
const ColorRGBA& select_second_color = m_modified_extruders_colors[m_second_selected_extruder_idx];
|
||||
ImVec4 second_color = ImGuiWrapper::to_ImVec4(select_second_color);
|
||||
const std::string second_label = into_u8(m_desc.at("second_color")) + "##color_picker";
|
||||
if (ImGui::ColorEdit4(second_label.c_str(), (float*)&second_color, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel))
|
||||
if (ImGui::ColorEdit4(second_label.c_str(), (float*)&second_color, ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoInputs | ImGuiColorEditFlags_NoLabel,
|
||||
_u8L("Current").c_str(), _u8L("Original").c_str()))
|
||||
m_modified_extruders_colors[m_second_selected_extruder_idx] = ImGuiWrapper::from_ImVec4(second_color);
|
||||
|
||||
const float max_tooltip_width = ImGui::GetFontSize() * 20.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user