Add warning line gap is not shown in text box

Imgui not support add line gap to FONT yet
This commit is contained in:
Filip Sykala 2022-02-16 09:04:13 +01:00
parent 84cd85e243
commit 7208fc571e

View File

@ -787,12 +787,21 @@ void GLGizmoEmboss::draw_text_input()
const FontProp& prop = m_font_manager.get_font_prop(); const FontProp& prop = m_font_manager.get_font_prop();
if (!exist_font) { if (!exist_font) {
warning = _u8L("Can't write text by selected font."); warning = _u8L("Can't write text by selected font.");
}else if (prop.skew.has_value()) } else {
warning = prop.boldness.has_value() ? std::string who;
_u8L("Italic & Bold is NOT shown") : if (prop.skew.has_value()) who = _u8L("Italic");
_u8L("Italic is NOT shown"); if (prop.boldness.has_value()) {
else if (prop.boldness.has_value()) if (!who.empty()) who += " & ";
warning = _u8L("Boldness is NOT shown"); who += _u8L("Boldness");
}
if (prop.line_gap.has_value()) {
if (!who.empty()) who += " & ";
who += _u8L("Line gap");
}
if (!who.empty()) {
warning = GUI::format(_u8L("%1% is NOT shown."), who);
}
}
if (!warning.empty()) { if (!warning.empty()) {
ImVec2 cursor = ImGui::GetCursorPos(); ImVec2 cursor = ImGui::GetCursorPos();