2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
7 public static class GUI
53 public static void Text(
string text,
Rect rect)
78 public static void Text(
string text,
Rect rect,
Font font,
float fontSize)
92 public static void Text(
string text,
Rect rect,
Font font,
float fontSize,
float fontResolution)
107 public static void Text(
string text,
Rect rect,
Font font,
float fontSize,
float fontResolution,
float lineSpacing)
123 public static void Text(
string text,
Rect rect,
Font font,
float fontSize,
float fontResolution,
float lineSpacing,
TextWordWrap wordWrap)
144 INTERNAL_text(text, ref rect, font, fontSize, fontResolution, lineSpacing, (
int)wordWrap, (
int)horizontalAlignment, (
int)verticalAlignment, ref color);
162 INTERNAL_text(text, ref rect, font, fontSize, fontResolution, lineSpacing, (
int)wordWrap, (
int)horizontalAlignment, (
int)verticalAlignment, ref color);
172 public static void Text(
string text,
Rect rect,
float fontSize,
Color color)
199 public static void Text(
string text,
Rect rect,
Font font,
float fontSize,
float fontResolution,
Color color)
212 INTERNAL_image(texture, ref rect, ref color, (
int)
ImageType.Simple);
223 INTERNAL_image(texture, ref rect, ref color, (
int)
ImageType.Simple);
235 INTERNAL_image(texture, ref rect, ref color, (
int)imageType);
245 public static bool Button(
int id,
Rect rect,
bool interactable)
248 Color colorHov =
new Color(0.8f, 0.8f, 0.8f, 1.0f);
249 Color colorAct =
new Color(0.6f, 0.6f, 0.6f, 1.0f);
250 Color colorDis =
new Color(0.4f, 0.4f, 0.4f, 1.0f);
252 return INTERNAL_button(
id, ref rect,
null,
null,
null,
null, ref color, ref colorHov, ref colorAct, ref colorDis, (
int)
ImageType.Simple, interactable);
268 return INTERNAL_button(
id, ref rect,
null,
null,
null,
null, ref normalColor, ref hoverColor, ref activeColor, ref disabledColor, (
int)
ImageType.Simple, interactable);
300 return INTERNAL_button(
id, ref rect, normalTexture, hoverTexture, activeTexture, disabledTexture, ref normalColor, ref hoverColor, ref activeColor, ref disabledColor, (
int)imageType, interactable);
325 Color colorHov =
new Color(0.8f, 0.8f, 0.8f, 1.0f);
326 Color colorAct =
new Color(0.6f, 0.6f, 0.6f, 1.0f);
327 Color colorDis =
new Color(0.4f, 0.4f, 0.4f, 1.0f);
329 return INTERNAL_button(
id, ref rect, normalTexture, hoverTexture, activeTexture, disabledTexture, ref color, ref colorHov, ref colorAct, ref colorDis, (
int)imageType, interactable);
355 return INTERNAL_button(
id, ref rect, texture, texture, texture, texture, ref normalColor, ref hoverColor, ref activeColor, ref disabledColor, (
int)imageType, interactable);
360 [MethodImpl(MethodImplOptions.InternalCall)]
361 private static extern void INTERNAL_image(
Texture texture, ref
Rect rect, ref
Color color,
int imageType);
363 [MethodImpl(MethodImplOptions.InternalCall)]
364 private static extern void INTERNAL_text(
string text,
368 float fontResolution,
371 int horizontalTextAlignment,
372 int verticalTextAlignment,
375 [MethodImpl(MethodImplOptions.InternalCall)]
376 private static extern bool INTERNAL_button(
int id,
385 ref
Color colDisabled,
static void Image(Texture texture, Rect rect, Color color)
Draw image with color tint
static void Text(string text, Rect rect, Font font, float fontSize, float fontResolution, Color color)
Draw text with font, font size, font resolution and text color
static void Text(string text, Rect rect, Font font, float fontSize, float fontResolution, float lineSpacing, TextWordWrap wordWrap, TextHorizontalAlignment horizontalAlignment, TextVerticalAlignment verticalAlignment, Color color)
Draw text with font, font size, font resolution, line spacing, word wrap, horizontal alignment,...
static bool Button(int id, Rect rect, Color normalColor, Color hoverColor, Color activeColor, Color disabledColor, bool interactable)
Draw enabled or disabled button with tint colors
static void Text(string text, Rect rect, Font font, float fontSize, float fontResolution, float lineSpacing)
Draw text with font, font size, font resolution and line spacing
static void Image(Texture texture, Rect rect)
Draw image
static bool Button(int id, Rect rect, bool interactable)
Draw enabled or disabled button
TextVerticalAlignment
TextVerticalAlignment enum
static void Text(string text, Rect rect, float fontSize, Color color)
Draw text with font size and text color
static void Text(string text, Rect rect, Font font, float fontSize)
Draw text with font and font size
static void Image(Texture texture, Rect rect, Color color, ImageType imageType)
Draw image with color tint and image type
static void Text(string text, Rect rect, Font font, float fontSize, float fontResolution)
Draw text with font, font size and font resolution
static bool Button(int id, Rect rect, Color normalColor, Color hoverColor, Color activeColor, Color disabledColor, Texture normalTexture, Texture hoverTexture, Texture activeTexture, Texture disabledTexture, ImageType imageType, bool interactable)
Draw enabled or disabled button with textures and tint colors
static void Text(string text, Rect rect, Font font, float fontSize, float fontResolution, float lineSpacing, TextWordWrap wordWrap)
Draw text with font, font size, font resolution, line spacing and word wrap
static void Text(string text, Rect rect, Font font, float fontSize, Color color)
Draw text with font, font size and text color
static void Text(string text, Rect rect, Font font, float fontSize, float fontResolution, float lineSpacing, TextWordWrap wordWrap, TextHorizontalAlignment horizontalAlignment, TextVerticalAlignment verticalAlignment)
Draw text with font, font size, font resolution, line spacing, word wrap, horizontal alignment and ve...
TextWordWrap
TextWordWrap enum
static void Text(string text, Rect rect, Font font)
Draw text with font
static bool Button(int id, Rect rect, Texture normalTexture, Texture hoverTexture, Texture activeTexture, Texture disabledTexture, ImageType imageType, bool interactable)
Draw enabled or disabled button with textures
TextHorizontalAlignment
TextHorizontalAlignment enum
static void Text(string text, Rect rect)
Draw text
static bool Button(int id, Rect rect, Color normalColor, Color hoverColor, Color activeColor, Color disabledColor, Texture texture, ImageType imageType, bool interactable)
Draw enabled or disabled button with one texture and tint colors