diff --git a/neo/tools/imgui/decleditor/DeclNew.cpp b/neo/tools/imgui/decleditor/DeclNew.cpp index e17f322e..d3f6e54f 100644 --- a/neo/tools/imgui/decleditor/DeclNew.cpp +++ b/neo/tools/imgui/decleditor/DeclNew.cpp @@ -103,7 +103,7 @@ bool DeclNew::Draw() { bool canceled = false; if ( ImGui::BeginPopupModal( "New Declaration", nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { - ImGui::TextColored( ImVec4( 1, 0, 0, 1 ), errorText ); + ImGui::TextColored( ImVec4( 1, 0, 0, 1 ), "%s", errorText.c_str() ); const char *previewValue = typeListSel == -1 ? NULL : typeList[typeListSel].c_str(); diff --git a/neo/tools/imgui/util/ImGui_IdWidgets.cpp b/neo/tools/imgui/util/ImGui_IdWidgets.cpp index 663f43cf..ecb16b04 100644 --- a/neo/tools/imgui/util/ImGui_IdWidgets.cpp +++ b/neo/tools/imgui/util/ImGui_IdWidgets.cpp @@ -231,7 +231,7 @@ bool DeclNewSelect::Draw() { bool canceled = false; if ( ImGui::BeginPopupModal( label, nullptr, ImGuiWindowFlags_AlwaysAutoResize ) ) { - ImGui::TextColored( ImVec4( 1, 0, 0, 1 ), errorText ); + ImGui::TextColored( ImVec4( 1, 0, 0, 1 ), "%s", errorText.c_str() ); if ( ImGui::InputTextStr( "File Name", &fileName ) ) { // nop @@ -348,7 +348,7 @@ bool DeclSelect::Draw() { bool canceled = false; if ( ImGui::BeginPopupModal( label, nullptr, ImGuiWindowFlags_AlwaysAutoResize ) ) { - ImGui::TextColored( ImVec4( 1, 0, 0, 1 ), errorText ); + ImGui::TextColored( ImVec4( 1, 0, 0, 1 ), "%s", errorText.c_str() ); if ( ImGui::InputTextStr( "Name", &name ) ) { // nop diff --git a/neo/tools/imgui/util/SyntaxRichEditCtrl.cpp b/neo/tools/imgui/util/SyntaxRichEditCtrl.cpp index 900f8c90..51a15569 100644 --- a/neo/tools/imgui/util/SyntaxRichEditCtrl.cpp +++ b/neo/tools/imgui/util/SyntaxRichEditCtrl.cpp @@ -38,7 +38,9 @@ If you have questions concerning this license or the applicable additional terms #include "sys/sys_imgui.h" namespace ImGuiTools { - + +const int MOUSEWHEEL_DELTA = 120; + const int AUTOCOMPLETE_WIDTH = 200; const int AUTOCOMPLETE_HEIGHT = 180; const int AUTOCOMPLETE_OFFSET = 16; @@ -1046,9 +1048,9 @@ void SyntaxRichEditCtrl::OnMouseWheel( float wheel ) { int sel; if ( wheel > 0 ) { - sel = Max( 0, autoCompleteListBoxSel - (int)( wheel / WHEEL_DELTA ) ); + sel = Max( 0, autoCompleteListBoxSel - (int)( wheel / MOUSEWHEEL_DELTA ) ); } else { - sel = Min( autoCompleteListBoxFiltered.Num() - 1, autoCompleteListBoxSel - (int)( wheel / WHEEL_DELTA ) ); + sel = Min( autoCompleteListBoxFiltered.Num() - 1, autoCompleteListBoxSel - (int)( wheel / MOUSEWHEEL_DELTA ) ); } autoCompleteListBoxSel = sel; return;