@@ -367,7 +367,7 @@ public Vector2 EntityDefaultSize
367
367
protected virtual void DoOnFirstUpdate ( )
368
368
{
369
369
// call the spawn event
370
- UserInterface . OnEntitySpawn ? . Invoke ( this ) ;
370
+ UserInterface . Active . OnEntitySpawn ? . Invoke ( this ) ;
371
371
372
372
// make parent dirty
373
373
if ( _parent != null ) { _parent . MarkAsDirty ( ) ; }
@@ -419,19 +419,19 @@ public void UpdateStyle(StyleSheet updates)
419
419
}
420
420
421
421
/// <summary>Get extra space after with current UI scale applied. </summary>
422
- protected Vector2 _scaledSpaceAfter { get { return SpaceAfter * UserInterface . GlobalScale ; } }
422
+ protected Vector2 _scaledSpaceAfter { get { return SpaceAfter * UserInterface . Active . GlobalScale ; } }
423
423
424
424
/// <summary>Get extra space before with current UI scale applied. </summary>
425
- protected Vector2 _scaledSpaceBefore { get { return SpaceBefore * UserInterface . GlobalScale ; } }
425
+ protected Vector2 _scaledSpaceBefore { get { return SpaceBefore * UserInterface . Active . GlobalScale ; } }
426
426
427
427
/// <summary>Get size with current UI scale applied. </summary>
428
- protected Vector2 _scaledSize { get { return _size * UserInterface . GlobalScale ; } }
428
+ protected Vector2 _scaledSize { get { return _size * UserInterface . Active . GlobalScale ; } }
429
429
430
430
/// <summary>Get offset with current UI scale applied. </summary>
431
- protected Vector2 _scaledOffset { get { return _offset * UserInterface . GlobalScale ; } }
431
+ protected Vector2 _scaledOffset { get { return _offset * UserInterface . Active . GlobalScale ; } }
432
432
433
433
/// <summary>Get offset with current UI scale applied. </summary>
434
- protected Vector2 _scaledPadding { get { return Padding * UserInterface . GlobalScale ; } }
434
+ protected Vector2 _scaledPadding { get { return Padding * UserInterface . Active . GlobalScale ; } }
435
435
436
436
/// <summary>
437
437
/// Set / get visibility.
@@ -894,9 +894,9 @@ virtual public void Draw(SpriteBatch spriteBatch)
894
894
DrawEntityOutline ( spriteBatch ) ;
895
895
896
896
// draw the entity itself
897
- UserInterface . DrawUtils . StartDraw ( spriteBatch , _isCurrentlyDisabled ) ;
897
+ UserInterface . Active . DrawUtils . StartDraw ( spriteBatch , _isCurrentlyDisabled ) ;
898
898
DrawEntity ( spriteBatch ) ;
899
- UserInterface . DrawUtils . EndDraw ( spriteBatch ) ;
899
+ UserInterface . Active . DrawUtils . EndDraw ( spriteBatch ) ;
900
900
901
901
// do stuff before drawing children
902
902
BeforeDrawChildren ( spriteBatch ) ;
@@ -974,9 +974,9 @@ virtual protected void DrawEntityShadow(SpriteBatch spriteBatch)
974
974
}
975
975
976
976
// draw with shadow effect
977
- UserInterface . DrawUtils . StartDrawSilhouette ( spriteBatch ) ;
977
+ UserInterface . Active . DrawUtils . StartDrawSilhouette ( spriteBatch ) ;
978
978
DrawEntity ( spriteBatch ) ;
979
- UserInterface . DrawUtils . EndDraw ( spriteBatch ) ;
979
+ UserInterface . Active . DrawUtils . EndDraw ( spriteBatch ) ;
980
980
981
981
// return position and colors back to what they were
982
982
_destRect . X -= ( int ) ShadowOffset . X ;
@@ -1024,7 +1024,7 @@ virtual protected void DrawEntityOutline(SpriteBatch spriteBatch)
1024
1024
SetStyleProperty ( StylePropertyIds . FillColor , new StyleProperty ( outlineColor ) , oldState , markAsDirty : false ) ;
1025
1025
1026
1026
// draw the entity outline
1027
- UserInterface . DrawUtils . StartDrawSilhouette ( spriteBatch ) ;
1027
+ UserInterface . Active . DrawUtils . StartDrawSilhouette ( spriteBatch ) ;
1028
1028
_destRect . Location = originalDest . Location + new Point ( - outlineWidth , 0 ) ;
1029
1029
DrawEntity ( spriteBatch ) ;
1030
1030
_destRect . Location = originalDest . Location + new Point ( 0 , - outlineWidth ) ;
@@ -1033,7 +1033,7 @@ virtual protected void DrawEntityOutline(SpriteBatch spriteBatch)
1033
1033
DrawEntity ( spriteBatch ) ;
1034
1034
_destRect . Location = originalDest . Location + new Point ( 0 , outlineWidth ) ;
1035
1035
DrawEntity ( spriteBatch ) ;
1036
- UserInterface . DrawUtils . EndDraw ( spriteBatch ) ;
1036
+ UserInterface . Active . DrawUtils . EndDraw ( spriteBatch ) ;
1037
1037
1038
1038
// turn back to previous fill color
1039
1039
SetStyleProperty ( StylePropertyIds . FillColor , new StyleProperty ( oldFill ) , oldState , markAsDirty : false ) ;
@@ -1059,7 +1059,7 @@ virtual protected void DrawEntity(SpriteBatch spriteBatch)
1059
1059
virtual protected void OnAfterDraw ( SpriteBatch spriteBatch )
1060
1060
{
1061
1061
AfterDraw ? . Invoke ( this ) ;
1062
- UserInterface . AfterDraw ? . Invoke ( this ) ;
1062
+ UserInterface . Active . AfterDraw ? . Invoke ( this ) ;
1063
1063
}
1064
1064
1065
1065
/// <summary>
@@ -1069,7 +1069,7 @@ virtual protected void OnAfterDraw(SpriteBatch spriteBatch)
1069
1069
virtual protected void OnBeforeDraw ( SpriteBatch spriteBatch )
1070
1070
{
1071
1071
BeforeDraw ? . Invoke ( this ) ;
1072
- UserInterface . BeforeDraw ? . Invoke ( this ) ;
1072
+ UserInterface . Active . BeforeDraw ? . Invoke ( this ) ;
1073
1073
}
1074
1074
1075
1075
/// <summary>
@@ -1453,7 +1453,7 @@ protected Entity GetPreviousEntity(bool skipInvisibles = false)
1453
1453
virtual protected void DoOnMouseDown ( InputHelper input )
1454
1454
{
1455
1455
OnMouseDown ? . Invoke ( this ) ;
1456
- UserInterface . OnMouseDown ? . Invoke ( this ) ;
1456
+ UserInterface . Active . OnMouseDown ? . Invoke ( this ) ;
1457
1457
}
1458
1458
1459
1459
/// <summary>
@@ -1463,7 +1463,7 @@ virtual protected void DoOnMouseDown(InputHelper input)
1463
1463
virtual protected void DoOnMouseReleased ( InputHelper input )
1464
1464
{
1465
1465
OnMouseReleased ? . Invoke ( this ) ;
1466
- UserInterface . OnMouseReleased ? . Invoke ( this ) ;
1466
+ UserInterface . Active . OnMouseReleased ? . Invoke ( this ) ;
1467
1467
}
1468
1468
1469
1469
/// <summary>
@@ -1473,7 +1473,7 @@ virtual protected void DoOnMouseReleased(InputHelper input)
1473
1473
virtual protected void DoOnClick ( InputHelper input )
1474
1474
{
1475
1475
OnClick ? . Invoke ( this ) ;
1476
- UserInterface . OnClick ? . Invoke ( this ) ;
1476
+ UserInterface . Active . OnClick ? . Invoke ( this ) ;
1477
1477
}
1478
1478
1479
1479
/// <summary>
@@ -1483,7 +1483,7 @@ virtual protected void DoOnClick(InputHelper input)
1483
1483
virtual protected void DoWhileMouseDown ( InputHelper input )
1484
1484
{
1485
1485
WhileMouseDown ? . Invoke ( this ) ;
1486
- UserInterface . WhileMouseDown ? . Invoke ( this ) ;
1486
+ UserInterface . Active . WhileMouseDown ? . Invoke ( this ) ;
1487
1487
}
1488
1488
1489
1489
/// <summary>
@@ -1493,7 +1493,7 @@ virtual protected void DoWhileMouseDown(InputHelper input)
1493
1493
virtual protected void DoWhileMouseHover ( InputHelper input )
1494
1494
{
1495
1495
WhileMouseHover ? . Invoke ( this ) ;
1496
- UserInterface . WhileMouseHover ? . Invoke ( this ) ;
1496
+ UserInterface . Active . WhileMouseHover ? . Invoke ( this ) ;
1497
1497
}
1498
1498
1499
1499
/// <summary>
@@ -1502,7 +1502,7 @@ virtual protected void DoWhileMouseHover(InputHelper input)
1502
1502
virtual protected void DoOnValueChange ( )
1503
1503
{
1504
1504
OnValueChange ? . Invoke ( this ) ;
1505
- UserInterface . OnValueChange ? . Invoke ( this ) ;
1505
+ UserInterface . Active . OnValueChange ? . Invoke ( this ) ;
1506
1506
}
1507
1507
1508
1508
/// <summary>
@@ -1512,7 +1512,7 @@ virtual protected void DoOnValueChange()
1512
1512
virtual protected void DoOnMouseEnter ( InputHelper input )
1513
1513
{
1514
1514
OnMouseEnter ? . Invoke ( this ) ;
1515
- UserInterface . OnMouseEnter ? . Invoke ( this ) ;
1515
+ UserInterface . Active . OnMouseEnter ? . Invoke ( this ) ;
1516
1516
}
1517
1517
1518
1518
/// <summary>
@@ -1522,7 +1522,7 @@ virtual protected void DoOnMouseEnter(InputHelper input)
1522
1522
virtual protected void DoOnMouseLeave ( InputHelper input )
1523
1523
{
1524
1524
OnMouseLeave ? . Invoke ( this ) ;
1525
- UserInterface . OnMouseLeave ? . Invoke ( this ) ;
1525
+ UserInterface . Active . OnMouseLeave ? . Invoke ( this ) ;
1526
1526
}
1527
1527
1528
1528
/// <summary>
@@ -1532,7 +1532,7 @@ virtual protected void DoOnMouseLeave(InputHelper input)
1532
1532
virtual protected void DoOnStartDrag ( InputHelper input )
1533
1533
{
1534
1534
OnStartDrag ? . Invoke ( this ) ;
1535
- UserInterface . OnStartDrag ? . Invoke ( this ) ;
1535
+ UserInterface . Active . OnStartDrag ? . Invoke ( this ) ;
1536
1536
}
1537
1537
1538
1538
/// <summary>
@@ -1542,7 +1542,7 @@ virtual protected void DoOnStartDrag(InputHelper input)
1542
1542
virtual protected void DoOnStopDrag ( InputHelper input )
1543
1543
{
1544
1544
OnStopDrag ? . Invoke ( this ) ;
1545
- UserInterface . OnStopDrag ? . Invoke ( this ) ;
1545
+ UserInterface . Active . OnStopDrag ? . Invoke ( this ) ;
1546
1546
}
1547
1547
1548
1548
/// <summary>
@@ -1552,7 +1552,7 @@ virtual protected void DoOnStopDrag(InputHelper input)
1552
1552
virtual protected void DoWhileDragging ( InputHelper input )
1553
1553
{
1554
1554
WhileDragging ? . Invoke ( this ) ;
1555
- UserInterface . WhileDragging ? . Invoke ( this ) ;
1555
+ UserInterface . Active . WhileDragging ? . Invoke ( this ) ;
1556
1556
}
1557
1557
1558
1558
/// <summary>
@@ -1562,7 +1562,7 @@ virtual protected void DoWhileDragging(InputHelper input)
1562
1562
virtual protected void DoOnMouseWheelScroll ( InputHelper input )
1563
1563
{
1564
1564
OnMouseWheelScroll ? . Invoke ( this ) ;
1565
- UserInterface . OnMouseWheelScroll ? . Invoke ( this ) ;
1565
+ UserInterface . Active . OnMouseWheelScroll ? . Invoke ( this ) ;
1566
1566
}
1567
1567
1568
1568
/// <summary>
@@ -1572,7 +1572,7 @@ virtual protected void DoOnMouseWheelScroll(InputHelper input)
1572
1572
virtual protected void DoAfterUpdate ( InputHelper input )
1573
1573
{
1574
1574
AfterUpdate ? . Invoke ( this ) ;
1575
- UserInterface . AfterUpdate ? . Invoke ( this ) ;
1575
+ UserInterface . Active . AfterUpdate ? . Invoke ( this ) ;
1576
1576
}
1577
1577
1578
1578
/// <summary>
@@ -1582,7 +1582,7 @@ virtual protected void DoOnVisibilityChange()
1582
1582
{
1583
1583
// invoke callbacks
1584
1584
OnVisiblityChange ? . Invoke ( this ) ;
1585
- UserInterface . OnVisiblityChange ? . Invoke ( this ) ;
1585
+ UserInterface . Active . OnVisiblityChange ? . Invoke ( this ) ;
1586
1586
}
1587
1587
1588
1588
/// <summary>
@@ -1592,7 +1592,7 @@ virtual protected void DoOnVisibilityChange()
1592
1592
virtual protected void DoBeforeUpdate ( InputHelper input )
1593
1593
{
1594
1594
BeforeUpdate ? . Invoke ( this ) ;
1595
- UserInterface . BeforeUpdate ? . Invoke ( this ) ;
1595
+ UserInterface . Active . BeforeUpdate ? . Invoke ( this ) ;
1596
1596
}
1597
1597
1598
1598
/// <summary>
@@ -1873,7 +1873,7 @@ virtual public void Update(InputHelper input, ref Entity targetEntity, ref Entit
1873
1873
}
1874
1874
1875
1875
// handle mouse wheel scroll over this entity
1876
- if ( targetEntity == this || UserInterface . ActiveEntity == this )
1876
+ if ( targetEntity == this || UserInterface . Active . ActiveEntity == this )
1877
1877
{
1878
1878
if ( input . MouseWheelChange != 0 )
1879
1879
{
0 commit comments