mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Added undo/redo icons. Fist step to implementation Undo/Redo list for toolbar
This commit is contained in:
parent
7b6229289d
commit
fbf14b42e9
9 changed files with 128 additions and 1 deletions
|
@ -342,6 +342,27 @@ bool ImGuiWrapper::combo(const wxString& label, const std::vector<std::string>&
|
|||
return res;
|
||||
}
|
||||
|
||||
// Getter for the const char*[]
|
||||
static bool StringGetter(void* data, int i, const char** out_text)
|
||||
{
|
||||
const std::vector<std::string>* v = (std::vector<std::string>*)data;
|
||||
if (out_text)
|
||||
*out_text = (*v)[i].c_str();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ImGuiWrapper::multi_sel_list(const wxString& label, const std::vector<std::string>& options, int& selection)
|
||||
{
|
||||
// this is to force the label to the left of the widget:
|
||||
if (!label.IsEmpty())
|
||||
text(label);
|
||||
|
||||
bool res = false;
|
||||
ImGui::ListBox("", &selection, StringGetter, (void*)&options, (int)options.size());
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
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