mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
SLA support points improvements
- semi-intelligent algorithm to place support points - enhanced ImGui dialog with editing/non-editing mode - support points can have different head diameter (only implemented in GUI so far) - autogenerated points supporting emerging islands are annotated and the info is kept
This commit is contained in:
parent
f4243c694f
commit
21026ec9a8
16 changed files with 433 additions and 495 deletions
|
@ -125,6 +125,12 @@ bool ImGuiWrapper::button(const wxString &label)
|
|||
return ImGui::Button(label_utf8.c_str());
|
||||
}
|
||||
|
||||
bool ImGuiWrapper::radio_button(const wxString &label, bool active)
|
||||
{
|
||||
auto label_utf8 = into_u8(label);
|
||||
return ImGui::RadioButton(label_utf8.c_str(), active);
|
||||
}
|
||||
|
||||
bool ImGuiWrapper::input_double(const std::string &label, const double &value, const std::string &format)
|
||||
{
|
||||
return ImGui::InputDouble(label.c_str(), const_cast<double*>(&value), 0.0f, 0.0f, format.c_str());
|
||||
|
@ -161,6 +167,26 @@ void ImGuiWrapper::text(const wxString &label)
|
|||
ImGui::Text(label_utf8.c_str(), NULL);
|
||||
}
|
||||
|
||||
|
||||
void ImGuiWrapper::combo(const wxString& label, const std::vector<wxString>& options, wxString& selection)
|
||||
{
|
||||
const char* selection_u8 = into_u8(selection).c_str();
|
||||
|
||||
// this is to force the label to the left of the widget:
|
||||
text(label);
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::BeginCombo("", selection_u8)) {
|
||||
for (const wxString& option : options) {
|
||||
const char* option_u8 = into_u8(option).c_str();
|
||||
bool is_selected = (selection_u8 == nullptr) ? false : strcmp(option_u8, selection_u8) == 0;
|
||||
if (ImGui::Selectable(option_u8, is_selected))
|
||||
selection = option_u8;
|
||||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
}
|
||||
|
||||
void ImGuiWrapper::disabled_begin(bool disabled)
|
||||
{
|
||||
wxCHECK_RET(!m_disabled, "ImGUI: Unbalanced disabled_begin() call");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue