Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TFBACKGROUND_H
  8. #define TFBACKGROUND_H
  9. #include <vgui_controls/Frame.h>
  10. #include <vgui_controls/EditablePanel.h>
  11. //-----------------------------------------------------------------------------
  12. // Purpose: Creates background image panels
  13. //-----------------------------------------------------------------------------
  14. void CreateBackground( vgui::EditablePanel *pWindow );
  15. //-----------------------------------------------------------------------------
  16. // Purpose: Resizes windows to fit completely on-screen (for 1280x1024), and
  17. // centers them on the screen. Sub-controls are also resized and moved.
  18. //-----------------------------------------------------------------------------
  19. void LayoutBackgroundPanel( vgui::EditablePanel *pWindow );
  20. //-----------------------------------------------------------------------------
  21. // Purpose: Sets colors etc for background image panels
  22. //-----------------------------------------------------------------------------
  23. void ApplyBackgroundSchemeSettings( vgui::EditablePanel *pWindow, vgui::IScheme *pScheme );
  24. //-----------------------------------------------------------------------------
  25. // Purpose:
  26. //-----------------------------------------------------------------------------
  27. void ResizeWindowControls( vgui::EditablePanel *pWindow, int tall, int wide, int offsetX, int offsetY );
  28. //-----------------------------------------------------------------------------
  29. // Purpose: transform a standard scaled value into one that is scaled based the minimum
  30. // of the horizontal and vertical ratios
  31. //-----------------------------------------------------------------------------
  32. int GetAlternateProportionalValueFromScaled( vgui::HScheme hScheme, int scaledValue );
  33. //-----------------------------------------------------------------------------
  34. // Purpose:
  35. //-----------------------------------------------------------------------------
  36. void DrawRoundedBackground( Color bgColor, int wide, int tall );
  37. //-----------------------------------------------------------------------------
  38. // Purpose:
  39. //-----------------------------------------------------------------------------
  40. void DrawRoundedBorder( Color borderColor, int wide, int tall );
  41. //-----------------------------------------------------------------------------
  42. #endif // TFBACKGROUND_H