Fix compilation errors.

This commit is contained in:
Artyom Shalkhakov 2025-02-20 00:36:25 -07:00
parent e83c3ae3df
commit 5fba052d81
3 changed files with 8 additions and 6 deletions

View file

@ -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();

View file

@ -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

View file

@ -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;