GUI: wrap text in warning pop-up
This commit is contained in:
parent
319a557ec3
commit
96f0f7bd78
2 changed files with 4 additions and 2 deletions
2
extern/imgui_patched/imgui.h
vendored
2
extern/imgui_patched/imgui.h
vendored
|
|
@ -621,7 +621,7 @@ namespace ImGui
|
|||
IMGUI_API void TextColoredV(const ImVec4& col, const char* fmt, va_list args) IM_FMTLIST(2);
|
||||
IMGUI_API void TextDisabled(const char* fmt, ...) IM_FMTARGS(1); // shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor();
|
||||
IMGUI_API void TextDisabledV(const char* fmt, va_list args) IM_FMTLIST(1);
|
||||
IMGUI_API void TextWrapped(const char* fmt, ...) IM_FMTARGS(1); // shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize().
|
||||
IMGUI_API void TextWrapped(const char* fmt, ...) IM_FMTARGS(1); // shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, you may need to set a size using SetNextWindowSize().
|
||||
IMGUI_API void TextWrappedV(const char* fmt, va_list args) IM_FMTLIST(1);
|
||||
IMGUI_API void LabelText(const char* label, const char* fmt, ...) IM_FMTARGS(2); // display text+label aligned the same way as value+label widgets
|
||||
IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args) IM_FMTLIST(2);
|
||||
|
|
|
|||
|
|
@ -6253,7 +6253,9 @@ bool FurnaceGUI::loop() {
|
|||
|
||||
centerNextWindow(_("Warning"),canvasW,canvasH);
|
||||
if (ImGui::BeginPopupModal(_("Warning"),NULL,ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||
ImGui::Text("%s",warnString.c_str());
|
||||
ImGui::PushTextWrapPos(canvasW);
|
||||
ImGui::TextUnformatted(warnString.c_str());
|
||||
ImGui::PopTextWrapPos();
|
||||
switch (warnAction) {
|
||||
case GUI_WARN_QUIT:
|
||||
if (ImGui::Button(_("Yes"))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue