MCPcopy Create free account
hub / github.com/BobbyAnguelov/Esoterica / IsHoveredOverCurve

Function IsHoveredOverCurve

Code/EngineTools/NodeGraph/NodeGraph_View.cpp:43–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 static Color AdjustColorBasedOnVisualState( Color const& color, TBitFlags<NodeVisualState> visualState )
44 {
45 Color modifiedColor = color;
46
47 if ( visualState.IsFlagSet( NodeVisualState::Selected ) && visualState.IsFlagSet( NodeVisualState::Hovered ) )
48 {
49 modifiedColor = color.GetScaledColor( 1.6f );
50 }
51 else if ( visualState.IsFlagSet( NodeVisualState::Selected ) )
52 {
53 modifiedColor = color.GetScaledColor( 1.45f );
54 }
55 else if ( visualState.IsFlagSet( NodeVisualState::Hovered ) )
56 {
57 modifiedColor = color.GetScaledColor( 1.15f );
58 }
59
60 return modifiedColor;
61 }
62
63 static void GetNodeBackgroundAndBorderColors( Color titleBarColor, Color baseColor, TBitFlags<NodeVisualState> visualState, Color& outTitleBarColor, Color& outBackgroundColor, Color& outBorderColor )
64 {
65 if ( visualState.IsFlagSet( NodeVisualState::Selected ) && visualState.IsFlagSet( NodeVisualState::Hovered ) )
66 {

Callers 1

UpdateAndDrawMethod · 0.85

Calls 7

ImVec2Function · 0.85
ImMinFunction · 0.85
ImMaxFunction · 0.85
VectorFunction · 0.50
AddMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected