mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-28 17:16:29 +03:00
Updated efsw.
ecode: Minor improvements in autocomplete plugin.
This commit is contained in:
@@ -39,7 +39,7 @@ using namespace EE::Graphics;
|
||||
using namespace EE::Network;
|
||||
using namespace EE::Network::SSL;
|
||||
|
||||
// Scnee
|
||||
// Scene
|
||||
#include <eepp/scene.hpp>
|
||||
using namespace EE::Scene;
|
||||
|
||||
|
||||
@@ -1040,7 +1040,6 @@ solution "eepp"
|
||||
language "C++"
|
||||
set_targetdir("libs/" .. os.get_real() .. "/thirdparty/")
|
||||
includedirs { "src/thirdparty/efsw/include", "src/thirdparty/efsw/src" }
|
||||
defines { "EFSW_USE_CXX11" }
|
||||
if not is_vs() then
|
||||
buildoptions{ "-std=c++17" }
|
||||
else
|
||||
|
||||
@@ -11,6 +11,7 @@ newoption { trigger = "windows-mingw-build", description = "This is used to buil
|
||||
newoption { trigger = "with-emscripten-pthreads", description = "Enables emscripten build to use posix threads" }
|
||||
newoption { trigger = "with-mold-linker", description = "Tries to use the mold linker instead of the default linker of the toolchain" }
|
||||
newoption { trigger = "with-debug-symbols", description = "Release builds are built with debug symbols." }
|
||||
newoption { trigger = "thread-sanitizer", description ="Compile with ThreadSanitizer." }
|
||||
newoption {
|
||||
trigger = "with-backend",
|
||||
description = "Select the backend to use for window and input handling.\n\t\t\tIf no backend is selected or if the selected is not installed the script will search for a backend present in the system, and will use it.",
|
||||
@@ -788,7 +789,6 @@ workspace "eepp"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
cppdialect "C++17"
|
||||
defines { "EFSW_USE_CXX11" }
|
||||
targetdir("libs/" .. os.target() .. "/thirdparty/")
|
||||
incdirs { "src/thirdparty/efsw/include", "src/thirdparty/efsw/src" }
|
||||
files { "src/thirdparty/efsw/src/efsw/*.cpp" }
|
||||
|
||||
2
src/thirdparty/efsw
vendored
2
src/thirdparty/efsw
vendored
Submodule src/thirdparty/efsw updated: f3914e475c...3b0ffd2908
@@ -197,6 +197,8 @@ bool AutoCompletePlugin::onKeyDown( UICodeEditor* editor, const KeyEvent& event
|
||||
mSignatureHelpSelected % (int)mSignatureHelp.signatures.size();
|
||||
editor->invalidateDraw();
|
||||
return true;
|
||||
} else {
|
||||
resetSignatureHelp();
|
||||
}
|
||||
} else if ( event.getKeyCode() == KEY_DOWN ) {
|
||||
if ( mSignatureHelp.signatures.size() > 1 ) {
|
||||
@@ -208,6 +210,8 @@ bool AutoCompletePlugin::onKeyDown( UICodeEditor* editor, const KeyEvent& event
|
||||
mSignatureHelpSelected = mSignatureHelpSelected % mSignatureHelp.signatures.size();
|
||||
editor->invalidateDraw();
|
||||
return true;
|
||||
} else {
|
||||
resetSignatureHelp();
|
||||
}
|
||||
} else if ( event.getKeyCode() == EE::Window::KEY_BACKSPACE ||
|
||||
event.getKeyCode() == EE::Window::KEY_DELETE ) {
|
||||
@@ -686,7 +690,14 @@ void AutoCompletePlugin::postDraw( UICodeEditor* editor, const Vector2f& startSc
|
||||
Text text( "", editor->getFont(), editor->getFontSize() );
|
||||
text.setFillColor( mSuggestionIndex == (int)i ? selectedStyle.color : normalStyle.color );
|
||||
text.setStyle( mSuggestionIndex == (int)i ? selectedStyle.style : normalStyle.style );
|
||||
text.setString( suggestions[i].text );
|
||||
|
||||
auto nlPos = suggestions[i].text.find_first_of( '\n' );
|
||||
if ( nlPos == std::string::npos ) {
|
||||
text.setString( suggestions[i].text );
|
||||
} else {
|
||||
text.setString( suggestions[i].text.substr( 0, nlPos ) );
|
||||
}
|
||||
|
||||
text.draw( cursorPos.x + iconSpace.getWidth() + mBoxPadding.Left,
|
||||
cursorPos.y + mRowHeight * count + mBoxPadding.Top );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user