diff --git a/3rdparty/scintilla/include/Platform.h b/3rdparty/scintilla/include/Platform.h index 9c9253d25..9da75f400 100644 --- a/3rdparty/scintilla/include/Platform.h +++ b/3rdparty/scintilla/include/Platform.h @@ -65,7 +65,7 @@ #undef PLAT_MACOSX #define PLAT_MACOSX 1 -#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN64) +#elif defined(__WIN32__) || defined(_WIN32) || defined(_WIN64) #undef PLAT_WIN #define PLAT_WIN 1 diff --git a/examples/common/imgui/ocornut_imgui.cpp b/examples/common/imgui/ocornut_imgui.cpp index 6d2b0a59f..18dba5588 100644 --- a/examples/common/imgui/ocornut_imgui.cpp +++ b/examples/common/imgui/ocornut_imgui.cpp @@ -14,6 +14,7 @@ #if defined(SCI_NAMESPACE) # include "../entry/input.h" +# include "scintilla.h" #endif // defined(SCI_NAMESPACE) #include "vs_ocornut_imgui.bin.h" @@ -247,6 +248,11 @@ struct OcornutImguiContext ImGui::NewFrame(); //ImGui::ShowTestWindow(); //Debug only. + // +#if defined(SCI_NAMESPACE) && 0 + bool opened = true; + ImGuiScintilla("Scintilla Editor", &opened, ImVec2(640.0f, 480.0f) ); +#endif // 0 } void endFrame() diff --git a/examples/common/imgui/scintilla.cpp b/examples/common/imgui/scintilla.cpp index c341d409d..12f7d19ae 100644 --- a/examples/common/imgui/scintilla.cpp +++ b/examples/common/imgui/scintilla.cpp @@ -666,6 +666,14 @@ public: { Editor::KeyDown(SCK_DOWN, shift, ctrl, alt); } + else if (ImGui::IsKeyPressed(entry::Key::PageUp) ) + { + Editor::KeyDown(SCK_PRIOR, shift, ctrl, alt); + } + else if (ImGui::IsKeyPressed(entry::Key::PageDown) ) + { + Editor::KeyDown(SCK_NEXT, shift, ctrl, alt); + } else if (ImGui::IsKeyPressed(entry::Key::Home) ) { Editor::KeyDown(SCK_HOME, shift, ctrl, alt);