UICodeEditor link hover improvements.

This commit is contained in:
Martín Lucas Golini
2022-03-16 20:10:51 -03:00
parent 153aeebcf7
commit 55e8a239ef
8 changed files with 130 additions and 42 deletions

View File

@@ -44,9 +44,9 @@ class EE_API SyntaxColorScheme {
Style( const Color& color ) : color( color ) {}
Style( const Color& color, const Color& background, const Uint32& style ) :
color( color ), background( background ), style( style ) {}
Color color{Color::White};
Color background{Color::Transparent};
Uint32 style{0};
Color color{ Color::White };
Color background{ Color::Transparent };
Uint32 style{ 0 };
};
SyntaxColorScheme();
@@ -57,6 +57,8 @@ class EE_API SyntaxColorScheme {
const Style& getSyntaxStyle( const std::string& type ) const;
bool hasSyntaxStyle( const std::string& type ) const;
void setSyntaxStyles( const std::unordered_map<std::string, Style>& styles );
void setSyntaxStyle( const std::string& type, const Style& style );

View File

@@ -428,6 +428,8 @@ class EE_API UICodeEditor : public UIWidget, public TextDocument::Client {
bool mInteractiveLinks{ true };
bool mHandShown{ false };
bool mDisplayLoaderIfDocumentLoading{ true };
TextRange mLinkPosition;
String mLink;
Uint32 mTabWidth;
Vector2f mScroll;
Float mMouseWheelScroll;
@@ -591,6 +593,8 @@ class EE_API UICodeEditor : public UIWidget, public TextDocument::Client {
String checkMouseOverLink( const Vector2i& position );
String resetLinkOver();
void resetPreviewColor();
void disableEditorFeatures();