Skip to content

Commit

Permalink
Obsoleted ImGuiCol_ChildWindowBg fix.
Browse files Browse the repository at this point in the history
And a warning fix.
  • Loading branch information
BalazsJako committed Jun 15, 2019
1 parent 9f8a336 commit 0a88824
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions TextEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -994,10 +994,10 @@ void TextEditor::Render()
}
else
{
char buf[2];
buf[0] = line[cindex].mChar;
buf[1] = '\0';
width = ImGui::GetFont()->CalcTextSizeA(ImGui::GetFontSize(), FLT_MAX, -1.0f, buf).x;
char buf2[2];
buf2[0] = line[cindex].mChar;
buf2[1] = '\0';
width = ImGui::GetFont()->CalcTextSizeA(ImGui::GetFontSize(), FLT_MAX, -1.0f, buf2).x;
}
}
ImVec2 cstart(textScreenPos.x + cx, lineStartScreenPos.y);
Expand Down Expand Up @@ -1124,7 +1124,7 @@ void TextEditor::Render(const char* aTitle, const ImVec2& aSize, bool aBorder)
mTextChanged = false;
mCursorPositionChanged = false;

ImGui::PushStyleColor(ImGuiCol_ChildWindowBg, ImGui::ColorConvertU32ToFloat4(mPalette[(int)PaletteIndex::Background]));
ImGui::PushStyleColor(ImGuiCol_ChildBg, ImGui::ColorConvertU32ToFloat4(mPalette[(int)PaletteIndex::Background]));
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f));
if (!mIgnoreImGuiChild)
ImGui::BeginChild(aTitle, aSize, aBorder, ImGuiWindowFlags_HorizontalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar | ImGuiWindowFlags_NoMove);
Expand Down

0 comments on commit 0a88824

Please sign in to comment.