diff --git a/.gitignore b/.gitignore index 002ea13..aec6f08 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,5 @@ _bakeresourcecache/ *.vpost_c # Allowlist -!*_dev.vpk \ No newline at end of file +!*_dev.vpk +tm-manifest.json diff --git a/code/Progress/ProgressBar.cs b/code/Progress/ProgressBar.cs index 34ec827..010c4cc 100644 --- a/code/Progress/ProgressBar.cs +++ b/code/Progress/ProgressBar.cs @@ -39,8 +39,8 @@ public static void Draw( Rect rect, float progress, Color color, float curve = 2 Paint.DrawRect( rect, curve ); // process - var prect = rect.Contract( 1 ); - prect.width *= progress; + var prect = rect.Shrink( 1 ); + prect.Width *= progress; Paint.SetBrush( color ); Paint.DrawRect( prect, curve - 1 ); } diff --git a/code/Progress/ProgressRow.cs b/code/Progress/ProgressRow.cs index 9766588..ed430ea 100644 --- a/code/Progress/ProgressRow.cs +++ b/code/Progress/ProgressRow.cs @@ -89,43 +89,43 @@ protected override void OnPaint() Paint.ClearPen(); Paint.SetBrush( Theme.Grey.WithAlpha( 0.1f ) ); var r = rect; - r.height = 1; + r.Height = 1; Paint.DrawRect( r ); Paint.SetPen( color.WithAlpha( 0.3f ) ); - var iconRect = Paint.DrawIcon( rect.Contract( 16, 0 ), IconText, 32, TextFlag.LeftCenter ); + var iconRect = Paint.DrawIcon( rect.Shrink( 16, 0 ), IconText, 32, TextFlag.LeftCenter ); var contentRect = LocalRect; - contentRect.left += iconRect.right + 16; - contentRect.right -= 16.0f; + contentRect.Left += iconRect.Right + 16; + contentRect.Right -= 16.0f; if ( cancelButton != null && cancelButton.Visible ) { - contentRect.right = cancelButton.Position.x - 16.0f; + contentRect.Right = cancelButton.Position.x - 16.0f; } var barRect = contentRect; - barRect.top += (contentRect.height / 2.0f); - barRect.height = 6.0f; - barRect.top -= barRect.height / 2.0f; + barRect.Top += (contentRect.Height / 2.0f); + barRect.Height = 6.0f; + barRect.Top -= barRect.Height / 2.0f; ProgressBar.Draw( barRect, Progress, color ); Paint.SetDefaultFont( 8 ); Paint.SetPen( Theme.White.WithAlpha( 0.9f ) ); - Paint.DrawText( contentRect.Contract( 4, 11 ), Title, TextFlag.Left | TextFlag.Top ); + Paint.DrawText( contentRect.Shrink( 4, 11 ), Title, TextFlag.Left | TextFlag.Top ); if ( !string.IsNullOrEmpty( BottomRight ) ) { Paint.SetDefaultFont( 8 ); Paint.SetPen( Theme.White.WithAlpha( 0.7f ) ); - Paint.DrawText( contentRect.Contract( 4, 11 ), BottomRight, TextFlag.Bottom | TextFlag.Right ); + Paint.DrawText( contentRect.Shrink( 4, 11 ), BottomRight, TextFlag.Bottom | TextFlag.Right ); } if ( !string.IsNullOrEmpty( BottomLeft ) ) { Paint.SetDefaultFont( 8 ); Paint.SetPen( Theme.White.WithAlpha( 0.7f ) ); - Paint.DrawText( contentRect.Contract( 4, 11 ), BottomLeft, TextFlag.Bottom | TextFlag.Left ); + Paint.DrawText( contentRect.Shrink( 4, 11 ), BottomLeft, TextFlag.Bottom | TextFlag.Left ); } } diff --git a/code/Progress/ProgressWindow.cs b/code/Progress/ProgressWindow.cs index 91786b4..2dcb401 100644 --- a/code/Progress/ProgressWindow.cs +++ b/code/Progress/ProgressWindow.cs @@ -68,6 +68,6 @@ protected override void OnPaint() Paint.Antialiasing = true; Paint.SetPen( Theme.ControlBackground.Darken( 0.4f ), 2.0f ); Paint.SetBrush( Theme.ControlBackground ); - Paint.DrawRect( LocalRect.Contract( 1 ), 0.0f ); + Paint.DrawRect( LocalRect.Shrink( 1 ), 0.0f ); } }