Bibliothèques

liste des bibliothèques s&box

XGUI-3

xenthio.xgui-3

No summary provided.

À propos

XGUI-3 is a new version of XGUI that cleans up and expands on XGUI-2.

It's most notable feature is the addition of an ImGui style immediate mode UI API, which makes debugging UI and development panels quick and easy to implement.

In order to use it, you must place one of these in the scene

Then after that, you can call the ImXGUI.Begin functions and stuff to draw immediate mode windows in any component anywhere in update or fixedupdate. Here's an example to get you started, The API will aim to match ImGui
private bool showWindow = true;
private bool checkboxValue = false;
private float floatValue = 0.5f;
private Color colour = Color.White;
protected override void OnUpdate()
{
	// Create a window
	if ( ImXGUI.Begin( "ImXGUI Window", ref showWindow ) )
	{
		ImXGUI.Text( "Welcome to ImXGUI!" );

		if ( ImXGUI.Button( $"Click Me! ({clickCount} Clicks)" ) )
		{
			Log.Info( "Button clicked!" );
		}

		if ( ImXGUI.Checkbox( "Toggle Option", ref checkboxValue ) )
		{
			Log.Info( $"Checkbox changed to: {checkboxValue}" );
		}

		ImXGUI.SliderFloat( "Float Slider", ref floatValue, 0.0f, 1.0f, 0.025f );

		ImXGUI.ColorPicker( "Colour", ref colour );

		ImXGUI.End();
	}
}

Or you can use the razor based GUI by creating a panel that derives from window, and adding it to the XGUIRootPanel like so

Scene.GetSystem<XGUISystem>().Panel.AddChild<MyCoolWindow>();

Médias

01
Vignette de XMovement
XMovement xenthio.xmovement

No summary provided.

+0 24 h
14favoris
14votes positifs
84%Terry Score
02
Vignette de XGUI-2
XGUI-2 xenthio.xgui

XGUI Legacy

+0 24 h
1favoris
2votes positifs
43%Terry Score