From 500f63177257cca2a7482155b9554648a8a075f3 Mon Sep 17 00:00:00 2001 From: MrScautHD <65916181+MrScautHD@users.noreply.github.com> Date: Sun, 20 Aug 2023 08:12:11 +0200 Subject: [PATCH] Add GetClipboardText (Is a part of the window), set instance to null to open a new one if Disposed --- Raylib-cs/types/Window.cs | 92 ++++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 44 deletions(-) diff --git a/Raylib-cs/types/Window.cs b/Raylib-cs/types/Window.cs index 3696a09..e306632 100644 --- a/Raylib-cs/types/Window.cs +++ b/Raylib-cs/types/Window.cs @@ -27,141 +27,145 @@ public sealed class Window : IDisposable return _instance ?? new Window(flags, width, height, title); } - /// See + /// public bool ShouldClose() => Raylib.WindowShouldClose(); - /// See + /// public void Close() => Raylib.CloseWindow(); - /// See + /// public void TakeScreenshot(string path) => Raylib.TakeScreenshot(path); - /// See + /// public bool IsReady() => Raylib.IsWindowReady(); - /// See + /// public bool IsFullscreen() => Raylib.IsWindowFullscreen(); - /// See + /// public bool IsHidden() => Raylib.IsWindowHidden(); - /// See + /// public bool IsMinimized() => Raylib.IsWindowMinimized(); - /// See + /// public bool IsMaximized() => Raylib.IsWindowMaximized(); - /// See + /// public bool IsFocused() => Raylib.IsWindowFocused(); - /// See + /// public bool IsResized() => Raylib.IsWindowResized(); - /// See + /// public bool IsState(ConfigFlags state) => Raylib.IsWindowState(state); - /// See + /// public bool SetState(ConfigFlags state) => Raylib.SetWindowState(state); - /// See + /// public void ClearState(ConfigFlags state) => Raylib.ClearWindowState(state); - /// See + /// public void ToggleFullscreen() => Raylib.ToggleFullscreen(); - /// See + /// public void Maximize() => Raylib.MaximizeWindow(); - /// See + /// public void Minimize() => Raylib.MinimizeWindow(); - /// See + /// public void Restore() => Raylib.RestoreWindow(); - /// See + /// public void SetIcon(Image image) => Raylib.SetWindowIcon(image); - /// See + /// public unsafe void SetIcons(Image* images, int count) => Raylib.SetWindowIcons(images, count); - /// See + /// public void SetTitle(string title) => Raylib.SetWindowTitle(title); - /// See + /// public void SetClipboardText(string path) => Raylib.SetClipboardText(path); - /// See + /// public void SetPosition(int x, int y) => Raylib.SetWindowPosition(x, y); - /// See + /// public void SetMonitor(int monitor) => Raylib.SetWindowMonitor(monitor); - /// See + /// public void SetMinSize(int width, int height) => Raylib.SetWindowMinSize(width, height); - /// See + /// public void SetSize(int width, int height) => Raylib.SetWindowSize(width, height); - /// See + /// public void SetOpacity(float opacity) => Raylib.SetWindowOpacity(opacity); - /// See + /// public void EnableEventWaiting() => Raylib.EnableEventWaiting(); - /// See + /// public void DisableEventWaiting() => Raylib.DisableEventWaiting(); - /// See + /// public int GetScreenWidth() => Raylib.GetScreenWidth(); - /// See + /// public int GetScreenHeight() => Raylib.GetScreenHeight(); - /// See + /// public int GetRenderWidth() => Raylib.GetRenderWidth(); - /// See + /// public int GetRenderHeight() => Raylib.GetRenderHeight(); - /// See + /// public int GetMonitorCount() => Raylib.GetMonitorCount(); - /// See + /// public int GetCurrentMonitor() => Raylib.GetCurrentMonitor(); - /// See + /// public Vector2 GetMonitorPosition(int monitor) => Raylib.GetMonitorPosition(monitor); - /// See + /// public int GetMonitorWidth(int monitor) => Raylib.GetMonitorWidth(monitor); - /// See + /// public int GetMonitorHeight(int monitor) => Raylib.GetMonitorHeight(monitor); - /// See + /// public int GetMonitorPhysicalWidth(int monitor) => Raylib.GetMonitorPhysicalWidth(monitor); - /// See + /// public int GetMonitorPhysicalHeight(int monitor) => Raylib.GetMonitorPhysicalHeight(monitor); - /// See + /// public int GetMonitorRefreshRate(int monitor) => Raylib.GetMonitorRefreshRate(monitor); - /// See + /// public Vector2 GetPosition() => Raylib.GetWindowPosition(); - /// See + /// public Vector2 GetScaleDpi() => Raylib.GetWindowScaleDPI(); - /// See + /// public string GetMonitorName(int monitor) => Raylib.GetMonitorName_(monitor); - + + /// + public string GetClipboardText() => Raylib.GetClipboardText_(); + public void Dispose() { if (!IsReady()) return; this.Close(); + _instance = null; } } \ No newline at end of file