2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

Updated bindings!

- Changed internal class name from rl to Raylib.
- Improving documentation and tidying bindings a bit.
- Renamed DrawControl to RayForm.
- Bindings now a class library for easy reuse.
This commit is contained in:
2018-09-10 12:18:51 +01:00
parent b0909c3241
commit 2f8a9914ef
15 changed files with 1373 additions and 820 deletions

View File

@@ -1,3 +1,9 @@
/**********************************************************************************************
*
* Raygui
* https://github.com/raysan5/raygui/blob/master/src/raygui.h
*
**********************************************************************************************/
using System;
using System.Runtime.InteropServices;
@@ -182,14 +188,18 @@ namespace Raylib
LISTVIEW_TEXT_COLOR_DISABLED
}
#endregion
#region Raylib-cs Types
// GUI controls state
public enum GuiControlState
{
DISABLED = 0,
NORMAL,
FOCUSED,
PRESSED
}
#endregion
public static partial class rl
public static partial class Raylib
{
#region Raylib-cs Variables
@@ -197,10 +207,6 @@ namespace Raylib
#region Raylib-cs Functions
//----------------------------------------------------------------------------------
// Module Functions Declaration
//----------------------------------------------------------------------------------
// Global gui modification functions
// Enable gui controls (global state)
[DllImport(nativeLibName)]
@@ -213,8 +219,7 @@ namespace Raylib
// Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
[DllImport(nativeLibName)]
public static extern void GuiFade(float alpha);
// Style set/get functions
// Set one style property
[DllImport(nativeLibName)]
@@ -223,8 +228,7 @@ namespace Raylib
// Get one style property
[DllImport(nativeLibName)]
public static extern int GuiGetStyleProperty(int guiProperty);
// Container/separator controls, useful for controls organization
// Window Box control, shows a window that can be closed
[DllImport(nativeLibName)]
@@ -244,9 +248,7 @@ namespace Raylib
// Scroll Panel control
[DllImport(nativeLibName)]
public static extern Vector2 GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 viewScroll);
public static extern Vector2 GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 viewScroll);
// Basic controls set
// Label control, shows text
@@ -339,8 +341,7 @@ namespace Raylib
// Dummy control for placeholders
[DllImport(nativeLibName)]
public static extern void GuiDummyRec(Rectangle bounds, string text);
public static extern void GuiDummyRec(Rectangle bounds, string text);
// Advance controls set
// List View control, returns selected list element index