GUIContent.generated.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using System.Runtime.InteropServices;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup GUI
  7. * @{
  8. */
  9. /// <summary>
  10. /// Holds data used for displaying content in a GUIElement. Content can consist of a string, image, a tooltip or none of
  11. /// those.
  12. /// </summary>
  13. [StructLayout(LayoutKind.Sequential), SerializeObject]
  14. public partial struct GUIContent
  15. {
  16. /// <summary>Initializes the struct with default values.</summary>
  17. public static GUIContent Default()
  18. {
  19. GUIContent value = new GUIContent();
  20. value.text = null;
  21. value.images = new GUIContentImages();
  22. value.tooltip = null;
  23. return value;
  24. }
  25. /// <summary>Constructs content with just a string.</summary>
  26. public GUIContent(LocString text)
  27. {
  28. this.text = text;
  29. this.images = new GUIContentImages();
  30. this.tooltip = null;
  31. }
  32. /// <summary>Constructs content with a string and a tooltip.</summary>
  33. public GUIContent(LocString text, LocString tooltip)
  34. {
  35. this.text = text;
  36. this.images = new GUIContentImages();
  37. this.tooltip = tooltip;
  38. }
  39. /// <summary>Constructs content with just an image.</summary>
  40. public GUIContent(GUIContentImages image)
  41. {
  42. this.text = null;
  43. this.images = image;
  44. this.tooltip = null;
  45. }
  46. /// <summary>Constructs content with an image and a tooltip.</summary>
  47. public GUIContent(GUIContentImages image, LocString tooltip)
  48. {
  49. this.text = null;
  50. this.images = image;
  51. this.tooltip = tooltip;
  52. }
  53. /// <summary>Constructs content with a string and an image.</summary>
  54. public GUIContent(LocString text, GUIContentImages image)
  55. {
  56. this.text = text;
  57. this.images = image;
  58. this.tooltip = null;
  59. }
  60. /// <summary>Constructs content with a string, an image and a tooltip.</summary>
  61. public GUIContent(LocString text, GUIContentImages image, LocString tooltip)
  62. {
  63. this.text = text;
  64. this.images = image;
  65. this.tooltip = tooltip;
  66. }
  67. public LocString text;
  68. public GUIContentImages images;
  69. public LocString tooltip;
  70. }
  71. /** @} */
  72. }