GUIColorField.generated.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //************** Copyright (c) 2016-2019 Marko Pintera ([email protected]). All rights reserved. *******************//
  3. using System;
  4. using System.Runtime.CompilerServices;
  5. using System.Runtime.InteropServices;
  6. using bs;
  7. namespace bs.Editor
  8. {
  9. /** @addtogroup GUIEditor
  10. * @{
  11. */
  12. /// <summary>
  13. /// A composite GUI object representing an editor field. Editor fields are a combination of a label and an input field.
  14. /// Label is optional. This specific implementation displays a color input field.
  15. /// </summary>
  16. [ShowInInspector]
  17. public partial class GUIColorField : GUIElement
  18. {
  19. private GUIColorField(bool __dummy0) { }
  20. protected GUIColorField() { }
  21. /// <summary>Creates a new GUI editor field with a label.</summary>
  22. /// <param name="labelContent">Content to display in the editor field label.</param>
  23. /// <param name="labelWidth">Width of the label in pixels.</param>
  24. /// <param name="style">
  25. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  26. /// If not specified default style is used.
  27. /// </param>
  28. public GUIColorField(GUIContent labelContent, int labelWidth, string style = "")
  29. {
  30. Internal_create(this, ref labelContent, labelWidth, style);
  31. }
  32. /// <summary>Creates a new GUI editor field with a label.</summary>
  33. /// <param name="labelContent">Content to display in the editor field label.</param>
  34. /// <param name="style">
  35. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  36. /// If not specified default style is used.
  37. /// </param>
  38. public GUIColorField(GUIContent labelContent, string style = "")
  39. {
  40. Internal_create0(this, ref labelContent, style);
  41. }
  42. /// <summary>Creates a new GUI editor field with a label.</summary>
  43. /// <param name="labelText">String to display in the editor field label.</param>
  44. /// <param name="labelWidth">Width of the label in pixels.</param>
  45. /// <param name="style">
  46. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  47. /// If not specified default style is used.
  48. /// </param>
  49. public GUIColorField(LocString labelText, int labelWidth, string style = "")
  50. {
  51. Internal_create1(this, labelText, labelWidth, style);
  52. }
  53. /// <summary>Creates a new GUI editor field with a label.</summary>
  54. /// <param name="labelText">String to display in the editor field label.</param>
  55. /// <param name="style">
  56. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  57. /// If not specified default style is used.
  58. /// </param>
  59. public GUIColorField(LocString labelText, string style = "")
  60. {
  61. Internal_create2(this, labelText, style);
  62. }
  63. /// <summary>Creates a new GUI editor field without a label.</summary>
  64. /// <param name="style">
  65. /// Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on.
  66. /// If not specified default style is used.
  67. /// </param>
  68. public GUIColorField(string style = "")
  69. {
  70. Internal_create3(this, style);
  71. }
  72. /// <summary>Changes the value of the field.</summary>
  73. [ShowInInspector]
  74. [NativeWrapper]
  75. public Color Value
  76. {
  77. get
  78. {
  79. Color temp;
  80. Internal_getValue(mCachedPtr, out temp);
  81. return temp;
  82. }
  83. set { Internal_setValue(mCachedPtr, ref value); }
  84. }
  85. /// <summary>Determines if the color assigned to the field is allowed to have values outside of [0-1] range.</summary>
  86. [ShowInInspector]
  87. [NativeWrapper]
  88. public bool AllowHDR
  89. {
  90. get { return Internal_getAllowHDR(mCachedPtr); }
  91. set { Internal_setAllowHDR(mCachedPtr, value); }
  92. }
  93. /// <summary>Triggered when the user clicks on the GUI element.</summary>
  94. partial void Callback_OnClicked();
  95. [MethodImpl(MethodImplOptions.InternalCall)]
  96. private static extern void Internal_getValue(IntPtr thisPtr, out Color __output);
  97. [MethodImpl(MethodImplOptions.InternalCall)]
  98. private static extern void Internal_setValue(IntPtr thisPtr, ref Color value);
  99. [MethodImpl(MethodImplOptions.InternalCall)]
  100. private static extern bool Internal_getAllowHDR(IntPtr thisPtr);
  101. [MethodImpl(MethodImplOptions.InternalCall)]
  102. private static extern void Internal_setAllowHDR(IntPtr thisPtr, bool allow);
  103. [MethodImpl(MethodImplOptions.InternalCall)]
  104. private static extern void Internal_create(GUIColorField managedInstance, ref GUIContent labelContent, int labelWidth, string style);
  105. [MethodImpl(MethodImplOptions.InternalCall)]
  106. private static extern void Internal_create0(GUIColorField managedInstance, ref GUIContent labelContent, string style);
  107. [MethodImpl(MethodImplOptions.InternalCall)]
  108. private static extern void Internal_create1(GUIColorField managedInstance, LocString labelText, int labelWidth, string style);
  109. [MethodImpl(MethodImplOptions.InternalCall)]
  110. private static extern void Internal_create2(GUIColorField managedInstance, LocString labelText, string style);
  111. [MethodImpl(MethodImplOptions.InternalCall)]
  112. private static extern void Internal_create3(GUIColorField managedInstance, string style);
  113. private void Internal_onClicked()
  114. {
  115. Callback_OnClicked();
  116. }
  117. }
  118. /** @} */
  119. }