@@ -32,7 +32,7 @@ public static void DrawTooltip(SpriteBatch sb, SpriteFont font, Texture2D px, st
3232 float oy = ( float ) ( ( rnd . NextDouble ( ) * r . Height + totalTime * 5 ) % r . Height ) ;
3333 sb . Draw ( px , new Rectangle ( ( int ) ( r . X + ox ) , ( int ) ( r . Y + oy ) , 2 , 2 ) , Color . Gold * 0.2f ) ;
3434 }
35- sb . Draw ( px , new Rectangle ( r . X , r . Y , r . Width , 1 ) , Color . Gray * 0.5f ) ; sb . Draw ( px , new Rectangle ( r . X , r . Bottom , r . Width , 1 ) , Color . Gray * 0.5f ) ; sb . Draw ( px , new Rectangle ( r . X , r . Y , 1 , r . Height ) , Color . Gray * 0.5f ) ; sb . Draw ( px , new Rectangle ( r . Right , r . Y , 1 , r . Height ) , Color . Gray * 0.5f ) ;
35+ sb . Draw ( px , new Rectangle ( r . X , r . Y , r . Width , 1 ) , Color . Gray * 0.5f ) ; sb . Draw ( px , new Rectangle ( r . X , r . Bottom , r . Width , 1 ) , Color . Gray * 0.5f ) ; sb . Draw ( px , new Rectangle ( r . X , r . Y , 1 , r . Height ) , Color . Gray * 0.5f ) ; sb . Draw ( px , new Rectangle ( r . X , r . Y , 1 , r . Height ) , Color . Gray * 0.5f ) ;
3636
3737 var curY = pos . Y ;
3838 foreach ( var tokens in parsedLines )
@@ -60,7 +60,7 @@ private static List<string> WrapText(SpriteFont font, string text, int maxW, flo
6060 return lines ;
6161 }
6262
63- public static void DrawPanel ( SpriteBatch sb , Texture2D px , Rectangle r , Color color , double totalTime , float opacity = 0.1f )
63+ public static void DrawPanel ( SpriteBatch sb , Texture2D px , Rectangle r , Color color , double totalTime , float activity , float opacity = 0.1f )
6464 {
6565 sb . Draw ( px , r , Color . Black * opacity ) ;
6666 sb . Draw ( px , r , color * ( opacity * 0.5f ) ) ;
@@ -70,6 +70,21 @@ public static void DrawPanel(SpriteBatch sb, Texture2D px, Rectangle r, Color co
7070 sb . Draw ( px , new Rectangle ( r . X , r . Bottom - t , r . Width , t ) , color * ( 0.5f * pulse ) ) ;
7171 sb . Draw ( px , new Rectangle ( r . X , r . Y , t , r . Height ) , color * ( 0.5f * pulse ) ) ;
7272 sb . Draw ( px , new Rectangle ( r . Right - t , r . Y , t , r . Height ) , color * ( 0.5f * pulse ) ) ;
73+
74+ // Adaptive Runic HUD: Moving rune accents along edges
75+ float speedMult = 1.0f + activity * 10.0f ;
76+ float offset = ( float ) ( totalTime * 50.0 * speedMult ) ;
77+ for ( int i = 0 ; i < 4 ; i ++ ) {
78+ float edgePos = ( offset + i * 200 ) % ( r . Width * 2 + r . Height * 2 ) ;
79+ Vector2 runePos ;
80+ if ( edgePos < r . Width ) runePos = new Vector2 ( r . X + edgePos , r . Y ) ;
81+ else if ( edgePos < r . Width + r . Height ) runePos = new Vector2 ( r . Right , r . Y + ( edgePos - r . Width ) ) ;
82+ else if ( edgePos < r . Width * 2 + r . Height ) runePos = new Vector2 ( r . Right - ( edgePos - ( r . Width + r . Height ) ) , r . Bottom ) ;
83+ else runePos = new Vector2 ( r . X , r . Bottom - ( edgePos - ( r . Width * 2 + r . Height ) ) ) ;
84+ sb . Draw ( px , new Rectangle ( ( int ) runePos . X - 2 , ( int ) runePos . Y - 2 , 4 , 4 ) , color * pulse ) ;
85+ }
86+
87+ // Corner accents
7388 sb . Draw ( px , new Rectangle ( r . X , r . Y , 15 , 2 ) , color * pulse ) ; sb . Draw ( px , new Rectangle ( r . X , r . Y , 2 , 15 ) , color * pulse ) ;
7489 sb . Draw ( px , new Rectangle ( r . Right - 15 , r . Y , 15 , 2 ) , color * pulse ) ; sb . Draw ( px , new Rectangle ( r . Right - 2 , r . Y , 2 , 15 ) , color * pulse ) ;
7590 sb . Draw ( px , new Rectangle ( r . X , r . Bottom - 2 , 15 , 2 ) , color * pulse ) ; sb . Draw ( px , new Rectangle ( r . X , r . Bottom - 15 , 2 , 15 ) , color * pulse ) ;
0 commit comments